Will,

I have a few more questions:

- Can you publish this table as a GeoServer simple feature? For example, 
can you use the GeoServer GUI to add a new data store for your database, 
publish the rivers_polyline layer, and make a WFS GML 3.1 request 
against it? This will help us diagnose whether it is the simple feature 
layer or the app-schema layer that is having problems.

- When you view the table as a GML 3.1 (WFS 1.1) simple feature, are the 
geometries correctly encoded?

- Are all your geometries in this column the same type? I don't think 
GeoServer will like a mix.

- Is this geometry column registered in geometry_columns? Bad Things 
Will Happen if it is not correctly registered.

Kind regards,
Ben.


On 09/12/10 00:09, will.rog...@stfc.ac.uk wrote:
> That was what we thought.  But we don't know why it's null.
>
> 'select count(*) from rivers_polyline where the_geom is null' gives 0.
>
> It now looks like we should be able to map a LineString on to the 
> GeometricPrimitivePropertyType, so we're not sure what else might be wrong.
>
> -----Original Message-----
> From: Ben Caradoc-Davies [mailto:ben.caradoc-dav...@csiro.au]
> Sent: 08 December 2010 05:35
> To: Rogers, Will (STFC,RAL,ESC)
> Cc: geoserver-users@lists.sourceforge.net
> Subject: Re: [Geoserver-users] app-schema mapping geometry column in PostGIS
>
> On 07/12/10 20:18, will.rog...@stfc.ac.uk wrote:
>> The exception I get is:
>> <ows:ExceptionText>
>> org.geotools.feature.IllegalAttributeException:http://www.opengis.net/gml:GeometricPrimitivePropertyType
>>  not nillable:null value:null
>> http://www.opengis.net/gml:GeometricPrimitivePropertyType not nillable
>> </ows:ExceptionText>
> [...]
>> Does anyone have any idea what's wrong with this?  I can provide more 
>> details if necessary.
>
> This error is caused by mapping a null from your database into a
> mandatory property. hy-p:geometry is a mandatory property of
> hy-p:SurfaceWaterType. The error is telling you that this property is
> not nillable and has a null value.
>
> What do you get for this?
> select count(1) from yourtablename where isnull(the_geom);
>
> app-schema supports conditional mappings of properties (even choosing
> between xlink:href and values) but I am not sure this will work in your
> case because geometries are handled as atomic types by GeoServer and
> app-schema has only limited ability to manipulate them:
> http://docs.geoserver.org/latest/en/user/data/app-schema/polymorphism.html
>


-- 
Ben Caradoc-Davies <ben.caradoc-dav...@csiro.au>
Software Engineering Team Leader
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

------------------------------------------------------------------------------
This SF Dev2Dev email is sponsored by:

WikiLeaks The End of the Free Internet
http://p.sf.net/sfu/therealnews-com
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to