[Mapserver-users] Oracle layer - labelling, querying and ORA spatial index problems

bartvde at xs4all.nl bartvde at xs4all.nl
Thu Feb 19 11:14:22 EST 2004


Hi,

1) the query functionality is not implemented at the moment when using the
native Oracle Spatial interface in Mapserver. If you use OGR to connect to
Oracle this should work. This needs a bit of compiling in OGR and
Mapserver.

2) labels should work, see the Wiki for an example:
http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?OracleSpatial

3) when you insert the metadata your first argument is 'body' and should
be the name of your table, i.e. 'bodysps'

INSERT INTO USER_SDO_GEOM_METADATA
 VALUES ('body', .....

Best regards,
Bart

> Hi list!
>
> I finally got my sample Oracle layer working. I am still encountering a
> few errors:
>
> 1. I am getting an error:
> "msOracleSpatialLayerGetShape(): OracleSpatial error. Function not
> implemented yet"
>
> when I try to make a query on the layer.
>
> 2. I am also not able to get the labels, based on some attributes of my
> spatial table, displayed.
>
>
> 3. A different one - this is more an Oracle problem, but I am getting
> desperate as I cannot get it solved... I am getting this errors while
> trying to make a spatial index on my table. No, I did not forget to make
> an entry in the metadata... SQL:
>
> CREATE TABLE bodysps (CBODU NUMBER PRIMARY KEY,NAZOV VARCHAR (32),X
> NUMBER,Y NUMBER,Z NUMBER,TOPO VARCHAR (32),shape MDSYS.SDO_GEOMETRY);
> commit;
>
>
> INSERT INTO bodysps
> VALUES(1,'GANP',-329391,-1201080,700,'1005.GIF',MDSYS.SDO_GEOMETRY(2001,
> NULL,MDSYS.SDO_POINT_TYPE(-329391,-1201080,NULL),NULL,NULL));
> INSERT INTO bodysps
> VALUES(2,'BBYS',-417261,-1226741,444,'1005.GIF',MDSYS.SDO_GEOMETRY(2001,
> NULL,MDSYS.SDO_POINT_TYPE(-417261,-1226741,NULL),NULL,NULL));
> INSERT INTO bodysps
> VALUES(3,'MOPI',-558922,-1256757,535,'1005.GIF',MDSYS.SDO_GEOMETRY(2001,
> NULL,MDSYS.SDO_POINT_TYPE(-558922,-1256757,NULL),NULL,NULL));
>
> ...
>
> -- metadata update
>
> INSERT INTO USER_SDO_GEOM_METADATA
> VALUES (
> 'body',
> 'shape',
> MDSYS.SDO_DIM_ARRAY(
> MDSYS.SDO_DIM_ELEMENT('X', 0, -591445, 0.005),
> MDSYS.SDO_DIM_ELEMENT('Y', 0, -1373146, 0.005),
> MDSYS.SDO_DIM_ELEMENT('Z', 0, 1000, 0.005)),
> NULL -- SRID
> );
>
>
> SQL> CREATE INDEX bodysps_idx
>   2  ON bodysps(shape)
>   3  INDEXTYPE IS MDSYS.SPATIAL_INDEX;
> CREATE INDEX bodysps_idx
> *
> ERROR v riadku 1:
> ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
> ORA-13249: Error executing stmt:  begin
> mdsys.prvt_idx.execute_insert(NULL,
> NULL, ' VALUES (''MDSYS'',''MDIDX_INIT'', 0, 0, 64, -1,
> NLS_UPPER(''MDRT_7992$''), ''BODYSPS_IDX'', 1, ''MDSYS'', ''"SHAPE"'',
> 0, 0, 3,
> 0, ''DEFAULT'', ''DEFAULT'', NULL,NULL, NULL, NULL, NULL, NULL, NULL, 2,
> ''DEFAULT'', 10, NULL, NULL, NULL, NULL, ''FALSE'', ''VALID'', NULL)',
> NULL);
> end;
> ORA-13249: Error in Spatial index: insert to metadata failed
> ORA-29400: data cartridge error
> ORA-00913: too many values
> ORA-06512: at "MDSYS.PRVT_IDX", line 5
> ORA-06512: at line 1
> ORA-06512: at "MDSYS.SDO_INDEX_METHOD_9I", line 7
> ORA-06512: at line 1
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>




More information about the mapserver-users mailing list