I have a need to create regular points with a coordinate every meter in a county. I've tried several methods including Hawthes Tools in ArcMap9.3, ET GeoWizards, and the standard Toolbox. I have encountered reoccurring instances where all of the processes have froze up.I am assuming that these programs can't handle that data generation. I tried this in QGIS as well. I need help ASAP.
-
3The average US county would contain three billion (3E9) such points, requiring 48 GB to store as double precision floats. Some counties would require an order of magnitude more. That's an awful lot; that many points wouldn't be distinguishable on any map. Could you maybe back up a little and explain what you need these points for? Perhaps there's a better way.– whuberCommented Aug 12, 2011 at 19:29
-
2@whuber I have the storage capacity (around 200 GB). I'm not really sure what the need is, but my boss said to do it and I really want to keep my job.– PatrickWCommented Aug 12, 2011 at 19:48
-
2OK, everyone can appreciate that. Note that storage is the least of your worries. You already have seen what datasets of this size can do even to industrial-strength GISes like ArcGIS: they might require decades to finish their calculations (I'm not kidding). Perhaps your boss would appreciate a good analysis of tradeoffs between computational resource use (especially computing time and your time) and analytical precision. (It's difficult to imagine any county-level analysis that truly needs one meter precision.)– whuberCommented Aug 12, 2011 at 19:55
2 Answers
Try this:
- Convert your county polygons to raster using the ArcGIS Conversion Toolbox > To Raster > Polygon to Raster. Set the cell size to 1m.
- Use spatial analyst's Sample Tool (Spatial Analyst toolbox > Extraction tools > sample) to create points for every cell.
- Extract only the points that intersect your county polygon.
If you continue to run into problems, try splitting the county polygon into smaller areas and using this same process.
-
3+1: if this has to be done, rasters are the way to do it. Moreover, the inherent runlength encoding used by ESRI's raster format will compress even this ~10^10 cell raster into a few megabytes; only the vector output will be large (and tedious to generate). I do worry about what the output is intended for, though...– whuberCommented Aug 12, 2011 at 19:59
-
1PatrickS: Since we have the same name, Patrick the answerer will prepend any comments with "PatrickS:".– PatrickCommented Aug 12, 2011 at 19:59
-
-
1@PatrickW Welcome to our site! I look forward to seeing lots of great questions and answers with "Patrick"s in them :-).– whuberCommented Aug 12, 2011 at 21:36
-
@PatrickW, did you find something that would work for you?– PatrickCommented Aug 15, 2011 at 13:50
Personally, I would get the grid of the MBR of the country: create a 2D array based on the min max coords of the MBR, working how many items would fill in that grid with 1 meter intervals and then loop[ through, creating points on the fly, rounding it off with a delete outside of the county.
So you'll know the Min / Max X, so you'll know how many metres will fill in that grid, so you have your grid of X values. Do the same for the Y and you have that grid.
The following is pseudo code
for y in range(0, rows):
for x in range(0, cols):
currentPoint = (y, x)
CreatePoint
I reckon that's about 20 lines of python with the erase outside?