[Talk-us] My shape file import steps so far
Dale Puch
dale.puch at gmail.com
Tue Sep 2 10:43:00 BST 2008
I wanted to document what I tried, and get some feedback. At the moment I'm
looking at http://www.seminolecountyfl.gov/gis/ Seminole county Fl which
may still need explicit response that the data is in the public domain prior
to uploading it.
So far I have converted various downloaded shape files to WGS84 from their
respective state datums. This took a while with me being a noob, and I
couldn't find anything that talked about what actually needed to be done.
So for anyone else out there, this was my method.
Using ogr2ogr from FWTools2.1.0 http://fwtools.maptools.org/ Actually the
"Gis on a stick" (nice package)
http://www.archaeogeek.com/blog/portable-gis/
Most shape downloads include a *.prj file, so this makes it easy. If your
missing one, try using another from the same source but make sure they use
the same settings.
basic command: ogr2ogr -t_srs WGS84 -s_srs "ESRI::in_shp.prj" "out_shp.shp"
"in_shp.shp"
To automate it, a few dos commands to allow mass converting entire
directorie trees at once. Starting at where the command was run from.
command: FOR /R .\ %G IN (*.prj) DO N:\usbgis\apps\FWTools2.1.0\bin\ogr2ogr
-t_srs WGS84 -s_srs "ESRI::%~dpnG.prj" "%~dpnG_out.shp" "%~dpnG.shp"
This outputs with the same file name but with "_out" added
If you use this in a batch file, you will need to change the single % to
%% A quirk of MS batch files.
you can also remove "/R .\" to only process files in the current directory.
Still to come is converting the WGS84 shape files into OSM format for
loading and review in JOSM followed by normal upload to the OSM database.
conversion script I found to start with...
http://raumplanung.tobwen.de/OSM/scripts/shp2osm_080814.pls
command: FOR /R .\ %G IN (*_out.shp) DO shp2osm.pl "%~dpnG" > "%~dpnG.osm"
Tests work well, and basic streets should be east to import. Tags need to
be worked on though. Like tiger (source:data_tag), and what tags should be
imported? Do nodes need to be tagges as they were for the tiger data? How
to pull attributes from other shp files and merge the data? There are a few
places I think this would be the right thing to do. Such as street lights
added to nodes, I saw some other data layers that might be of use in the
same way if they can be combined.
One down side is the data points are higher density than they probably need
to be, so lots more data. The ways by default are split at all
intersections, and there is cross street information (from, to) in each way
section. Finally what to do with existing data such as the tiger stuff, and
especially user made stuff.
Can anyone suggest a better method, or other comments? import into
PostgreSQL perhaps? Would this allow better review somehow, or processing
of smaller chunks of data?
--
Dale Puch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk-us/attachments/20080902/3c2f9c0d/attachment.html>
More information about the Talk-us
mailing list