Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have a shapefile containing approximately 600 000 point-objects. Unfortunately, for a couple of reasons I need to split this file into a larger number of shape-files each containing approximately 200 objects. Is anyone aware of any tools/scripts that allow me to automate this process? I have tried to automate the process using e.g. the Split-tool in ArcGIS, however since I am more of an archaeologist than a programmer (and know next to no Python), I haven't been able to produce a script that does this. I am guessing that the best way to do this would be to use a counter which increments with +1 for each object passed into a new shapefile, and when that counter reaches 200 it resets and a new shapefile is created into which the subsequent 200 objects are copied. But as mentioned before, I haven't been able to write a script/create a workspace that does this.

So, does anyone have any suggestions of scripts/programs that are able to do this?

For the record: I am able to utilise ArcGIS 10 (with ArcInfo license), FME Workbench and any Open Source-program that you might recommend (which works on Windows).

share|improve this question

1 Answer 1

up vote 1 down vote accepted

In FME you can use a ModuloCounter transformer to number features in groups of 200. Then use a Feature Type Fanout (open the Feature Type properties, set the fanout By Attribute option, and select the ModuloCounter attribute).

The only issue is the 200 features per file might not be spatially related in any way - you'd have to do some form of tiling to get that - but it might not be a problem for you anyway.

share|improve this answer
    
This worked great! It did not take into account spatial groups/clusters, but in this particular case that wasn't needed. I'm guessing you could use some kind of transformer to check and group objects before running them through ModuloCounter if that is needed. Thanks alot! –  Oulah Aug 1 '12 at 20:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.