Hey Rodrigo: Rodrigo Paes wrote: > Hi Jody, > I tried your approach and here is what happened: > > - When I call the createSchema, it creates the schema but the crs is null; > - Then I call the forceSchemaCRS and it creates the .prj properly but > the schema is set to null; > - Then when I call the command: featureStore = > (FeatureStore<SimpleFeatureType, SimpleFeature>) shapeFileDataStore > .getFeatureSource(featureType.getTypeName()); > it is not able to get the right type, throwing an exception: > We are quickly heading into bug report territory; and should watch this turn over in a debugger. As Michael pointed out we are having a problem transforming the bounds; something we should not let get in the way of changing the crs.
I was startled that forcing the CRS would set the schema to null - we should explore how that went wrong next. The shapefile module maintainer is very busy; I will see if he can help on this one. In the meantime can we arrange a test case to show the problem? The part we are missing (appart from the code you provided) is making that initial feature collection (even with a single point in it). The CRS you have chosen (that produces a transform exception) is the critical part we will of not tested before. > shapeFileDataStore.createSchema(collection.getSchema()); > SimpleFeatureType schema = shapeFileDataStore.getSchema(); // > gets the created schema > shapeFileDataStore.forceSchemaCRS(crs); // this call is > setting the schema to null > shapeFileDataStore.schema = schema; // it sets the schema again If we cannot get a hold of the module maintainer; I have opened up a couple slots for hands on geotools work and I could help you debug and patch this problem. Jody ------------------------------------------------------------------------------ Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
