Map params = ...; // postgis params DataStore dataStore = DataStoreFinder.getDataStore(params); SimpleFeatureCollection collection=...;// collection to save SimpleFeatureType schema = collection.getSchema(); dataStore.createSchema(schema); // but it creates with name "polygon" MyUtils.save(collection,dataStore); // saves to database schema before save: collection.getSchema().getCoordinateReferenceSystem().getCoordinateSystem().toString() :
EllipsoidalCS["GCS_WGS_1984", AXIS["longitude", EAST], AXIS["latitude", NORTH]] postgresql table column definition:
fid serial NOT NULL the_geom geometry(Point,4326) Name character varying(93) But when I read a collection from the same source, I face:
schema after read: collection.getSchema().getCoordinateReferenceSystem().getCoordinateSystem().toString():
EllipsoidalCS["Ellipsoidal 2D CS. Axes: latitude, longitude. Orientation: north, east. UoM: degree", AXIS["Geodetic latitude", NORTH], AXIS["Geodetic longitude", EAST], AUTHORITY["EPSG","6422"]] The problem is that the x y coordinates are displaced in the schema but the point values are not.
أكثر...
EllipsoidalCS["GCS_WGS_1984", AXIS["longitude", EAST], AXIS["latitude", NORTH]] postgresql table column definition:
fid serial NOT NULL the_geom geometry(Point,4326) Name character varying(93) But when I read a collection from the same source, I face:
schema after read: collection.getSchema().getCoordinateReferenceSystem().getCoordinateSystem().toString():
EllipsoidalCS["Ellipsoidal 2D CS. Axes: latitude, longitude. Orientation: north, east. UoM: degree", AXIS["Geodetic latitude", NORTH], AXIS["Geodetic longitude", EAST], AUTHORITY["EPSG","6422"]] The problem is that the x y coordinates are displaced in the schema but the point values are not.
أكثر...