Creating SVG from Shapefile, Oracle Spatial, ArcSDE

Ivano Picco ivano.picco at AQUPI.TK
Wed Oct 6 05:56:32 PDT 2004


Hi all,
I'm a newbie user, I try to find the answer to my problems in the ML
archives, but i can't find anything for these questions:
I trying to build a new WebGis application that can be used instead ArcIMS
based ones to perform a reliable, robust and fast map rendering. I'm looking
to MapServer. Since 1 month I spent my time to learn it and test it in some
situations, such as rendering png, export WMS map and feature, rendering SVG
map.
In my test I see the best performance achieved by using shapefile, but I
have to use layer from different sources, also in the same time, like ArcSDE
or Oracle Spatial.
On rendering pngs, my benchmark from a shapefile (260 Mbyte, 198401
features) hits a 7,62 seconds spent to load all features. I know, this isn't
a real-world application, but i'm still in test-mode, however it's very good.
With ArcSDE the same layer tooks 40,73 seconds ( ArcIMS ~47 seconds). GREAT!
But with Oracle Spatial, the native support on MapServer 102,1 seconds and
the OGR 119,51!!!
Why?
When I compared the rendering time of a png and a SVG from the same layer
(352.708 byte and 3 features, maybe a real-world problem, isn't it?) I saw a
0,116 seconds for the png and 7,034 for SVG (!), what do I have to do to
speed up the SVG creation?
On "rendering"  SVGs, with a query on a QUERY layer like an example found on
ML, from Shapefile, ArcSDE and Oracle Spatial (2,7 Mbyte, 4886 features) the
time was respectively : 3,104 seconds, 19,110 seconds and about 11 minutes
!!! With top I see the CGI resources during an Oracle Spatial query: it
reachs about 700Mbyte of Physical Memory and 2,2 Gbyte of Stack..... what's
happened?
Using ogr2ogr it tooks 3 seconds to create a shapefile from Oracle Spatial
table containing the 260 Mbyte layer! with this I can bypass the problem
converting from Oracle to Shapefile, and using this as the QUERY Layer ( in
example above, this kind of application tooks 3,104 seconds (SVG rendering)
plus the time for conversion (milliseconds?), instead 11 minutes!). But it's
a very poor solution, isn't it?
What do I have to do to solve this performance problem?

Thanks for your help,
Ivano Picco

This is my configuration:

NAME DEMO
STATUS ON
SIZE 600 600
EXTENT 313263.000000 4879724.000000 517049.000000 5145994.000000
UNITS METERS

  DEBUG ON

WEB
  log "/tmp/CTR_map.log"
  IMAGEPATH '/home/mapserver/public_html/tmp/'
  IMAGEURL  'http://as2:18091/tmp/'
  TEMPLATE 'template.html'
  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://localhost.localdomain/mapserver_demos/itasca/demo_init.html"
    WMS_SRS "EPSG:32632"
  END
    HEADER 'header.svg'
    FOOTER 'footer.svg'
    QUERYFORMAT 'image/svg+xml'
END

LAYER
    NAME SVG_SDE
    STATUS ON
  CONNECTION "gea,port:5151,esri_sde,sde,sde"
  CONNECTIONTYPE SDE
  DATA "sde.fiumi,SHAPE"
    TYPE QUERY
    TEMPLATE county.svg
  METADATA
    WMS_TITLE "Regione SVG"
    WMS_ABSTRACT "Esempio per la generazione di SVG"
  END
END

LAYER
    NAME SVG_SDO
    STATUS ON
    CONNECTION "OCI:sdo/sdo at GEA"
    CONNECTIONTYPE OGR
    DATA "SELECT OBJECTID,GEOMETRY FROM fiumi"
    TYPE QUERY
    TEMPLATE county.svg
  METADATA
    WMS_TITLE "Regione SVG"
    WMS_ABSTRACT "Esempio per la generazione di SVG"
  END
END

LAYER
  NAME bound_10k
  TYPE POLYGON
  DATA shape/bound_10
  STATUS ON
  CLASS
    OUTLINECOLOR 0 0 255
    SIZE 4
  END
   METADATA
    WMS_TITLE "County Boundary"
    WMS_ABSTRACT "Example og County Boundary"
    WMS_SRS "EPSG:32632"
  END
END
END # Map File

My query is:
http://as2:18091/cgi-bin/mapserv?map=/home/mapserver/dati/CTR/CTR.map&mode=itemnquery&qitem=OBJECTID&qstring=/./&qlayer=SVG-SDO

My Application Server (as2):
Red Hat Linux Advanced Server release 2.1AS, kernel 2.4.9-e.3smp, 4 CPUs, 1
Gbyte RAM, 3Gbyte SWAP, Apache 1.3.26, MapServer 4.2.3



More information about the MapServer-users mailing list