Upon reading the source of ShapefileDataStore it turns out that feature type name is not stored in the shapefile. So when we open the shapefile again, it guesses the type name as the name of file without the extension part.
Am I correct here ? or am I missing sth ? Enam wrote: > > I'm seeing some issues with feature type names. > > Consider this code: > > IndexedShapefileDataStore sds = new IndexedShapefileDataStore(somfileurl); > sds.createSchema(featureType); > System.out.println(sds.getTypeNames().length); > System.out.println(sds.getSchema(sds.getTypeNames()[0])); > > This outputs the actual typename supplied during schema creating. When I > run it again without the createSchema statement, I see that the type name > = shapefile name! > > IndexedShapefileDataStore sds = new IndexedShapefileDataStore(somfileurl); > //sds.createSchema(featureType); > System.out.println(sds.getTypeNames().length); > System.out.println(sds.getSchema(sds.getTypeNames()[0])); > -- View this message in context: http://www.nabble.com/Feature-type-name-tf3759874.html#a10628868 Sent from the geotools-gt2-users mailing list archive at Nabble.com. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
