Are there any examples of how to setup a complex datastore with a PostGIS backend? At http://geotools.codehaus.org/ComplexDataStore+Documentation only the “directory” backend is demonstrated. At https://svn.codehaus.org/geoserver/branches/complex-features/conf/data/featureTypes/complexWQ_Plus/wq_plus_mappings.xml there is a PostgreSQL demo, but I don’t know the meanings of several of the parameters:
- driver
- urlprefix
- geom_name
- sqlView.*
Also, why is the geometryless driver needed?
At any rate, I’ve created an XML document to configure the complex datastore, and I’ve added one to my catalog.xml:
<datastore id = "complex" enabled = "true" namespace = "foo">
<connectionParams>
<parameter name = "dbtype" value="complex" />
<parameter name = "config" value="file:/usr/local/share/jboss/server/default/conf/geoserver/community-schemas/complex-db.xml" />
</connectionParams>
</datastore>
When I create an info.xml, GeoServer just complains at startup:
ERROR [org.vfny.geoserver.global] FeatureTypeInfo complex:::Foo ignored - as DataStore complex can't find FeatureType 'Foo
java.util.NoSuchElementException: No datastore found capable of managing DataStoreConfig[namespace=foo, enabled=false, abstract=null, connection parameters={dbtype=complex, config=file:/usr/local/share/jboss/server/default/conf/geoserver/community-schemas/complex-db.xml, namespace=redacted}]
at org.vfny.geoserver.global.DataStoreInfo.getDataStore(DataStoreInfo.java:219)
at org.vfny.geoserver.global.Data.loadFeatureTypes(Data.java:554)
at org.vfny.geoserver.global.Data.load(Data.java:235)
...
Any help is greatly appreciated!
···
--
Dustin Parker
Forward Slope, Inc.
Work: 619 299 4400
Cell: 619 277 2591
0tDaX0iWmunqkiR2WKCNG
vHUT0iWqSJHZYoI0a8d1p
E9Ilprp6QZrogbPZYoI0a
8aA0ekDQ6eyxQRo146A==
Dustin,
working examples of a PostGIS backend, using GeoServer 1.6 community-schemas configuration for GeoSciML Testbed 3, can be found at:
https://www.seegrid.csiro.au/twiki/bin/view/Infosrvices/GeoserverGeoscimlTestbed3Downloads
There are three examples. Here is the mapping file for one one:
https://www.seegrid.csiro.au/subversion/GeoSciML/trunk/tools/GeoServer/configurations/geoserver-gsmltb3-config/featureTypes/MappedFeatureUseCase2A/MappedFeatureUseCase2A.template.xml
And the catalog:
https://www.seegrid.csiro.au/subversion/GeoSciML/trunk/tools/GeoServer/configurations/geoserver-gsmltb3-config/catalog.xml
The think the complex-features branch might be rather old. You might want to try the option modules in 1.6.x (GeoTools 2.4.x).
https://www.seegrid.csiro.au/twiki/bin/view/Infosrvices/GeoserverDevelopment
Kind regards,
Ben.
Dustin Parker wrote:
Are there any examples of how to setup a complex datastore with a PostGIS backend? At http://geotools.codehaus.org/ComplexDataStore+Documentation only the "directory" backend is demonstrated. At https://svn.codehaus.org/geoserver/branches/complex-features/conf/data/featureTypes/complexWQ_Plus/wq_plus_mappings.xml there is a PostgreSQL demo, but I don't know the meanings of several of the parameters:
* driver
* urlprefix
* geom_name
* sqlView.*
Also, why is the geometryless driver needed?
At any rate, I've created an XML document to configure the complex datastore, and I've added one to my catalog.xml:
<datastore id = "complex" enabled = "true" namespace = "foo">
<connectionParams>
<parameter name = "dbtype" value="complex" />
<parameter name = "config" value="file:/usr/local/share/jboss/server/default/conf/geoserver/community-schemas/complex-db.xml" />
</connectionParams>
</datastore>
When I create an info.xml, GeoServer just complains at startup:
ERROR [org.vfny.geoserver.global] FeatureTypeInfo complex:::Foo ignored - as DataStore complex can't find FeatureType 'Foo
java.util.NoSuchElementException: No datastore found capable of managing DataStoreConfig[namespace=foo, enabled=false, abstract=null, connection parameters={dbtype=complex, config=file:/usr/local/share/jboss/server/default/conf/geoserver/community-schemas/complex-db.xml, namespace=redacted}] at org.vfny.geoserver.global.DataStoreInfo.getDataStore(DataStoreInfo.java:219)
at org.vfny.geoserver.global.Data.loadFeatureTypes(Data.java:554)
at org.vfny.geoserver.global.Data.load(Data.java:235)
...
Any help is greatly appreciated!
--
Dustin Parker
Forward Slope, Inc.
Work: 619 299 4400
Cell: 619 277 2591
0tDaX0iWmunqkiR2WKCNG
vHUT0iWqSJHZYoI0a8d1p
E9Ilprp6QZrogbPZYoI0a
8aA0ekDQ6eyxQRo146A==
------------------------------------------------------------------------
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineer, CSIRO Exploration and Mining
Australian Resources Research Centre
26 Dick Perry Ave, Kensington WA 6151, Australia
Dustin Parker wrote:
Also, why is the geometryless driver needed?
Geometryless is only needed when connecting to a non-spatial database, with (for example) x and y columns, rather than geometry columns in a type.
At any rate, I've created an XML document to configure the complex datastore, and I've added one to my catalog.xml:
<datastore id = "complex" enabled = "true" namespace = "foo">
<connectionParams>
<parameter name = "dbtype" value="complex" />
<parameter name = "config" value="file:/usr/local/share/jboss/server/default/conf/geoserver/community-schemas/complex-db.xml" />
</connectionParams>
</datastore>
When I create an info.xml, GeoServer just complains at startup:
I think complex features still need to be under featureTypes so their info.xml is detected. Features are loaded for directories under featureTypes that contain info.xml.
--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineer, CSIRO Exploration and Mining
Australian Resources Research Centre
26 Dick Perry Ave, Kensington WA 6151, Australia
Ben Caradoc-Davies wrote:
Dustin,
working examples of a PostGIS backend, using GeoServer 1.6 community-schemas configuration for GeoSciML Testbed 3, can be found at:
https://www.seegrid.csiro.au/twiki/bin/view/Infosrvices/GeoserverGeoscimlTestbed3Downloads
There are three examples. Here is the mapping file for one one:
https://www.seegrid.csiro.au/subversion/GeoSciML/trunk/tools/GeoServer/configurations/geoserver-gsmltb3-config/featureTypes/MappedFeatureUseCase2A/MappedFeatureUseCase2A.template.xml
And the catalog:
https://www.seegrid.csiro.au/subversion/GeoSciML/trunk/tools/GeoServer/configurations/geoserver-gsmltb3-config/catalog.xml
The think the complex-features branch might be rather old. You might want to try the option modules in 1.6.x (GeoTools 2.4.x).
https://www.seegrid.csiro.au/twiki/bin/view/Infosrvices/GeoserverDevelopment
Kind regards,
Ben.
Hello Ben,
Thank you for the examples. I’m getting much closer, but it seems EMF is having trouble parsing my schema. It applies the target namespace correctly to any top-level element declarations, but I am forced to use element refs in my content models. Is this expected behavior? In other words, unless I use element refs, I get this error when issuing a GetFeature request:
···
--
Dustin Parker
Forward Slope, Inc.
Work: 619 299 4400
Cell: 619 277 2591
0tDaX0iWmunqkiR2WKCNG
vHUT0iWqSJHZYoI0a8d1p
E9Ilprp6QZrogbPZYoI0a
8aA0ekDQ6eyxQRo146A==
Dustin Parker wrote:
Thank you for the examples. I'm getting much closer, but it seems EMF is having trouble parsing my schema. It applies the target namespace correctly to any top-level element declarations, but I am forced to use element refs in my content models. Is this expected behavior? In other words, unless I use element refs, I get this error when issuing a GetFeature request:
java.lang.IllegalArgumentException: p:BarAttribute is not a valid location
path for type [namespace]ComplexFooType. p:DirectablePlatformInfo ns:
[namespace], ComplexFooType properties: <snip> null#BarAttribute
at org.geotools.data.complex.filter.XPath.set(XPath.java:559)
Dustin,
did you specify all your namespaces in catalog.xml and again in your mapping file? Yes, you have to do it twice.
Does your schema use elementFormDefault="qualified" and attributeFormDefault="unqualified"?
I am not sure about EMF behaviour for models without element refs. I am using GeoSciML, which has all types defined at the top level.
There is another namespace bug in Encoder, which affects schema that import other schema, but I do not think this is the problem in your case. (The symptoms of this one are null namespace prefixes in encoded output, not exceptions.)
http://jira.codehaus.org/browse/GEOT-1276
Kind regards,
--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineer, CSIRO Exploration and Mining
Australian Resources Research Centre
26 Dick Perry Ave, Kensington WA 6151, Australia