TRD, GeoServer reprojection (coordinate transformation) will only work for a geometry column. Your use of a text field is a great trick, but it prevents reprojection from working.
To have reprojection you must: - Use a geometry column, and - Register the geometry column in the geometry_columns table to inform GIS applications such a GeoServer about the type, dimensionality, and SRID of your geometries. (GeoServer needs to know the SRID before it starts streaming a request.) Note that these are general GeoServer requirements and are not specific to app-schema. PostGIS AddGeometryColumn will create and register the column and add constraints (see example in the the second link): http://postgis.refractions.net/documentation/manual-1.5/ch04.html#Create_Spatial_Table http://postgis.refractions.net/docs/AddGeometryColumn.html Kind regards, Ben. On 04/11/11 16:43, TRD wrote: > Hello, > > I use the app-schema plugin to map data from a postgre database to a custom > feature type. The data within the database contains coordinates for records. > While storing them in a point-geometry column (type is geometry with > constraint to check if postgis type point matches) mapping this column into > a gml:PointPropertyType showed up a java.lang.IOException. After changing > the column type to text and converting the geometry column value with > astext(setsrid(the_geom,2398)) my mapping worked and in the generated xml > output for my featureType request I got a gml:Point Element with the given > coordinates. > As you can see I used a static srsname (EPSG:2398) to get the WKT value of > the column. > If I add the srsName=EPSG:4326 Parameter to my featureType request no > coordinate transformation is made. > > the mapping part: > <AttributeMapping> > <targetAttribute> > customNS:position > </targetAttribute> > <sourceExpression> > <OCQL>position</OCQL> > </sourceExpression> > </AttributeMapping> > > the schema part: > <xsd:element name="position" type="gml:PointPropertyType" minOccurs="0"/> > > My question is: how to change my mapping to apply coordinate transformation > if srsName parameter is given or how to change my column so transformation > can made by app-schema automatically? > > Thanks for reply. > Kind regards, TRD > > -- > View this message in context: > http://osgeo-org.1803224.n2.nabble.com/Geoserver-App-Schema-WFS-getFeature-Request-with-srsName-tp6962059p6962059.html > Sent from the GeoServer - User mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > RSA(R) Conference 2012 > Save $700 by Nov 18 > Register now > http://p.sf.net/sfu/rsa-sfdev2dev1 > _______________________________________________ > Geoserver-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geoserver-users > -- Ben Caradoc-Davies <[email protected]> Software Engineer CSIRO Earth Science and Resource Engineering Australian Resources Research Centre ------------------------------------------------------------------------------ RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 _______________________________________________ Geoserver-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
