There is a need to display multiple layers from PostGIS each of which consists of few objects of different types -
i.e. 1) point 2)point,line 3) point,point,polygon etc. They are stored in database as Geometry Collection
records (1 row - 1 collection of items, geometry column is checked against GeometryCollection type).
When i try to do that implicitly without digging into geoserver’s infrastructure, i get map drawn without
errors, but there are only points on it, and features are unavailble (error : Relate Operation called with
LWGEOMCOLLECTION type. This is unsupported). I’m pretty sure that PostGIS isn’t the reason of problem
because all geometries are filled and correct, srid too. They are freely inserted and read from database. OpenLayers
seems to be not a problem too as they can output anything that is passed to them. I suspect there is a need to tweak
something in geoserver to receive proper output.
p.s. If i take one point out of each record elements array for testing purposes it works fine.
2010/11/16 Sky Line <sky.l1ne@anonymised.com>:
There is a need to display multiple layers from PostGIS each of which
consists of few objects of different types -
This is a question for the users list. Come back to this list only if you have
some code or documentation to contribute please.
i.e. 1) point 2)point,line 3) point,point,polygon etc. They are stored in
database as Geometry Collection
records (1 row - 1 collection of items, geometry column is checked against
GeometryCollection type).
When i try to do that implicitly without digging into
geoserver's infrastructure, i get map drawn without
errors, but there are only points on it, and features are unavailble (error
: Relate Operation called with
LWGEOMCOLLECTION type. This is unsupported). I'm pretty sure that PostGIS
isn't the reason of problem
because all geometries are filled and correct, srid too. They are freely
inserted and read from database. OpenLayers
seems to be not a problem too as they can output anything that is passed to
them. I suspect there is a need to tweak
something in geoserver to receive proper output.
p.s. If i take one point out of each record elements array for testing
purposes it works fine.
As far as I can see the error message comes from postgis and it's pretty
clear:
relate Operation called with LWGEOMCOLLECTION type. This is unsupported
Makes me think GeoServer is sending down a request that either involves
a intersection, contains, overlaps or similar filter, or there is a plain
bbox filter (which happens in getmap requests) and you have disabled the
"loose bbox" functionality.
In either case the limit is in PostGIS, and more in particular with GEOS
and its java equivalent, JTS. Neither of them can perform a relate
operation on geometry collections.
In fact this is the code of the JTS version (which GeoServer uses to
perform spatial operations in memory):
/**
* Returns the DE-9IM {@link IntersectionMatrix} for the two
<code>Geometry</code>s.
*
*@param other the <code>Geometry</code> with which to compare
this <code>Geometry</code>
*@return an {@link IntersectionMatrix} describing the
intersections of the interiors,
* boundaries and exteriors of the two <code>Geometry</code>s
*/
public IntersectionMatrix relate(Geometry g) {
checkNotGeometryCollection(this);
checkNotGeometryCollection(g);
return RelateOp.relate(this, g);
}
As you can see, first thing it checks neither of the members is a geometry
collection
I don't think there is anything we can do, if you really need this to
work you'll
have to fix GEOS (that requires C++ programming skills and a very
solid background
in computational geometry, there must be a reason why the JTS/GEOS people
did not want to venture into relates over geometry collections...)
Cheers
Andrea
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
--
-----------------------------------------------------
Ing. Andrea Aime
Senior Software Engineer
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584962313
fax: +39 0584962313
http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf
-----------------------------------------------------
On Wed, Nov 17, 2010 at 8:48 AM, Andrea Aime
<andrea.aime@anonymised.com> wrote:
i.e. 1) point 2)point,line 3) point,point,polygon etc. They are stored in
database as Geometry Collection
records (1 row - 1 collection of items, geometry column is checked against
GeometryCollection type).
When i try to do that implicitly without digging into
geoserver's infrastructure, i get map drawn without
errors, but there are only points on it, and features are unavailble (error
Btw, since you're just using WMS, you may want to try setting "loose bbox"
active on the postgis store configuration, that should avoid the usage
of the relate operation.
Cheers
Andrea
-----------------------------------------------------
Ing. Andrea Aime
Senior Software Engineer
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584962313
fax: +39 0584962313
http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf
-----------------------------------------------------
Thanks for advice, but it seems like it’s enabled by default, so i had it turned on. Anyway, to avoid above described problem i’ve changed an approach to storing of my stuff - i’ve made three tables of type multi (point,line,polygon), and inserted each element to table with its corresponding type so now i have 3 respective layers. I don’t have error while clicking on features on map, but still cant get proper drawing - multilines and multipolygons are displayed as points. Any ideas to fix this? I guess in this case the output must have been worked for sure without any changes to standard classes.
Date: Wed, 17 Nov 2010 08:50:34 +0100
Subject: Re: [Geoserver-devel] Displaying complex layers from PostGIS in geoserver
From: andrea.aime@anonymised.com
To: sky.l1ne@anonymised.com
CC: geoserver-devel@lists.sourceforge.netOn Wed, Nov 17, 2010 at 8:48 AM, Andrea Aime
andrea.aime@anonymised.com wrote:i.e. 1) point 2)point,line 3) point,point,polygon etc. They are stored in
database as Geometry Collection
records (1 row - 1 collection of items, geometry column is checked against
GeometryCollection type).
When i try to do that implicitly without digging into
geoserver’s infrastructure, i get map drawn without
errors, but there are only points on it, and features are unavailble (errorBtw, since you’re just using WMS, you may want to try setting “loose bbox”
active on the postgis store configuration, that should avoid the usage
of the relate operation.Cheers
Andrea
Ing. Andrea Aime
Senior Software EngineerGeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italyphone: +39 0584962313
fax: +39 0584962313http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf
2010/11/19 Sky Line <sky.l1ne@anonymised.com>:
Thanks for advice, but it seems like it's enabled by default, so i had it
turned on. Anyway, to avoid above described problem i've changed an approach
to storing of my stuff - i've made three tables of type multi
(point,line,polygon), and inserted each element to table with its
corresponding type so now i have 3 respective layers. I don't have error
while clicking on features on map, but still cant get proper drawing -
multilines and multipolygons are displayed as points. Any ideas to fix this?
I guess in this case the output must have been worked for sure without any
changes to standard classes.
It should have. Are you sure they style applied to each layer corresponds
to the geometry, that is, for example, that the polygon layer uses a
polygonsymbolizer?
A point symbolizer applies to all geometries and will depict them
extracting their
centroid
Cheers
Andrea
Date: Wed, 17 Nov 2010 08:50:34 +0100
Subject: Re: [Geoserver-devel] Displaying complex layers from PostGIS in
geoserver
From: andrea.aime@anonymised.com
To: sky.l1ne@anonymised.com
CC: geoserver-devel@lists.sourceforge.netOn Wed, Nov 17, 2010 at 8:48 AM, Andrea Aime
<andrea.aime@anonymised.com> wrote:
>> i.e. 1) point 2)point,line 3) point,point,polygon etc. They are stored
>> in
>> database as Geometry Collection
>> records (1 row - 1 collection of items, geometry column is checked
>> against
>> GeometryCollection type).
>> When i try to do that implicitly without digging into
>> geoserver's infrastructure, i get map drawn without
>> errors, but there are only points on it, and features are
>> unavailble (errorBtw, since you're just using WMS, you may want to try setting "loose bbox"
active on the postgis store configuration, that should avoid the usage
of the relate operation.Cheers
Andrea-----------------------------------------------------
Ing. Andrea Aime
Senior Software EngineerGeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italyphone: +39 0584962313
fax: +39 0584962313http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf-----------------------------------------------------
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
--
-----------------------------------------------------
Ing. Andrea Aime
Senior Software Engineer
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584962313
fax: +39 0584962313
http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf
-----------------------------------------------------