[mapserver-users] problem with oracle spatial layer not showi ng up

RRAMUHN, rramuhn at chu-rouen.fr
Wed Feb 13 10:10:29 EST 2002


Hello Bart,

I use MapServer with OracleSpatial and many layers with many objects with a
too high resolution (18 cm for half of France :-( ).

Actually building a 15 layers map with more than 5000 objects in my shown
window when the database contains more than 3.000.000 (either polygon, lines
or points )  takes me 18 seconds on win32 with a PIII 800 Mhz / 512 Mo. 

I have plenty of idea to make it much faster. But at this time you should
considerer if you do or not as many operations as I do on so many layers and
objects ? 

How large is your table ? Do you have a rtree index on the geometry ? 

Rgds

H/P

-----Message d'origine-----
De : Bart van den Eijnden [mailto:bart at geodan.nl]
Envoyé : mercredi 13 février 2002 14:19
À : mapserver-users at lists.gis.umn.edu; Rodrigo Cabral
Objet : Re: [mapserver-users] problem with oracle spatial layer not
showing up


Hi Rodrigo,

thanks, indeed it was the omission of a class which caused the problem.
I have the map now showing, but performance is really poor (22 seconds for
one map).
Do you have an indication of how performance should be and how to increase
performance?

Thanks in advance,
Bart

2/13/2002 3:05:38 PM, "Rodrigo Cabral" <cabral at yadata.net> wrote:

>Dear Bart (and other Oracle Spatial - SDO - users),
>
>The syntax for the mapfile DATA statement has been updated in order to
>support SRID definitions (looks like you're using a workaround I posted in
>the list sometime ago). Check your maporaclespatial.c for revision 1.8. The
>syntax is:
>
>DATA "shape FROM table" (as before)
>DATA "shape FROM table USING SRID srid_number" (new)
>DATA "shape FROM (SELECT stmt)" (as before)
>
>Syntax 2 accepts a SDO SRID number, which must be exactly the same number
>used in the SDO_SRID attribute for 'shape' in 'table'. Old code assumed the
>srid to be NULL, causing a SDO SRID mismatch error when using syntax 1 -
the
>workaround was to use syntax 3. However, syntax 3 is not recommended
because
>it returns ALL shapes from the SELECT stmt, regardless of the current image
>extent (therefore, making mapserver to draw/work-with non-visible
elements).
>Thus, Syntax 2 solves the mismatch error problem (performance-wise, syntax
1
>& 2 are equal except that syntax 1 uses a NULL srid for the query
statement,
>while syntax 2 has a defined srid).
>
>However, I don't think that is what is causing your problem.
>
>First of all, I believe I read somewhere that you must have a CLASS to be
>defined. Apparently you commented out the only class you had. So, try
>using simply (for polygons):
>
>CLASS
>  COLOR 128 128 128 # gray-filled
>  OUTLINECOLOR 0 0 0 # black contour
>END
>
>Secondly, there's the STATUS, which I believe should be DEFAULT to work.
Not
>sure on that, but you should try anyway...
>
>STATUS DEFAULT
>
>Finally, check EXTENT to see if it conforms to the data stored in your
>shapefile column (POLYGOON). Run this select statement to count how many
>shapes you should see in the default view.
>
>SELECT count(A.polygoon) FROM GGA_GEMEENTE_EFEMERIDEN A
>WHERE SDO_FILTER( A.polygoon, MDSYS.SDO_GEOMETRY(
>2003, <srid>, NULL,
>MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),
>MDSYS.SDO_ORDINATE_ARRAY( <x1>, <y1>, <x2>, <y2> )),
>'querytype=window') = 'TRUE'
>
>where:
>- <srid> should be your srid (or A.SDO_SRID);
>- <xi> and <yi> come from your EXTENTS (i.e. with your extents it would be
>x1=0; y1=275000; x2=365000; y2=700000)
>
>Cheers,
>Rod.
>
>----- Original Message -----
>From: "Bart van den Eijnden" <bart at geodan.nl>
>To: <mapserver-users at lists.gis.umn.edu>
>Cc: <bart at geodan.nl>
>Sent: Tuesday, February 12, 2002 2:50 PM
>Subject: [mapserver-users] problem with oracle spatial layer not showing up
>
>
>Hi,
>
>I have a problem with an Oracle Spatial layer not showing up. Can anybody
>please help? Thanks in advance!
>EPSG:29112 is the Dutch system (Rijksdriehoek a.k.a RD)
>
>In the logfile I get this:
>
>Tue Feb 12 18:22:12 2002,2200,192.168.3.141,DEMO,0,18458.421916
>323458.421916 346541.578084 651541.578084,182500.000000
>487500.000000,oracle_test ,normal execution
>
>The mapfile looks like this
>
>#
># Start of map file
>#
>NAME BART
>STATUS ON
>SIZE 600 600
>EXTENT 0 275000 365000 700000
>UNITS METERS
>SHAPEPATH "data"
>IMAGECOLOR 255 255 255
>
>#
># Start of web interface definition (including WMS enabling metadata)
>#
>WEB
>  HEADER demo_header.html
>  TEMPLATE demo.html
>  FOOTER demo_footer.html
>  MINSCALE 1000
>  MAXSCALE 1550000
>  IMAGEPATH "set in demo_init.html"
>  IMAGEURL "set in demo_init.html"
>  LOG "demo.log"
>  METADATA
>    WMS_TITLE "UMN MapServer Itasca Demo"
>    WMS_ABSTRACT "This is the UMN MapServer demonstration application for
>Itasca County located in north central Minnesota."
>    WMS_ACCESSCONSTRAINTS none
>
>    # change this value to match your setup
>    WMS_ONLINERESOURCE
>"http://bartsdt/mapserver_demos/itasca/demo_init.html"
>
>    WMS_SRS "EPSG:29112"
>  END
>END
>
>#
># Start of layer definitions
>#
>
>LAYER
>  NAME oracle_test
>  TYPE POINT
>  CONNECTIONTYPE oraclespatial
>  CONNECTION "robert/robert at des"
>  DATA "POLYGOON FROM (SELECT POLYGOON FROM GGA_GEMEENTE_EFEMERIDEN)"
>  STATUS ON
>  #LABELITEM "PVE_CODE"
>  #CLASSITEM "PVE_CODE"
>  #LABELMAXSCALE 500000
>  #CLASS
>  #  EXPRESSION /./
>  #  COLOR -1 -1 -1
> #   LABEL
> #    COLOR 0 0 0
>  #    SHADOWCOLOR 218 218 218
>  #    SHADOWSIZE 2 2
>  #    TYPE BITMAP
>  #    SIZE MEDIUM
>  #    POSITION CC
>  #    PARTIALS FALSE
>  #    BUFFER 2
>    END
>  END
>
>  METADATA
>    WMS_TITLE "Minor Civil Divisions"
>    WMS_ABSTRACT "Minor civil divisions for Itasca County. (annotation
>only)"
>    WMS_SRS "EPSG:29112"
>  END
>END
>
>
>
>--
>Bart van den Eijnden            Geodan IT BV
>Email: bart at geodan.nl           Buitenhaven 27-A
>Telefoon: 073-6925151           5211 TP 's-Hertogenbosch
>
>
>
--
Bart van den Eijnden            Geodan IT BV
Email: bart at geodan.nl           Buitenhaven 27-A
Telefoon: 073-6925151           5211 TP 's-Hertogenbosch




More information about the mapserver-users mailing list