Skip to main content

I have a huge shape file which contains whole country data. i have one more file which contains a boundary. for example we can say zipcode boundary. i wnated to write the features falling inside this boundary.FMe's fearure merger or area overlayer reads all the features and checks with the boundary if it is intersects or not. this process takes too long. I need some kind of mechanism which will read only the features which is near (buffer) to the boundary. or any kind... or method. reading whole country data is not recommended rught? How can we process fast ?

can anyone from the team help me?

Hi @fkemminje,

Have you tried using a Search Envelope when reading in the shapefile? The search envelope will spatially filter what is read in by setting a spatial boundary. You can specify that in the reader parameters when you first read it the SHP. Consider using the Clip to Search Envelope if you are only wanting to use the data within the boundary.

You could grab the min/max X, Y coordinates from first using a BoundingBoxReplacer on your boundary feature, then extract the coordinates with a CoordinateExtractor to input this in your shapefile reader.


you can use FeatureReader to read your shape countary data and in the Initiator port connect your boundary. Inside FeatureReader select spatial filter (ex. Intiator contain result). be sure that you have the same projection for both data.


Also, if possible, make sure there's a spatial index on the shape file, that will help with the performance. You can create a spatial index e.g. using ArcCatalog.


Also, if possible, make sure there's a spatial index on the shape file, that will help with the performance. You can create a spatial index e.g. using ArcCatalog.

We even can use FME to create a shape spatial index these days!

Documentation:

Specifies whether or not to generate spatial index files when writing shapefiles.

When this option is selected, FME checks whether ArcGIS is installed on the machine running the workspace. If ArcGIS is installed, FME writes the spatial indexes using ArcGIS libraries. If ArcGIS is not installed, FME writes spatial indexes using an alternate library.

Note that attribute indexes still require an ArcGIS installation.


thanks 4 all answers. i gotcha.


Reply