blankblank blank


Archive for the 'shapefile' Category Page 6 of 9



The Last Word (For Now) On Converting Google Earth KML Files To Shapefiles

Note 1: See this series of posts for info on converting shapefiles to KML format.

Note 2: The current version of the program has a bug that doesn’t let you select a file. The author has indicated on the website that a new version should be out soon, but until then, you may have to use the approach described in either this post or another post. Also available now is an online KML to shapefile converter.

In two previous posts, I covered several multi-step hacks for converting Google Earth KML files to shapefile format, since there wasn’t a single-step free approach to my knowledge. Well, there is now, and it makes the process a lot easier.

Continue reading ‘The Last Word (For Now) On Converting Google Earth KML Files To Shapefiles’




Worldwide Digital Geographic Data From The FAO

The United Nations Food And Agriculture Organization (FAO) maintains the FAO GeoNetwork, a data portal for worldwide digital geographic information from the FAO, other UN agencies, NGOs and other organizations. Despite the “Food And Agriculture” in the name, there’s far more than just agricultural-related data here.

The FAO Portal Page has a web search interface for tracking down data. Not all the data is available in downloadable digital format – for much of it, only the metadata is available. If you’re only interested in digital data, just check “Digital” next to “Map type” box. Search results can be random in nature, and sometimes data listed as being available in downloadable format isn’t. But you never know what useful stuff might pop up. For example, here’s a map of the southern tip of Africa, plotted from 1:125,00 scale coastline vector data for Africa and Arabia derived from SRTM data:

FAO vector GIS data for Africa

Recent coastline data with that kind of resolution isn’t always easy to find.

You can subscribe to an RSS feed that lists new datasets as they’re added to the portal. There’s also an interactive online mapping system for creating your own maps, and an extensive list of WMS servers with a wide variety of information you can add to WMS-compatible programs like MapWindow and Google Earth. You may not always find exactly what you need, but it’s definitely worth a look.




Converting Text/Spreadsheet Data To Line/Area Shapefiles

Converting point text files to shapefiles is easy; converting sets of text coordinates describing lines and polygons, not so much. I’ve found a way to convert sets of text vertex coordinates into line and polygon shapefiles, but there are some limitations:

  • The sets of vertex coordinate points need to be in the right order, i.e. all the points describing a line or a polygon need to be listed in the order they define a shape.
  • You can only create a single line or single polygon at a time; if you have multiple shapes described by sets of points, you’ll have to generate the shapes one at a time and then merge all the shapefiles later on.
  • No attribute data gets converted – you’ll have to enter it manually for every shape in the final product file. Fun.

The basic process is straightforward:

1. Create a CSV file with the vertex coordinates for the individual shapes. The first row should contain field names for the coordinates (e.g. Lat, Long), separated by commas. This is probably most easily done in a spreadsheet program.

2. Change the file suffix from CSV to TXT.

3. Open the file in DNRGarmin (File => Load From => File, with “Text File” as the file type).

4. Specify the field names that correspond to the spatial information, and click OK.

spatialdnr

5. Select “Track” or “Route” from the radio buttons above the data table.

6. Choose File => Save To => File; enter a filename, and select “Arc View Shapefile” as the file type.

7. In the pop-up window that shows up after you click OK, specify whether you want the point data to be converted to a line shapefile or a polygon shapefile. Click on OK, and the points will be converted to the specified shapefile type.




An Easier Way To Convert Shapefiles to Text/Spreadsheet Format

A post from a few days ago describes a somewhat convoluted multi-step process for converting shapefiles to text/spreadsheet format. Zonums Software has let me know that a new version of his free Shape2Text utility is available which simplifies the process tremendously.

Download the Shape2Text zipfile, and unzip it and the supporting .bpl files into its own directory (no install program). Run the program, and select the shapefile you want to convert to a text format:

converting shapefiles into text format

For point shapefiles, an Attributes button will become active; click on it, and you can select which of the shapefile attributes will be exported along with the coordinates. You can delimit the file with commas (CSV), spaces (TXT) or tabs (TAB). An output file name and location will be auto-generated, but you can change that as well. Click on Accept, and the text file will be created. A lot easier than the earlier method!

The program also exports line and area shapefile vertices, but without attribute data, there’s no separation of data from individual shapes in the shapefiles, and there’s some additional data in the header section that you may need to edit out.

Addendum: The program requires Borland .bpl files, which should come included in the zip file. If you get an error message indicating that .bpl file is missing, you can download the needed file from this site. Copy it to the program directory, or put it in your Windows/System32 folder for access by any program in the future that might need it.




Converting Text/Spreadsheet Files To Point Shapefile Format

Yesterday’s post dealt with converting point shapefiles to a text format compatible with spreadsheets. Today’s post handles the opposite – converting spreadsheet data to point shapefile format.

Continue reading ‘Converting Text/Spreadsheet Files To Point Shapefile Format’




Converting Point Shapefiles To Text/Spreadsheet Format

It’s sometimes useful to convert the location data in shapefiles to a text format, for viewing and manipulation in spreadsheets or other programs. You’re likely to want to include the associated data from the attribute table as well. Haven’t found a single-step solution for this, but there’s a fairly simple two-step process that works well for point shapefiles; lines and areas are somewhat more problematical.

Continue reading ‘Converting Point Shapefiles To Text/Spreadsheet Format’




Converting Shapefiles and ArcINFO Coverages To AutoCAD DXF Format

Yesterday’s post covered converting KML files to shapefile format, with the intermediate step of converting them first to AutoCAD DXF format, then DXF to shapefile format using a MapWindow plugin. Seems like a good moment to post on a shapefile-to-DXF converter that can also convert ArcINFO coverages (derivable from ArcINFO E00 files) to DXF as well.

Continue reading ‘Converting Shapefiles and ArcINFO Coverages To AutoCAD DXF Format’




Another Way To Convert Google Earth KML Files To Shapefiles

Note: See this series of posts for info on converting shapefiles to KML format.

In the last post, I covered a mildly painful way to convert the vector data (points, paths, and polygons) in Google Earth KML files to shapefile format, while keeping at least the name associated with the points and paths. Today, I’ll describe a simpler and faster two-step process, but one that unfortunately doesn’t keep the name or any of the other KML data associated with the original shapes.

Continue reading ‘Another Way To Convert Google Earth KML Files To Shapefiles’