Hi Ben & Sirko,
I have a look but have no luck in getting the app-schema wms layer work.
Here's what I had tested :
1) Created a new materialized view with spatial index in oracble db (base on
the borehole view)
2) Created a new point style base on the original point style, adding in the
correct namespace (file attached : complexFeaturePoint.xml)
3) Published the new materialized view as simple feature - able to view the wms
layer using open layer with complexFeaturePoint style.
3) Created a new layer.xml in folder where featuretype.xml store. (as attached)
4) Edit Borehole.xml : remove sa namespace and remove sa:sampledFeature and
sa:shape mapping.
5) With the above changes, wms getCapabilities return 2 available layers :
- <Layer queryable="1">
<Name>gsml:Borehole</Name>
<Title>Boreholes</Title>
<Abstract>This feature describes the existence, location and associated
metadata of drill holes contained within the data provider s
catalogues.</Abstract>
<KeywordList />
<CRS>EPSG:4326</CRS>
<CRS>CRS:84</CRS>
- <EX_GeographicBoundingBox>
<westBoundLongitude>112.8</westBoundLongitude>
<eastBoundLongitude>154.1</eastBoundLongitude>
<southBoundLatitude>-44.0</southBoundLatitude>
<northBoundLatitude>-8.9</northBoundLatitude>
</EX_GeographicBoundingBox>
<BoundingBox CRS="CRS:84" minx="112.8" miny="-44.0" maxx="154.1" maxy="-8.9"
/>
<BoundingBox CRS="EPSG:4326" minx="-44.0" miny="112.8" maxx="-8.9"
maxy="154.1" />
- <Style>
<Name>complexFeaturePoint</Name>
<Title>A boring default style</Title>
<Abstract>A sample style that just prints out a purple square</Abstract>
- <LegendURL width="20" height="20">
<Format>image/png</Format>
<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:type="simple"
xlink:href="http://localhost:8080/geoserver24Oct/ows?service=WMS&request=GetLegendGraphic&format=image%2Fpng&width=20&height=20&layer=Borehole"
/>
</LegendURL>
</Style>
</Layer>
- <Layer queryable="1">
<Name>test:MV_BOREHOLE</Name>
<Title>MV_BOREHOLE</Title>
<Abstract>test</Abstract>
<KeywordList />
<CRS>EPSG:4326</CRS>
<CRS>CRS:84</CRS>
- <EX_GeographicBoundingBox>
<westBoundLongitude>119.0</westBoundLongitude>
<eastBoundLongitude>145.562</eastBoundLongitude>
<southBoundLatitude>-41.904</southBoundLatitude>
<northBoundLatitude>-25.0</northBoundLatitude>
</EX_GeographicBoundingBox>
<BoundingBox CRS="CRS:84" minx="119.0" miny="-41.904" maxx="145.562"
maxy="-25.0" />
<BoundingBox CRS="EPSG:4326" minx="-41.904" miny="119.0" maxx="-25.0"
maxy="145.562" />
- <Style>
<Name>complexFeaturePoint</Name>
<Title>A boring default style</Title>
<Abstract>A sample style that just prints out a purple square</Abstract>
- <LegendURL width="20" height="20">
<Format>image/png</Format>
<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:type="simple"
xlink:href="http://localhost:8080/geoserver24Oct/ows?service=WMS&request=GetLegendGraphic&format=image%2Fpng&width=20&height=20&layer=MV_BOREHOLE"
/>
</LegendURL>
</Style>
</Layer>
6)Running the wms request for complex feature :
http://localhost:8080/geoserver24Oct/wms?request=getMap&layers=gsml:Borehole&width=256&height=256&format=image/png&bbox=119,-41.904,145.562,-25
Return java exception :
<ServiceExceptionReport version="1.3.0"
xsi:schemaLocation="http://www.opengis.net/ogc
http://localhost:8080/geoserver24Oct/schemas/wms/1.3.0/exceptions_1_3_0.xsd"><ServiceException
code="internalError">
Rendering process failed
Can't find source expression for: shape
</ServiceException></ServiceExceptionReport>
7) Tested running the URL from the GetCapabilities :
(Link 1)
http://localhost:8080/geoserver24Oct/ows?service=WMS&request=GetLegendGraphic&format=image%2Fpng&width=20&height=20&layer=Borehole
Getting error :
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE
ServiceExceptionReport SYSTEM
"http://localhost:8080/geoserver24Oct/schemas/wms/1.1.1/WMS_exception_1_1_1.dtd">
<ServiceExceptionReport version="1.1.1" > <ServiceException>
java.lang.UnsupportedOperationException: Sample non-simple feature not
yet supported.
Sample non-simple feature not yet supported.
</ServiceException></ServiceExceptionReport>
(Link 2)
http://localhost:8080/geoserver24Oct/ows?service=WMS&request=GetLegendGraphic&format=image%2Fpng&width=20&height=20&layer=MV_BOREHOLE
Successfully getting a red point.
Comments :
Couldn't figure out why the app-schema wms request for gsml:Borehole return
error for a shape, when there's no sa:shape in the mapping.
The documentation
http://docs.geoserver.org/latest/en/user/data/app-schema/wms-support.html is
missing something and require more information.
Regards,
Florence
-----Original Message-----
From: Ben Caradoc-Davies [mailto:[email protected]]
Sent: Thursday, 10 November 2011 10:25 AM
To: Sirko Schroeder
Cc: [email protected]
Subject: [ExternalEmail] Re: [Geoserver-users] app-schema WMS
Sirko,
please keep discussions on list so that everyone can benefit and contribute.
I cannot answer any of your questions at this time (looks like an
app-schema WMS bug), but Florence may have a look at it.
Kind regards,
Ben.
On 09/11/11 12:27, Sirko Schroeder wrote:
> Hi Ben,
>
> Thank you very much for your help I really do appreciate it.
>
> Ben Caradoc-Davies wrote:
>> Anyway, the magic sauce that is missing is the layer.xml file in the
>> same directory as the featuretype.xml. This defines the layer and the
>> style used to render it (as well as turning it on!).
>
> GeoServer can now find the layer but unfortunately my featureType causes
> another error: 'Can't find source expression for: shape'
>
> shape is defined like this:
>
> <AttributeMapping>
> <targetAttribute>sa:shape</targetAttribute>
> <idExpression>
> <OCQL>SHAPE_ID</OCQL>
> </idExpression>
> <sourceExpression>
> <OCQL>SHAPE</OCQL>
> </sourceExpression>
> <targetAttributeNode>gml:LineStringPropertyType</targetAttributeNode>
> </AttributeMapping>
>
> I do not want to use the shape anyway. Is there a way to specify which
> geometry of a featureType should be used to create the WMS layer?
> I really only want to show the
> gsml:collarLocation/gsml:BoreholeCollar/gsml:location
> Points on the WMS layer.
>
> I have attached the Borehole directory from the gsml workspace. It also
> Contains the returned error message (app-schema-wms.error-1.xml).
>
> Kind Regards,
> Sirko
>
> p.s. Do you know there to look for the layer.xml documentation?
>
> --
> Database Support Officer - Northern Territory Geological Survey
> Phone: (08) 8999 5148 Fax: (08) 8999 6824
> email: [email protected]
--
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
<style>
<id>StyleInfoImpl--5e24bbbb:12a9d7cff4e:-8000</id>
<name>complexFeaturePoint</name>
<sldVersion>
<version>1.0.0</version>
</sldVersion>
<filename>default_point.sld</filename>
</style><layer>
<name>gsmlBoreholeWMSLayer</name>
<id>gsml_Borehole_wms_layer</id>
<type>VECTOR</type>
<defaultStyle>
<id>StyleInfoImpl--5e24bbbb:12a9d7cff4e:-8000</id>
</defaultStyle>
<resource class="featureType">
<id>gsml_borehole_featuretype</id>
</resource>
<enabled>true</enabled>
<attribution>
<logoWidth>0</logoWidth>
<logoHeight>0</logoHeight>
</attribution>
</layer>
------------------------------------------------------------------------------
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