I'm having trouble setting up GeoServer application Schema plugin to serve a subset of CityGML. The data is stored in a Oracle Spatial database (3DCityDB schema) and I've managed to publish feature types for core:CityModel and core:_CityObject. Whenever I try to create a mapping file for Building I get this error:
No top level element found in schemas: {http://www.opengis.net/citygml/1.0}Building The reason to why I mapped core:_CityObject is because Building inherits from core:_Site which in turn inherits from core:CityObject. When I use _CityObject instead of building it works and I can map the feature as I want. It does however get encoded into _CityObject and I need it to be encoded as Building. I tried tons' of configurations but none seems to work for me. Included in this email is the mappingfile for CityModel, Building and _CityObject Any help whatsoever would be deeply appreciated as I banged my head for weeks now while reading the manual back and forth. Thank you! Lukas ___________________________ Lukas Johansson Civilingenjör Decerno AB Electrum 234, SE-164 40 KISTA Besöksadress: Kistagången 16, 7 tr Tel: +46 8 630 75 00 Mobil: +46 70 644 96 61 [cid:image001.jpg@01C9BDEC.AE511250]<http://www.decerno.se/>
<<inline: image001.jpg>>
<?xml version="1.0" encoding="UTF-8"?> <as:AppSchemaDataAccess xmlns:as="http://www.geotools.org/app-schema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.geotools.org/app-schema AppSchemaDataAccess.xsd"> <namespaces> <Namespace> <prefix>gml</prefix> <uri>http://www.opengis.net/gml</uri> </Namespace> <Namespace> <prefix>core</prefix> <uri>http://www.opengis.net/citygml/1.0</uri> </Namespace> <Namespace> <prefix>bld</prefix> <uri>http://www.opengis.net/citygml/building/1.0</uri> </Namespace> <Namespace> <prefix>xlink</prefix> <uri>http://www.w3.org/1999/xlink</uri> </Namespace> <Namespace> <prefix>gsml</prefix> <uri>urn:cgi:xmlns:CGI:GeoSciML:2.0</uri> </Namespace> </namespaces> <sourceDataStores> <DataStore> <id>citydb</id> <parameters> <Parameter> <name>dbtype</name> <value>Oracle</value> </Parameter> <Parameter> <name>host</name> <value>localhost</value> </Parameter> <Parameter> <name>port</name> <value>1521</value> </Parameter> <Parameter> <name>database</name> <value>orcl</value> </Parameter> <Parameter> <name>user</name> <value>foi</value> </Parameter> <Parameter> <name>schema</name> <value>foi</value> </Parameter> <Parameter> <name>passwd</name> <value>foi</value> </Parameter> </parameters> </DataStore> </sourceDataStores> <catalog>../../../schemas/catalog.xml</catalog> <targetTypes> <FeatureType> <schemaUri>http://schemas.opengis.net/citygml/1.0/cityGMLBase.xsd</schemaUri> </FeatureType> </targetTypes> <typeMappings> <FeatureTypeMapping> <sourceDataStore>citydb</sourceDataStore> <sourceType>BUILDING</sourceType> <targetElement>bld:Building</targetElement> <attributeMappings> <AttributeMapping> <targetAttribute> bld:Building </targetAttribute> <idExpression> <OCQL>getId()</OCQL> </idExpression> </AttributeMapping> </attributeMappings> </FeatureTypeMapping> </typeMappings> </as:AppSchemaDataAccess>
<?xml version="1.0" encoding="UTF-8"?> <as:AppSchemaDataAccess xmlns:as="http://www.geotools.org/app-schema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.geotools.org/app-schema AppSchemaDataAccess.xsd"> <namespaces> <Namespace> <prefix>gml</prefix> <uri>http://www.opengis.net/gml</uri> </Namespace> <Namespace> <prefix>core</prefix> <uri>http://www.opengis.net/citygml/1.0</uri> </Namespace> <Namespace> <prefix>xlink</prefix> <uri>http://www.w3.org/1999/xlink</uri> </Namespace> <Namespace> <prefix>gsml</prefix> <uri>urn:cgi:xmlns:CGI:GeoSciML:2.0</uri> </Namespace> <Namespace> <prefix>bld</prefix> <uri>http://www.opengis.net/citygml/building/1.0</uri> </Namespace> </namespaces> <includedTypes> <Include>Building.xml</Include> </includedTypes> <sourceDataStores> <DataStore> <id>citydb</id> <parameters> <Parameter> <name>dbtype</name> <value>Oracle</value> </Parameter> <Parameter> <name>host</name> <value>localhost</value> </Parameter> <Parameter> <name>port</name> <value>1521</value> </Parameter> <Parameter> <name>database</name> <value>orcl</value> </Parameter> <Parameter> <name>user</name> <value>foi</value> </Parameter> <Parameter> <name>schema</name> <value>foi</value> </Parameter> <Parameter> <name>passwd</name> <value>foi</value> </Parameter> </parameters> </DataStore> </sourceDataStores> <catalog>../../../schemas/catalog.xml</catalog> <targetTypes> <FeatureType> <schemaUri>http://schemas.opengis.net/citygml/1.0/cityGMLBase.xsd</schemaUri> </FeatureType> </targetTypes> <typeMappings> <FeatureTypeMapping> <sourceDataStore>citydb</sourceDataStore> <sourceType>CITYMODEL</sourceType> <targetElement>core:CityModel</targetElement> <attributeMappings> <AttributeMapping> <targetAttribute> core:CityModel </targetAttribute> <idExpression> <OCQL>getId()</OCQL> </idExpression> </AttributeMapping> <!-- <AttributeMapping> <targetAttribute> core:creationDate </targetAttribute> <sourceExpression> <OCQL>CREATION_DATE</OCQL> </sourceExpression> </AttributeMapping> --> <AttributeMapping> <targetAttribute> core:cityObjectMember </targetAttribute> <sourceExpression> <OCQL>'urn:ogc:def:nil:OGC:missing'</OCQL> <linkElement>bld:Building</linkElement> <linkField>gml:name</linkField> </sourceExpression> <isMultiple>true</isMultiple> </AttributeMapping> </attributeMappings> </FeatureTypeMapping> </typeMappings> </as:AppSchemaDataAccess>
<?xml version="1.0" encoding="UTF-8"?> <as:AppSchemaDataAccess xmlns:as="http://www.geotools.org/app-schema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.geotools.org/app-schema AppSchemaDataAccess.xsd"> <namespaces> <Namespace> <prefix>gml</prefix> <uri>http://www.opengis.net/gml</uri> </Namespace> <Namespace> <prefix>core</prefix> <uri>http://www.opengis.net/citygml/1.0</uri> </Namespace> <Namespace> <prefix>bld</prefix> <uri>http://www.opengis.net/citygml/building/1.0</uri> </Namespace> <Namespace> <prefix>xlink</prefix> <uri>http://www.w3.org/1999/xlink</uri> </Namespace> <Namespace> <prefix>gsml</prefix> <uri>urn:cgi:xmlns:CGI:GeoSciML:2.0</uri> </Namespace> </namespaces> <sourceDataStores> <DataStore> <id>citydb</id> <parameters> <Parameter> <name>dbtype</name> <value>Oracle</value> </Parameter> <Parameter> <name>host</name> <value>localhost</value> </Parameter> <Parameter> <name>port</name> <value>1521</value> </Parameter> <Parameter> <name>database</name> <value>orcl</value> </Parameter> <Parameter> <name>user</name> <value>foi</value> </Parameter> <Parameter> <name>schema</name> <value>foi</value> </Parameter> <Parameter> <name>passwd</name> <value>foi</value> </Parameter> </parameters> </DataStore> </sourceDataStores> <catalog>../../../schemas/catalog.xml</catalog> <targetTypes> <FeatureType> <schemaUri>http://schemas.opengis.net/citygml/1.0/cityGMLBase.xsd</schemaUri> </FeatureType> </targetTypes> <typeMappings> <FeatureTypeMapping> <sourceDataStore>citydb</sourceDataStore> <sourceType>CITYOBJECT</sourceType> <targetElement>core:_CityObject</targetElement> <attributeMappings> <AttributeMapping> <targetAttribute> core:_CityObject </targetAttribute> <idExpression> <OCQL>getId()</OCQL> </idExpression> </AttributeMapping> <AttributeMapping> <targetAttribute> gml:name </targetAttribute> <sourceExpression> <OCQL>LINEAGE</OCQL> </sourceExpression> </AttributeMapping> <AttributeMapping> <targetAttribute> core:creationDate </targetAttribute> <sourceExpression> <OCQL>CREATION_DATE</OCQL> </sourceExpression> </AttributeMapping> </attributeMappings> </FeatureTypeMapping> </typeMappings> </as:AppSchemaDataAccess>
------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d
_______________________________________________ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users