Hello.
I have been trying to figure out some ways to merge shapefiles containing
different schemas with Geotools. Merging shapefiles with similar schemas is
not a problem, but when the schemas are different, Geotools throws all
sots of exceptions. I have tried many different ways to accomplish this,
and all have have failed :(
I've tried this example:
http://www.mail-archive.com/[email protected]/msg02023.html
But when features are added to the mergedFeatureStore, exceptions are
thrown because the features do not have the same schema. When I try to
update the schema, the exception is "Schema modification not supported".
I've tried a variation on this example:
http://docs.geotools.org/latest/userguide/_downloads/JoinExample.java
but when trying to add SimpleFeatureCollection results to a master
SimpleFeatureCollection,
warnings are thrown about non-homogeneous features. These
non-homogeneousfeatures cannot be added to a DataStore for whatever
reason.
Do I have to do something like iterate through all the shapefiles I want to
merge and get their schemas. Then, somehow combine the schemas together and
create an empty shapefile using that schema?
So, since there is really isn't any documentation on how to merge
shapefiles, anyone have any ideas?
------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users