[Mapserver-users] Help with OracleSpatial Query...

Becher, Richard RichardBecher at SierraSystems.com
Thu May 15 11:58:54 EDT 2003


Thanks Michael,

Since I am new, would you (or someone) be able to guide me on how to use OGR.  I am pretty sure I compiled Mapserver to include it already which, if I am not mistaken is GDAL?

I want the most efficient/best way to get and display my data from the Oracle database using MapServer...

Again, all help is greatly appreciated!

Cheers,

Richard

-----Original Message-----
From: Michael Schulz [mailto:mschulz at webgis.de] 
Sent: Thursday, May 15, 2003 11:47 AM
To: Becher, Richard
Cc: Mapserver-users at lists.gis.umn.edu
Subject: Re: [Mapserver-users] Help with OracleSpatial Query...

Hi,
as far as i know, oracle layers that are connected via the native
mapserver oraclespatial connection, cannot be queried at the moment.
This is still work in progress. Probably the ogr/oraclespatial
connection type will give you more opportunities.

ttt_query.html is a dummy name for the template used to present any
query results. You will have to create a template similar to the
template you use in the web section and add to that new template some
mapserver directives that will be replaced during the query result
processing, see the documentation on the mapserver template system,
especially the part on queries.

Cheers, Michael

"Becher, Richard" schrieb:

> Hi there,
>
> I am now trying to query some simple point data in an Oracle database
> using Mapserver.
>
> It seems I am connecting to the database properly and I do not get any
> errors.
>
> However, there are no points (data) showing up on my map.
>
> My "Points" layer is the last one in the map file and I have included
> it here.You will notice that I have commented out a few things (mainly
> because I don't know how to properly use them) - i.e. LabelItem,
> CLASSITEM, EXPRESSION, TEMPLATE.
>
> Can someone help me figure out how to properly query data in an Oracle
> database (using Windows 2000, IIS, MapServer and Oracle 8i with
> Spatial Cartridge)?
>
> Also, how are templates supposed to be used?In other layers (from
> sample data) there is a reference to ttt_query.html as a template ---
> but that file does not exist on my machine...
>
> Here is a couple of records in the referenced table:
>
> PLACE_ID529
>
> VERSION_NO1
>
> LATLONGPOINT.SDO_GTYPE1
>
> LATLONGPOINT.SDO_SRID8265
>
> LATLONGPOINT.SDO_POINT.X51
>
> LATLONGPOINT.SDO_POINT.Y-116
>
> LATLONGPOINT.SDO_POINT.Z
>
> LATLONGPOINT.SDO_ELEM_INFO<Collection>
>
> LATLONGPOINT.SDO_ORDINATES<Collection>
>
> PLACE_ID530
>
> VERSION_NO1
>
> LATLONGPOINT.SDO_GTYPE1
>
> LATLONGPOINT.SDO_SRID8265
>
> LATLONGPOINT.SDO_POINT.X48
>
> LATLONGPOINT.SDO_POINT.Y-123
>
> LATLONGPOINT.SDO_POINT.Z
>
> LATLONGPOINT.SDO_ELEM_INFO<Collection>
>
> LATLONGPOINT.SDO_ORDINATES<Collection>
>
> PLACE_ID533
>
> VERSION_NO1
>
> LATLONGPOINT.SDO_GTYPE1
>
> LATLONGPOINT.SDO_SRID8265
>
> LATLONGPOINT.SDO_POINT.X44
>
> LATLONGPOINT.SDO_POINT.Y-76
>
> LATLONGPOINT.SDO_POINT.Z
>
> LATLONGPOINT.SDO_ELEM_INFO<Collection>
>
> LATLONGPOINT.SDO_ORDINATES<Collection>
>
> And here is the layer...
>
> LAYER
>
> NAME "Historical Sites"
>
> METADATA
>
> "DESCRIPTION""Historical Sites"
>
> END
>
> CONNECTIONTYPE oraclespatial
>
> CONNECTION 'user/pw at db'
>
> DATA "LatLongPoint from (Select Place_Id, LatLongPoint from
> CRHP_SPATIAL)"
>
> TYPE POINT
>
> STATUS ON
>
> #LabelItem "Place_Id"
>
> #CLASSITEM "Place_Id"
>
> CLASS
>
> NAME "Historical Sites"
>
> #EXPRESSION /./
>
> SYMBOL 2
>
> SIZE 8
>
> COLOR 255 0 0
>
> LABEL
>
> SIZE MEDIUM
>
> COLOR 255 0 0
>
> FORCE TRUE
>
> OFFSET 10 10
>
> END
>
> #TEMPLATE "oraclequery.html"
>
> END
>
> Many thanks in advance for your help and time!
>
> Cheers,
>
> Richard Becher
>
--
-----------------------------------------------------------
Michael Schulz                                in medias res
Dipl.-Geologe                              Gesellschaft für
                                Informationstechnologie mbH
                             Sautierstr. 38, 79104 Freiburg
                                     0761 55695-95 (Fax 96)
mschulz at webgis.de                             www.webgis.de






More information about the mapserver-users mailing list