epicureanism / inspire-foss

Automatically exported from code.google.com/p/inspire-foss
GNU General Public License v3.0
0 stars 0 forks source link

gml_bounded_by column is NULL when inserting INSPIRE features with geometry #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.run webapps/deegree3 webapp and go to OGC client console 
(console/client/client.html)
2. insert INSPIRE features using Transaction INSERT requests 
3. inserts are OK but gml_bounded_by column in gml_objects table is not 
populated
4. GetCapabilities also gives error when there are  features are in the 
gml_objects table

ava.lang.ClassCastException: org.postgresql.util.PGobject cannot be cast to 
org.postgis.PGboxbase
    at org.deegree.feature.persistence.postgis.PostGISFeatureStore.getEnvelope(PostGISFeatureStore.java:325)
    at org.deegree.feature.persistence.postgis.PostGISFeatureStore.getEnvelope(PostGISFeatureStore.java:195)
    at org.deegree.services.wfs.GetCapabilitiesHandler.export110(GetCapabilitiesHandler.java:577)
    at org.deegree.services.wfs.GetCapabilitiesHandler.export(GetCapabilitiesHandler.java:174)
    at org.deegree.services.wfs.WFSController.doGetCapabilities(WFSController.java:690)
    at org.deegree.services.wfs.WFSController.doXML(WFSController.java:439)
    at org.deegree.services.controller.OGCFrontController.dispatchXMLRequest(OGCFrontController.java:700)
    at org.deegree.services.controller.OGCFrontController.doPost(OGCFrontController.java:475)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)

What is the expected output? What do you see instead?
I expect gml_bounded_by to have geometries and GetCapabilites with possibly 
bboxes

Please use labels and text to provide additional information.
It could be that the INSERT XML is not properly populated :

- does it require gml:boundedBy elements ?
- is the fact that the feature GML is in GML 3.2.1 but the NS is 3.1.1 an issue 
?

Original issue reported on code.google.com by jus...@gmail.com on 14 Sep 2010 at 10:19

GoogleCodeExporter commented 9 years ago
It looks like in PostGISFeatureStoreTransaction.java method 
findFeaturesAndGeometries()  the geometries are never found. At least line 517:
else if ( propertyValue instanceof Geometry ) {
                    findGeometries( (Geometry) propertyValue, geometries, gids );

is never hit when inserting an INSPIRE Address. The reason may be that the 
element <position> is not a geometry but its child is (the extra nesting 
sometimes in INSPIRE).

Original comment by jus...@gmail.com on 15 Sep 2010 at 10:29

GoogleCodeExporter commented 9 years ago
With CadastralParcel the geometry field is extracted from the Feature and a 
bbox is created and inserted, but somehow the bbox does not show up in the 
gml_bounded_by column. Very strange since the actaul INSERT SQL from the 
PostgreSQL log  looks OK (parm $4):

LOG:  00000: execute <unnamed>: INSERT INTO GML_OBJECTS 
(GML_ID,FT_TYPE,BINARY_OBJECT,GML_BOUNDED_BY) VALUES($1,$2,$3,$4)
DETAIL:  parameters: $1 = 'NL.KAD.CP.SDE02C 04130G0000', $2 = '45', $3 = 
'<cp:CadastralParcel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:ogc="http://www.opengis.net/ogc" 
xmlns:gml="http://www.opengis.net/gml/3.2" 
xmlns:xlink="http://www.w3.org/1999/xlink" 
xmlns:cp="urn:x-inspire:specification:gmlas:CadastralParcels:3.0" 
gml:id="NL.KAD.CP.SDE02C 04130G0000"><cp:beginLifespanVersion xsi:nil="true" 
nilReason="UNKNOWN"></cp:beginLifespanVersion><cp:endLifespanVersion 
xsi:nil="true" 
nilReason="UNKNOWN"></cp:endLifespanVersion><cp:geometry><!--Inlined geometry 
''NL.KAD.CP.SDE02C 04130G0000_G''--><gml:MultiSurface gml:id="NL.KAD.CP.SDE02C 
04130G0000_G" srsName="EPSG:4258"><gml:surfaceMember><gml:Surface 
gml:id="NL.KAD.CP.SDE02C 04130G0000_GS" 
srsName="EPSG:4258"><gml:patches><gml:PolygonPatch><gml:exterior><gml:LinearRing
><gml:posList>5.24720444 52.69016249 5.24723639 52.69016334 5.24723608 
52.69016711 5.24727910 52.69016808 5.24731934 52.69016899 5.24736001 
52.69016986 5.24740039 52.69017079 5.24744106 52.69017175 5.24748393 
52.69017270 5.24748410 52.69017001 5.24758068 52.69017268 5.24758746 
52.69008103 5.24741563 52.69007664 5.24727631 52.69007351 5.24721154 
52.69007164 5.24720845 52.69011190 5.24720444 
52.69016249</gml:posList></gml:LinearRing></gml:exterior></gml:PolygonPatch></gm
l:patches></gml:Surface></gml:surfaceMember></gml:MultiSurface></cp:geometry><cp
:inspireId><base:Identifier 
xmlns:base="urn:x-inspire:specification:gmlas:BaseTypes:3.2"><base:localId>SDE02
C 
04130G0000</base:localId><base:namespace>NL.KAD.CP</base:namespace></base:Identi
fier></cp:inspireId><cp:label>SDE02C 
04130G0000</cp:label><cp:nationalCadastralReference>SDE02C 
04130G0000</cp:nationalCadastralReference></cp:CadastralParcel>', $4 = 
'0103000000010000000500000078656D2923FD1440CCC17A4454584A402D201F9187FD1440CCC17
A4454584A402D201F9187FD14400A64429457584A4078656D2923FD14400A64429457584A4078656
D2923FD1440CCC17A4454584A40'

Original comment by jus...@gmail.com on 15 Sep 2010 at 11:59

GoogleCodeExporter commented 9 years ago
Oops all the above is not true !! gml_bounded_by IS populated in all cases. It 
just didn't show up with a value in phppgadmin when browsing the tables 
unexpanded.

Sorry for the confusion. We can close this issue...!

Original comment by jus...@gmail.com on 15 Sep 2010 at 12:04