Oracle Woes
Fernando Simon
fsimon at UNIVALI.BR
Fri Dec 23 04:04:36 PST 2005
Hi Christopher,
Just a little more question, did you defined the USING UNIQUE
<column> in your data definition? The query functions/mode only work
when you define a UNIQUE parameter. The <column> must store only
numbers, usually the primary key of the table. You can find more info
about it in the howto.
Best regards.
------------------------------------------
Fernando Simon
Mapserver and Oracle Spatial Developer
------------------------------------------
Citando Christopher Condit <condit at sdsc.edu>:
> Hi Fernando-
> I don't think this is a bug. When I looked at the MapServer
> Oracle
> documentation (the site seems to be down now) it only listed WFS
> as
> supported when using OGR to access Oracle. I switched the
> connection to
> OGR and WFS works great. When using the native client, however, I
> don't
> get any information through WFS. This may be more of a feature
> request
> than a bug.
>
> Thanks for all your help!
>
> Chris
>
> -----Original Message-----
> From: Fernando Simon [mailto:fsimon at univali.br]
> Sent: Thursday, December 22, 2005 4:49 PM
> To: Christopher Condit
> Subject: Re: [UMN_MAPSERVER-USERS] Oracle Woes
>
> Hi Christopher,
> Sorry, I never tested the WFS requests with native connection,
> I
> believe that Bart can answer this question. Bart are you already
> used
> the Oracle native connection with WFS requests?
> I want to recreate your problem here in my computer to find
> the
> bug and fix it. So, can you send me the WFS query that is
> returning
> the wrong result?
> Best regards.
>
> ------------------------------------------
> Fernando Simon
> Mapserver and Oracle Spatial Developer
> ------------------------------------------
>
>
> Citando Christopher Condit <condit at SDSC.EDU>:
>
> > Hi again-
> > Yes - I hadn't read that document with enough care. Seems to be
> > working
> > now, but I (of course) have one more question - the document
> seems
> > to
> > indicate that Oracle WFS support is only possible using the OGR
> > driver.
> > Is this true? I just get the bounding box when I attempt to get
> > WFS
> > data for my oracle layer.
> >
> > Thanks,
> >
> > Chris
> >
> > -----Original Message-----
> > From: Fernando Simon [mailto:fsimon at univali.br]
> > Sent: Thursday, December 22, 2005 2:14 PM
> > To: Christopher Condit
> > Cc: MAPSERVER-USERS at LISTS.UMN.EDU
> > Subject: RE: [UMN_MAPSERVER-USERS] Oracle Woes
> >
> > 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
> >
>
>
>
>
> -------------------------------------------------
> Univali - Webmail - http://webmail.univali.br
>
-------------------------------------------------
Univali - Webmail - http://webmail.univali.br
More information about the MapServer-users
mailing list