On Thu, Apr 9, 2009 at 10:26 PM, Jeffrey Ollie <j...@ocjtech.us> wrote:
> On Thu, Apr 9, 2009 at 4:02 PM, Chris Lawrence <lordsu...@gmail.com> wrote:
>>
>> Speaking of polyshp2osm.py, here's a link to the version I modified
>> for the TIGER place boundary data.
>
> (Oops, hit "send" too soon...)  I seem to be doing something wrong
> here...  I've downloaded the shapefiles from NHD for one of the
> subbasins that I'm interested in (07100008).  I process one of the
> shapefiles with ogr2ogr as indicated in the comments:
>
> $ ogr2ogr -t_srs EPSG:4326 NHDAreaNew.shp NHDArea.shp
>
> I then try and run your python script against the converted data:
>
> $ python ../polyshp2osm.py NHDAreaNew.shp
> Running 1 slices with poly_output base filename against shapefile 
> NHDAreaNew.shp
> Traceback (most recent call last):
>  File "../polyshp2osm.py", line 482, in <module>
>    run(args[0], **kw)
>  File "../polyshp2osm.py", line 411, in run
>    tag_values = map_value(fields)
>  File "../polyshp2osm.py", line 144, in fipsstate
>    fips = data['statefp']
> KeyError: 'statefp'
>
> Surely this is operator error... What am I doing wrong?  FYI, running
> this on Fedora 10...

You need to customize the top of the polyshp2osm script to support the
NHD attributes; it's currently set up to convert from TIGER place
boundary files, which use completely different labels.

I uploaded a new version of both .py scripts which include some
cleanups and should make it easier to adapt to support the NHD data.
But the tag remapping is work that I haven't tackled yet although I
may try my hand at it over the weekend.


Chris

_______________________________________________
Talk-us mailing list
Talk-us@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk-us

Reply via email to