Oracle Woes

Fernando Simon fsimon at UNIVALI.BR
Thu Dec 22 14:14:01 PST 2005


Hi Christopher,
   What operations are you triyng to execute? Just draw a map with the
points? Or any query functions/modes?
   For native connection the actual extent is used to create the box
for the operators, in SDO_FILTER and SDO_RELATE. If you don't want to
use this operators you just need to specify USING NONE in your data
defnition.
   The link for native connection docs is:
http://mapserver.gis.umn.edu/docs/howto/oracle_spatial_howto
   Best regards.

------------------------------------------
Fernando Simon
Mapserver and Oracle Spatial developer
------------------------------------------

Citando Christopher Condit <condit at sdsc.edu>:

> Hi Fernando
> Thanks very much for your response.  I added the USING RELATE
> operator
> and dropped the projection definition from the layer, but still no
> success.  Any thoughts?  The database already contained lat/lon in
> float
> columns.  I create the spatial column with the following SQL:
> alter table SPECIES add (shape mdsys.sdo_geometry);
> update SPECIES 
>   set shape =
> MDSYS.SDO_GEOMETRY(2001,NULL,MDSYS.SDO_POINT_TYPE(latitude,
> longitude,
> NULL),NULL,NULL)
>   where latitude is not null and longitude is not null;
> INSERT INTO USER_SDO_GEOM_METADATA 
>   VALUES (
>   'SPECIES',
>   'SHAPE',
>   MDSYS.SDO_DIM_ARRAY(   -- 1440x720 grid
>     MDSYS.SDO_DIM_ELEMENT('X', 0, 1440, 0.005),
>     MDSYS.SDO_DIM_ELEMENT('Y', 0, 720, 0.005)
>      ),
>   NULL   -- SRID
> );
> alter session set sort_area_size = 20000000;
> create index shape_idx on SPECIES(shape) indextype is
> mdsys.spatial_index;
> 
> 
> Thanks,
> 
> Chris
> 
> -----Original Message-----
> From: UMN MapServer Users List
> [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
> Behalf Of Fernando Simon
> Sent: Thursday, December 22, 2005 12:54 PM
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: Re: [UMN_MAPSERVER-USERS] Oracle Woes
> 
> Hi Christopher,
>     How you added the data in your database? Using shp2sdo, if
> yes,
> after the import did you execute the MIGRATE function?
>     If are you trying to do query functions or modes like nquery,
> query, querybyattribute... You need to specify the RELATE operator
> in
> your data definition, in your case:
>     DATA "SHAPE FROM (SELECT SHAPE, SCIENTIFICNAME FROM SPECIES
> WHERE
> SCIENTIFICNAME ='Some name') USING RELATE"
>     Are you already tried to execute the same operations without
> projection definition?
>     Best regards
> 
> ------------------------------------------
> Fernando Simon
> Mapserver and Oracle Spatial developer
> ------------------------------------------
> 
> 
> Citando Christopher Condit <condit at SDSC.EDU>:
> 
> > Hi All-
> > 
> > I'm having tremendous problems getting Oracle 10g Spatial
> support
> > to
> > work with MapServer 4.8 (or 4.6 for that matter).
> > 
> > I've tried both the native driver and the OGR driver and shp2img
> > just
> > seems to hang - no error message.
> > 
> > This table has about 2 million records, with SDO point geometry
> and
> > a
> > spatial index.  The query returns about 100 records.
> > 
> > Am I doing something obviously wrong?
> > 
> > Ogrinfo does work, however, but I can't find any documentation
> on
> > how to
> > add the select statement to an OGR layer in the mapfile.  Does
> > anyone
> > have any idea how to accomplish this?
> > 
> >  
> > 
> > Any help would be greatly appreciated!
> > 
> >  
> > 
> > Here's my layer definition:
> > 
> > LAYER #Test of Oracle points
> > 
> >   NAME oracletest
> > 
> >   METADATA
> > 
> >     "wfs_title"    "SimpleOracleTest" ## REQUIRED
> > 
> >     "wfs_geometry_element_name" "shape"
> > 
> >     "gml_include_items" "all" 
> > 
> >   END
> > 
> >   TYPE POINT
> > 
> >   STATUS DEFAULT
> > 
> >   CONNECTIONTYPE oraclespatial
> > 
> >   CONNECTION "user/password"
> > 
> > #  CONNECTIONTYPE ogr
> > 
> > #  CONNECTION "OCI:user/password"
> > 
> >   DATA "SHAPE FROM (SELECT SHAPE, SCIENTIFICNAME FROM SPECIES
> > WHERE
> > SCIENTIFICNAME ='Some name')"
> > 
> >   CLASS
> > 
> >     COLOR        232 0 0
> > 
> >     OUTLINECOLOR 0 255 0
> > 
> >   END
> > 
> >   DUMP TRUE
> > 
> >   PROJECTION
> > 
> >     "init=epsg:4326"
> > 
> >   END
> > 
> > END #end of layer
> > 
> >  
> > 
> > Thanks,
> > 
> >  
> > 
> > Chris
> > 
> > 
> 
> 
> 
> 
> -------------------------------------------------
>   Univali - Webmail - http://webmail.univali.br
> 




-------------------------------------------------
  Univali - Webmail - http://webmail.univali.br



More information about the MapServer-users mailing list