blankblank blank


Author Archive for Leszek Pawlowicz Page 72 of 79



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’




Exporting Data From Garmin's MapSource Program To Google Earth

From the “I’ve been missing the obvious” file: If you have the MapSource program that comes with many Garmin GPS units or Garmin MapSource data disks, you can export waypoints, tracks or routes in the display directly to Google Earth with the View => View In Google Earth command. The data can be imported from a GPS unit, imported from a file (*.gdb, *.gpx, *.mps or *.loc formats supported), or entered manually into the program using its editing tools. Once displayed in Google Earth, you can make a permanent KML file of the data by right-clicking on any the appropriate data entries in the Places Pane, and choosing Save As.




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’




KML Editors

Ogle Earth posts today about two new KML editors:

KMLEditor

NorthGates’ KML Editor




Free Soviet Military Topographic Maps Of Europe And Asia

After the fall of the Soviet Union, a large number of topographic maps covering much of the world became available in the West; the story behind these maps is told on the informative Soviet Maps website. There are dealers who will sell you sets of maps on CD or DVD, but there are also some websites that allow you to download some individual maps for parts of Europe and Asia for free.

Some of the maps have a graphic style more colorful and visually appealing than many topographic maps from Western countries. Here’s an example of one of those maps, showing the Himalayas along the Nepal-Tibet border:

Soviet Army topographic map of the Himalayas

The Soviet Maps website has a few maps from England available for download, but there are far more available at two other sites linked to from there.

The Poehali website, connected with the MapStor dealers website, has a Google-Maps-based interface:

Poehali website interface for retrieving Soviet military topographic maps

Scroll and zoom to the area you’re interested in, and select a map scale you’re interested in at the top. Solid black plus signs in the map subsquares indicate that maps covering the entire subsquare at that scale are available; ghosted plus signs indicate part of the area is covered by available maps; minus signs indicate that no maps at that scale are available for the area. Click on the plus sign, and a list of links to those maps will appear below. Click on a link, wait a few seconds while you look at a MapStor ad, enter a numeric code, and you can then download the map in GIF format (not georeferenced).

You might also try ????? ??????? (Karta Ukraine?); it’s only in Cyrillic, so if you don’t read Russian (and I don’t), it’s kind of tough to figure out all of what’s available on it. From poking around the site, and from a very limited knowledge of Cyrillic, I can see that there are topographic maps and orthophotos (not georeferenced) for Ukraine, and apparently parts of Belarus and Moldova as well, in JPEG format. They also aren’t georeferenced, and you’ll have to do that to use them in a GIS program. Explore the site I’ll be posting about free georeferencing software and techniques in future posts.

Soviet maps don’t necessarily use the same symbology as Western maps. But you can download explanatory guides to Soviet topo map symbology from the Armchair General website or a Stanford Library website.




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’