[Talk-us] NHD data extract

Ian Dees ian.dees at gmail.com
Tue Apr 26 14:09:21 BST 2011


On Tue, Apr 26, 2011 at 7:49 AM, Ben Supnik <bsupnik at xsquawkbox.net> wrote:

> Hi Y'all,
>
> The USGS was kind enough to send me the latest shapefile extract for the
> NHD yesterday.  So my question is: is there some way I can process and
> repost this data that would make it more suitable for importers?
>

There already is a process on the NHD wiki page.


>
> I read the wiki pages on NHD imports a few weeks ago, but found the USGS
> download process to be difficult - there wasn't a simple "click here and get
> the shapefile you need to feed into shp2osm" type interface.
>

The process is to download a subbasin, convert to OSM, and import (checking
for existing waterways).


>
> I could rehost the NHD files on my company's servers for a while, perhaps
> even in .osm format.
>
> But...the data extract is 'the whole database' split only by layer and file
> size.  For example, the water body layer (which contains area lakes and
> ponds) comes as 5 shapefiles of between 500 and 800 MB each; there isn't any
> spatial partitioning, so you would need to load the entire data set to pull
> out lakes of interest for a given bounding box.
>

Converting these into OSM probably won't be very helpful at this point.


>
> I could break the data up in a few ways...
> - It looks like the reach codes contain sub basin IDs as their first 8
> digits.
> - I could break the data into square tiles.
> - I suppose it could be split by state.
>

- Not all of the data types contain enough information to split like this
(last I checked the linear features were the only ones with reach code.
Polygonal features don't contain subbasin information)
- Square tiles won't line up with existing NHD imports
- States wouldn't line up either but may be easier to merge.


>
> For the second two cases, the data is not naturally split along those
> boundaries, so I'd have to either induce a cut (not preferable) or have a
> few features be not quite where they'd be expected.
>
> Anyway, I'm open to ideas...my end goal is to do enough of the GIS
> processing type work that mappers who are enthusiastic and want to improve
> their local water areas (but aren't comfortable with command line tools and
> shapefiles) can grab a pre-converted chunk of data, inspect it, and import
> some of it.
>
> (Side note: I tried to do a test of a importing a multipolygon as a vector
> background in Potlatch 2, and it failed for both .osm and .shp format data,
> https://trac.openstreetmap.org/ticket/3701 - has anyone successfully
> imported water data this way, or should I expect that users will have to use
> JOSM?)
>

Yes, I wrote my shp-to-osm Java code specifically to handle the
multipolygons in NHD and it seems to work fine. I even uploaded some of them
in Wisconsin. I stopped because the server was periodically rejecting my
imports and would leave thousands of orphaned nodes. This is when I stopped
importing NHD.


>
> cheers
> Ben
>
> PS If anyone wants the raw data, let me know...I have enough broadband that
> I could push it to a handful of users if interested.
>

We have NHD from circa last year on the OSMF US servers. It may be useful to
update that data. I'll be in contact when we have the space in a week or so.

-Ian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk-us/attachments/20110426/c45bfa0c/attachment.html>


More information about the Talk-us mailing list