All, After two days I have hit a brick wall on this one. I run the following SQL in 11g. In geoserver I create a layer for both the View(SHAPE_POLY_LAYER) and the table(ORA_POLY_POINTS). If I try to preview the View's layer or hit the server with a WFS request I get the exception listed at the bottom. When I preview the table or WFS it I get perfect results. To me this totally says I am creating my view incorrectly but I can't figure out where my mistake is. Can/Will anyone confirm my error by running the SQL and see if you get the same problem OR (even better) point out what bone-headed mistake I am making?
Thx. in advance
Environment: 11g, Geoserver Dec 14 nightly with matching Oracle
extension. XP
-- Start SQL
DELETE FROM USER_SDO_GEOM_METADATA WHERE
USER_SDO_GEOM_METADATA.TABLE_NAME='ORA_POLY_POINTS';
DELETE FROM USER_SDO_GEOM_METADATA WHERE
USER_SDO_GEOM_METADATA.TABLE_NAME='SHAPE_POLY_LAYER';
DROP VIEW SHAPE_POLY_LAYER;
DROP INDEX ORA_POLY_POINTS_SHAPE_IDX;
DELETE FROM ORA_POLY_POINTS;
DROP TABLE ORA_POLY_POINTS;
CREATE TABLE ORA_POLY_POINTS(
NAME VARCHAR2(15),
INTVAL NUMBER(12,0),
ID NUMBER(3,0) PRIMARY KEY,
SHAPE MDSYS.SDO_GEOMETRY
);
INSERT INTO USER_SDO_GEOM_METADATA VALUES
(
'ORA_POLY_POINTS', -- TABLE_NAME
'SHAPE', -- COLUMN_NAME
SDO_DIM_ARRAY -- DIMINFO attribute for storing dimension bounds,
tolerance
(
SDO_DIM_ELEMENT
(
'LONGITUDE', -- DIMENSION NAME for first dimension
-180, -- SDO_LB for the dimension
180, -- SDO_UB for the dimension
0.5 -- Tolerance of 0.5 meters
),
SDO_DIM_ELEMENT
(
'LATITUDE', -- DIMENSION NAME for second dimension
-90, -- SDO_LB for the dimension
90, -- SDO_UB for the dimension
0.5 -- Tolerance of 0.5 meters
)
),
4326 -- SRID value for specifying a geodetic coordinate
system
);
CREATE INDEX ORA_POLY_POINTS_SHAPE_IDX ON ORA_POLY_POINTS (SHAPE)
INDEXTYPE IS MDSYS.SPATIAL_INDEX PARAMETERS
('SDO_INDX_DIMS=2,LAYER_GTYPE=POLYGON');
INSERT INTO ORA_POLY_POINTS VALUES
(
'Steve',
3,
'3',
SDO_GEOMETRY
(
2003, -- SDO_GTYPE format: D00T. Set to = POLYGON
4326, -- SDO_SRID
NULL, -- SDO_POINT attribute set to NULL
SDO_ELEM_INFO_ARRAY -- SDO_ELEM_INFO attribute (see Table 4-2 for
values)
(
1, -- Offset is 1
1003, -- For polygons, the element-type is 1003 (the T value in
SDO_GTYPE is 3).
1 -- For line strings and polygons, the interpretation is 1 if
the connectivity is by straight lines
),
SDO_ORDINATE_ARRAY -- SDO_ORDINATES attribute
(
-77.04487, 38.9043742, -- coordinates of first vertex
-77.046645, 38.9040983, -- other vertices
-77.04815, 38.9033127,
-77.049155, 38.9021368,
-77.049508, 38.9007499,
-77.049155, 38.899363,
-77.048149, 38.8981873,
-77.046645, 38.8974017,
-77.04487, 38.8971258,
-77.043095, 38.8974017,
-77.041591, 38.8981873,
-77.040585, 38.899363,
-77.040232, 38.9007499,
-77.040585, 38.9021368,
-77.04159, 38.9033127,
-77.043095, 38.9040983,
-77.04487, 38.9043742 -- coordinates of last vertex same as
first vertex
)
)
);
CREATE OR REPLACE FORCE VIEW SHAPE_POLY_LAYER ("ID", "GEOMETRY")
AS
SELECT ORA_POLY_POINTS.id, ORA_POLY_POINTS.SHAPE AS geometry FROM
ORA_POLY_POINTS WHERE ORA_POLY_POINTS.id != 0;
INSERT INTO USER_SDO_GEOM_METADATA VALUES
(
'SHAPE_POLY_LAYER', -- TABLE_NAME
'GEOMETRY', -- COLUMN_NAME
SDO_DIM_ARRAY -- DIMINFO attribute for storing dimension bounds,
tolerance
(
SDO_DIM_ELEMENT
(
'LONGITUDE', -- DIMENSION NAME for first dimension
-180, -- SDO_LB for the dimension
180, -- SDO_UB for the dimension
0.5 -- Tolerance of 0.5 meters
),
SDO_DIM_ELEMENT
(
'LATITUDE', -- DIMENSION NAME for second dimension
-90, -- SDO_LB for the dimension
90, -- SDO_UB for the dimension
0.5 -- Tolerance of 0.5 meters
)
),
4326 -- SRID value for specifying a geodetic coordinate
system
);
SELECT SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT(a.SHAPE, 0.5)
is_valid
FROM ORA_POLY_POINTS a
WHERE a.id=3;
-- END SQL
Stack Trace:
Caused by: org.vfny.geoserver.wms.WmsException: Rendering process failed
at
org.vfny.geoserver.wms.responses.DefaultRasterMapProducer.produceMap(Def
aultRasterMapProducer.java:405)
at
org.vfny.geoserver.wms.responses.GetMapResponse.execute(GetMapResponse.j
ava:444)
... 54 more
Caused by: java.lang.Exception: Exception rendering layer
FeatureCollectionMapLayer[ AnotherTry, VISIBLE, UNSELECTED,
style=StyleImpl[ name=point],
data=org.vfny.geoserver.global.geoserverfeaturesou...@1438980,
query=Query:
feature type: AnotherTry
filter: [Filter.INCLUDE AND Filter.INCLUDE]
[properties: ALL ]]
at
org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.jav
a:726)
at
org.geotools.renderer.shape.ShapefileRenderer.renderWithStreamingRendere
r(ShapefileRenderer.java:1563)
at
org.geotools.renderer.shape.ShapefileRenderer.paint(ShapefileRenderer.ja
va:1404)
at
org.vfny.geoserver.wms.responses.DefaultRasterMapProducer.produceMap(Def
aultRasterMapProducer.java:381)
... 55 more
Caused by: java.lang.RuntimeException: java.io.IOException
at
org.geotools.data.store.ContentFeatureCollection.iterator(ContentFeature
Collection.java:266)
at
org.geoserver.feature.RetypingFeatureCollection.iterator(RetypingFeature
Collection.java:47)
at
org.geotools.renderer.lite.StreamingRenderer.drawOptimized(StreamingRend
erer.java:1931)
at
org.geotools.renderer.lite.StreamingRenderer.processStylers(StreamingRen
derer.java:1815)
at
org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.jav
a:722)
... 58 more
Caused by: java.io.IOException
at
org.geotools.jdbc.JDBCFeatureSource.getReaderInternal(JDBCFeatureSource.
java:571)
at
org.geotools.data.store.ContentFeatureSource.getReader(ContentFeatureSou
rce.java:481)
at
org.geotools.data.store.ContentFeatureCollection.iterator(ContentFeature
Collection.java:263)
... 62 more
Caused by: java.sql.SQLException: ORA-29902: error in executing
ODCIIndexStart() routine
ORA-13208: internal error while evaluating [window SRID does not match
layer SRID] operator
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 333
GeoErrorPosted.sql
Description: GeoErrorPosted.sql
------------------------------------------------------------------------------ Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________ Geoserver-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
