<div class="gmail_quote">On Tue, Apr 26, 2011 at 7:49 AM, Ben Supnik <span dir="ltr"><<a href="mailto:bsupnik@xsquawkbox.net">bsupnik@xsquawkbox.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi Y'all,<br>
<br>
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?<br></blockquote>
<div><br></div><div>There already is a process on the NHD wiki page.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
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.<br>
</blockquote><div><br></div><div>The process is to download a subbasin, convert to OSM, and import (checking for existing waterways).</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<br>
I could rehost the NHD files on my company's servers for a while, perhaps even in .osm format.<br>
<br>
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.<br>
</blockquote><div><br></div><div>Converting these into OSM probably won't be very helpful at this point.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<br>
I could break the data up in a few ways...<br>
- It looks like the reach codes contain sub basin IDs as their first 8 digits.<br>
- I could break the data into square tiles.<br>
- I suppose it could be split by state.<br></blockquote><div><br></div><div>- 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)</div>
<div>- Square tiles won't line up with existing NHD imports</div><div>- States wouldn't line up either but may be easier to merge.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<br>
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.<br>
<br>
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.<br>

<br>
(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, <a href="https://trac.openstreetmap.org/ticket/3701" target="_blank">https://trac.openstreetmap.org/ticket/3701</a> - has anyone successfully imported water data this way, or should I expect that users will have to use JOSM?)<br>
</blockquote><div><br></div><div>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.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
cheers<br>
Ben<br>
<br>
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.<br></blockquote><div><br></div><div>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.</div>
<div><br></div><div>-Ian</div></div>