Hi all, I'd like to programmatically add layers from a PostGIS DB to a locally running GeoServer instance by using the REST API. Now I'm struggling to publish the PostGIS table "stand_manual" in the existing DataStore "venue" as a new layer via the REST API.
I issue this request first for creating the FeatureType: POST http://localhost:8151/geoserver/rest/workspaces/default_workspace/datastores/venue/featuretypes with the following XML content <featureType> <enabled>true</enabled> <metadata /> <keywords><string>KEYWORD</string></keywords <projectionPolicy>REPROJECT_TO_DECLARED</projectionPolicy> <title>stand_manual</title> <name>stand_manual</name> <srs>EPSG:32632</srs> </featureType> Afterwards the layer itself is created with another request. No direct errors occur, and the layer appears in the web interface afterwards. But when I check its details, the native SRS field is empty. Both the computation of the native bounds and a click on the "Publish" tab fails and leads to an error saying java.lang.IllegalArgumentException: Argument "sourceCRS" should not be null When I publish the layer via the web interface, everything works fine as expected. Why can't the API detect the SRS of the PostGIS table, while the web interface can? Any ideas on what could go wrong here? Any epxerienced API users? Thanks in advance! Cheers, Matthias ------------------------------------------------------------------------------ Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov _______________________________________________ Geoserver-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
