[Mapserver-users] RE : OracleSpatial Error
nicolas.fortin at ec.gc.ca
nicolas.fortin at ec.gc.ca
Thu Jan 15 06:35:53 PST 2004
Hi again!
My Oracle problem on the server is not solved yet.
msDrawMap(): Image handling error. Failed to draw layer named '1_02'.
msOCIConnect() in msOracleSpatialLayerOpen(): OracleSpatial error.
More observations :
I can get an image with the shp2img utilities and the same mapfile.
I can make Oracle spatial query from SQL*Plus on the server without error.
I use the same layers and Oracle connection/user of this mapfile on my
workstation without error.
The error only appears when the request is made to the web server
I'm open to all kind of suggestions!
Thx
Nicolas
-----Message d'origine-----
De : nicolas.fortin at ec.gc.ca [mailto:nicolas.fortin at ec.gc.ca]
Envoyé : Tuesday, January 13, 2004 10:29 AM
À : nsavard at dmsolutions.ca; hjulien at nrcan.gc.ca
Cc : mapserver-users at lists.gis.umn.edu
Objet : RE : RE : RE : [Mapserver-users] WMS LAYERS= [SOLVED] But an Orac le
one too!
Problem solved!
The mapfile sent below is not exactly the right one, in the other, one group
has the same name as a layer. By renaming the group, all is back to normal.
Thx for your help!
Now we have a weird oracle error message from the server we're trying to
install mapserver, here it is:
msDrawMap(): Image handling error. Failed to draw layer named '1_02'.
msOCIConnect() in msOracleSpatialLayerOpen(): OracleSpatial error.
I searched the archive but found nothing...
An idea? Someone...
Nick
-----Message d'origine-----
De : nicolas.fortin at ec.gc.ca [mailto:nicolas.fortin at ec.gc.ca]
Envoyé : Tuesday, January 13, 2004 9:46 AM
À : nsavard at dmsolutions.ca
Cc : mapserver-users at lists.gis.umn.edu
Objet : RE : RE : [Mapserver-users] WMS LAYERS=
Hi Normand, thx for your answer!
No, you don't have access to it cause it's only intranet for the moment...
This afternoon, I'll try to place the layers like Heryk said to see if it
works.
Here's my wms request:
http://f044d065/mapserv/mapcmitest2.asp?REQUEST=GetMap&SERVICE=wms&VERSION=1
.1.1&Layers=2,1&BBOX=7610000,1222000,7622000,1234000
And my mapfile:
# ---------------------------------------------------------------------
# Mapserver 4.0 for Oracle
# Nicolas Fortin, Env Can nicolas.fortin at ec.gc.ca
# MapFile Test pour la CMI V1.4
# ---------------------------------------------------------------------
NAME IJC4
EXTENT 7610000 1222000 7622000 1234000 #Lac St-Louis
SIZE 425 425
SYMBOLSET 'C:\Inetpub\wwwroot\mapserv\symbols\symbols35.sym'
# Projection LCC de la CMI
PROJECTION
"proj=lcc"
"ellps=GRS80"
"lat_0=63"
"lon_0=-91.8666"
"lat_1=49"
"lat_2=77"
"x_0=6200000"
"y_0=2958000"
"datum=NAD83"
"units=m"
END
WEB
TEMPLATE defaultcmitest1.html
HEADER header.html
FOOTER footer.html
IMAGEPATH "C:/Inetpub/wwwroot/tmp/"
IMAGEURL "/tmp/"
METADATA
wms_title "WMS Quebec Node for IJC test2"
wms_onlineresource "http://f044d065/mapserv/mapcmitest2.asp?"
wms_contactelectronicmailaddress "nicolas.fortin at ec.gc.ca"
wms_contactperson "Nicolas Fortin"
wms_contactorganization "Environnement Canada, SMC-Hydrologie"
wms_contactposition "Programmeur, Analyste de données numériques"
wms_srs "EPSG:4326 EPSG:4269 EPSG:2145 EPSG:42304"
END
END
LEGEND
STATUS ON
LABEL
COLOR 0 0 0
SHADOWCOLOR 218 218 218
SHADOWSIZE 2 2
TYPE BITMAP
SIZE MEDIUM
POSITION CC
PARTIALS FALSE
BUFFER 2
END
END
REFERENCE
STATUS ON
IMAGE "c:\Inetpub\wwwroot\mapserv\images\ref_cmi_lite2.gif"
SIZE 150 150
EXTENT 7549910 1161398 7689518 1363371
COLOR -1 -1 -1
OUTLINECOLOR 255 0 0
END
LAYER
NAME "2"
TYPE POLYGON
CONNECTIONTYPE oraclespatial
CONNECTION "user/****@quebijc"
DATA "POLYGON FROM USR_WATERSHED.VWTRSD_LCC USING SRID 3000000"
STATUS OFF
DUMP TRUE
METADATA
wms_title "Quebec Watersheds"
wms_extent "7035577.31 1082076.03 7833285.05 1507787.39"
END
PROJECTION
"proj=lcc"
"ellps=GRS80"
"lat_0=63"
"lon_0=-91.8666"
"lat_1=49"
"lat_2=77"
"x_0=6200000"
"y_0=2958000"
"datum=NAD83"
"units=m"
END
CLASS
NAME "Watershed"
SYMBOL 'CIRCLE'
SIZE 2
COLOR 255 255 255
OUTLINECOLOR 0 204 0
END
END
LAYER
NAME "1"
TYPE LINE
CONNECTIONTYPE oraclespatial
CONNECTION "user/****@quebijc"
DATA "LINE FROM USR_SHORELINE.VSHORELINE_LCC USING SRID 3000000"
STATUS DEFAULT
GROUP "Shoreline"
DUMP TRUE
METADATA
wms_title "St. Lawrence River Detailed Shoreline"
wms_extent "7563132.5 1166237.24 7684888.9 1363371.77"
wms_group_title "Shoreline"
END
PROJECTION
"proj=lcc"
"ellps=GRS80"
"lat_0=63"
"lon_0=-91.8666"
"lat_1=49"
"lat_2=77"
"x_0=6200000"
"y_0=2958000"
"datum=NAD83"
"units=m"
END
CLASS
NAME "Detailed Shoreline"
COLOR 0 51 255
SYMBOL 'CIRCLE'
SIZE 1
END
END # Shoreline
END
-----Message d'origine-----
De : Normand Savard [mailto:nsavard at dmsolutions.ca]
Envoyé : Monday, January 12, 2004 5:05 PM
À : nicolas.fortin at ec.gc.ca
Cc : hjulien at nrcan.gc.ca; mapserver-users at lists.gis.umn.edu Objet : Re: RE :
[Mapserver-users] WMS LAYERS=
Hi,
I tried to replicate this problem without success by using our WMS
server used during the OGC compliance tests. I also used the OGC test
suite requests. I joined both the map file and the requests sent (see
below). Theses requests contain three layers. In the first request,
the "Forest" layer is drawn first. In the second request, the "Forest"
layer is drawn last. You can also see that I modified the mapfile to
set the "Forest" layer status to "DEFAULT". It does not seem to affect
the drawing order. But maybe I'm missing something. Do we have access
your WMS server? It is possible to have a copy of your mapfile and the
request you are currently sending?
Norm
The requests used are.
http://www2.dmsolutions.ca/cgi-bin/mswms_ogc_cite?VERSION=1.1.1&REQUEST=GetM
ap&LAYERS=Forests,Lakes,NamedPlaces&STYLES=&SRS=EPSG:4326&BBOX=-0.0042,-0.00
24,0.0042,0.0024&WIDTH=168&HEIGHT=96&FORMAT=image/gif
http://www2.dmsolutions.ca/cgi-bin/mswms_ogc_cite?VERSION=1.1.1&REQUEST=GetM
ap&LAYERS=NamedPlaces,Lakes,Forests&STYLES=&SRS=EPSG:4326&BBOX=-0.0042,-0.00
24,0.0042,0.0024&WIDTH=168&HEIGHT=96&FORMAT=image/gif
Our map file is as follow:
#
# Start of map file
#
# $Id: ogc_cite_wms_server.map,Exp $
#
NAME OGC_CITE
STATUS ON
SIZE 600 400
## EPSG:4326 extents
EXTENT -2 -2 -1 6
#EXTENT -0.0042 -0.0024 0.0042 0.0024
UNITS METERS
SHAPEPATH "../data/shapefile"
IMAGECOLOR 255 255 255
FONTSET ../etc/fonts.txt
SYMBOLSET ../etc/symbols.sym
#
# Start of web interface definition
#
WEB
# On Windows systems, /tmp and /tmp/ms_tmp/ should be created at the root #
of the drive where the .MAP file resides. #
IMAGEPATH "/tmp/ms_tmp/"
IMAGEURL "/ms_tmp/"
# LOG "/tmp/gmap.log"
METADATA
"WMS_TITLE" "cite:OGC_CITE WMS Server"
"WMS_ONLINERESOURCE"
"http://www2.dmsolutions.ca/cgi-bin/mswms_ogc_cite?"
"WMS_SRS" "EPSG:4326"
"OWS_SCHEMAS_LOCATION" "http://ogc.dmsolutions.ca"
"WMS_ACCESSCONTRAINTS" "none"
"WMS_FEES" "none"
END
END
PROJECTION
"init=epsg:4326"
END
QUERYMAP
SIZE 200 200
STATUS ON
STYLE HILITE
COLOR 255 0 0
END
#
# Start of layer definitions
#
LAYER
NAME BasicPolygons
TYPE POLYGON
STATUS OFF
DATA BasicPolygons
PROJECTION
"init=epsg:4326"
END
TEMPLATE "basicpolygons.html"
CLASS
NAME "BasicPolygons"
COLOR 194 194 194
END
METADATA
"WMS_TITLE" "cite:BasicPolygons"
"WMS_ABSTRACT" "BasicPolygons layer."
# "WMS_SRS" "EPSG:4326"
END
END # layer
LAYER
NAME DividedRoutes
TYPE LINE
STATUS ON
DATA DividedRoutes
PROJECTION
"init=epsg:4326"
END
CLASS
NAME "DividedRoutes"
COLOR 0 0 0
OUTLINECOLOR 0 0 0
SYMBOL 'circle'
SIZE 6
END
METADATA
"WMS_TITLE" "cite:DividedRoutes"
"WMS_ABSTRACT" "DividedRoutes layer."
"WMS_SRS" "EPSG:4326"
END
END # layer
LAYER
NAME DividedRoutes_anno
STATUS ON
DATA DividedRoutes
TYPE ANNOTATION
LABELITEM "NAME"
CLASS
NAME "DividedRoutesAnnotations"
COLOR 255 255 255
OUTLINECOLOR 0 0 0
SYMBOL 'routetag'
SIZE 40
OVERLAYSYMBOL "route75"
OVERLAYSIZE 15
OVERLAYCOLOR 0 0 0
LABEL
POSITION CC
COLOR 255 255 255
FONT fritqat
TYPE truetype
SIZE 0
PARTIALS false
END
END
METADATA
"WMS_TITLE" "DividedRoutes"
"WMS_ABSTRACT" "Divided routes layer."
"WMS_SRS" "EPSG:4326"
END
END # layer
LAYER
NAME MapNeatline
TYPE LINE
STATUS ON
DATA MapNeatline
PROJECTION
"init=epsg:4326"
END
CLASS
NAME "MapNeatline"
COLOR 0 0 0
SYMBOL 'circle'
SIZE 3
END
METADATA
"WMS_TITLE" "cite:MapNeatline"
"WMS_ABSTRACT" "MapNeatline layer."
"WMS_SRS" "EPSG:4326"
END
END # layer
LAYER
NAME NamedPlaces
TYPE POLYGON
STATUS ON
DATA NamedPlaces
PROJECTION
"init=epsg:4326"
END
LABELITEM "NAME"
CLASSITEM "NAME"
TEMPLATE "namedplaces.html"
CLASS
NAME "Ashton"
EXPRESSION "Ashton"
#COLOR 153 153 153
COLOR 192 192 192
OUTLINECOLOR 0 0 0
SIZE 8
LABEL
ANGLE AUTO
COLOR 0 0 0
BACKGROUNDCOLOR 192 192 192
FONT fritqat
TYPE truetype
SIZE 10
POSITION LR
OFFSET 10 10
PARTIALS FALSE
END
END
CLASS
NAME "Goose Island"
EXPRESSION "Goose Island"
COLOR 255 255 255
SIZE 8
TEXT "Goose | Island"
LABEL
ANGLE AUTO
COLOR 0 0 0
BACKGROUNDCOLOR 255 255 255
FONT fritqat
TYPE truetype
SIZE 4
POSITION CC
PARTIALS FALSE
WRAP "|"
END
END
METADATA
"WMS_TITLE" "cite:NamedPlaces"
"WMS_ABSTRACT" "NamedPlaces layer."
"WMS_SRS" "EPSG:4326"
END
END # layer
LAYER
NAME Ponds
TYPE POLYGON
STATUS ON
DATA Ponds
PROJECTION
"init=epsg:4326"
END
TEMPLATE "ponds.html"
CLASS
NAME "Ponds"
COLOR 0 255 255
OUTLINECOLOR 0 0 0
TEXT "Stock Pond"
LABEL
COLOR 0 0 0
FONT fritqat
TYPE truetype
SIZE 9
#POSITION AUTO
POSITION UC
PARTIALS FALSE
OFFSET 0 23
END
END
METADATA
"WMS_TITLE" "cite:Ponds"
"WMS_ABSTRACT" "Ponds layer."
"WMS_SRS" "EPSG:4326"
END
END # layer
LAYER
NAME RoadSegments
TYPE LINE
STATUS ON
DATA RoadSegments
PROJECTION
"init=epsg:4326"
END
LABELITEM "NAME"
CLASSITEM "NAME"
CLASS
NAME "MainStreet"
EXPRESSION "Main Street"
SYMBOL 'circle'
SIZE 3
COLOR 238 0 0
LABEL
ANGLE AUTO
COLOR 0 0 0
FONT fritqat-italic
TYPE truetype
SIZE 10
POSITION UC
PARTIALS FALSE
OFFSET 0 2
END
END
CLASS
NAME "Route5"
EXPRESSION "Route 5"
SYMBOL 'circle'
SIZE 3
COLOR 0 0 0
END
CLASS
NAME "Route75"
EXPRESSION "Dirt Road by Green Forest"
SYMBOL 'circle'
SIZE 5
#COLOR 255 255 0
COLOR 192 160 0
TEXT "Dirt Road"
LABEL
ANGLE 90
COLOR 0 0 0
FONT fritqat-italic
TYPE truetype
SIZE 10
POSITION AUTO
PARTIALS FALSE
#OUTLINECOLOR 255 255 255
OFFSET 0 5
END
END
METADATA
"WMS_TITLE" "cite:RoadSegments"
"WMS_ABSTRACT" "RoadSegments layer."
"WMS_SRS" "EPSG:4326"
END
END # layer
LAYER
NAME RoadSegments_anno
STATUS ON
DATA RoadSegments
TYPE ANNOTATION
CLASSITEM "FID"
LABELITEM "NAME"
CLASS
NAME "Route5NorthEastAnnotations"
EXPRESSION "104"
COLOR 255 255 255
OUTLINECOLOR 0 0 0
#OVERLAYCOLOR 0 0 0
SYMBOL 'routetag'
SIZE 25
OVERLAYSYMBOL "route5"
OVERLAYSIZE 15
OVERLAYCOLOR 0 0 0
LABEL
POSITION CC
COLOR 255 255 255
FONT fritqat
TYPE truetype
SIZE 0
PARTIALS false
END
END
CLASS
NAME "Route5WestAnnotations"
EXPRESSION "102"
COLOR 255 255 255
OUTLINECOLOR 0 0 0
#OVERLAYCOLOR 0 0 0
SYMBOL 'routetag'
SIZE 25
OVERLAYSYMBOL "route5"
OVERLAYSIZE 15
OVERLAYCOLOR 0 0 0
LABEL
POSITION CC
COLOR 255 255 255
FONT fritqat
TYPE truetype
SIZE 0
PARTIALS false
END
END
METADATA
"WMS_TITLE" "RoadSegments"
"WMS_ABSTRACT" "RoadSegments layer."
"WMS_SRS" "EPSG:4326"
END
END #Layer
LAYER
NAME Streams
TYPE LINE
STATUS ON
DATA Streams
PROJECTION
"init=epsg:4326"
END
LABELITEM "NAME"
CLASS
NAME "Streams"
COLOR 0 0 205
OUTLINECOLOR 199 199 199
SYMBOL 'circle'
SIZE 2
LABEL
ANGLE AUTO
COLOR 0 0 205
BACKGROUNDCOLOR 255 255 255
FONT fritqat-italic
TYPE truetype
SIZE 10
POSITION UC
PARTIALS FALSE
OFFSET 30 5
END
END
METADATA
"WMS_TITLE" "cite:Streams"
"WMS_ABSTRACT" "Streams layer."
"WMS_SRS" "EPSG:4326"
END
END # layer
LAYER
NAME Forests
TYPE POLYGON
# STATUS ON
STATUS DEFAULT
DATA Forests
PROJECTION
"init=epsg:4326"
END
TEMPLATE "forests.html"
CLASS
NAME "Forests"
COLOR 0 150 0
OUTLINECOLOR 0 0 0
MINSIZE 4
#SYMBOL "sapin"
SYMBOL "tree-gif"
SIZE 90
# OVERLAYSYMBOL "square"
# OVERLAYSIZE 50
# OVERLAYCOLOR -1 -1 -1
TEXT "State | Forest"
LABEL
ANGLE AUTO
COLOR 0 0 0
BACKGROUNDCOLOR 255 255 255
FONT fritqat
TYPE truetype
SIZE 18
POSITION AUTO
PARTIALS FALSE
WRAP "|"
OFFSET 100 -60
END
END
METADATA
"WMS_TITLE" "cite:Forests"
"WMS_ABSTRACT" "Forests layer."
"WMS_SRS" "EPSG:4326"
END
END # layer
LAYER
NAME Bridges
TYPE POINT
STATUS ON
DATA Bridges
PROJECTION
"init=epsg:4326"
END
LABELITEM "NAME"
CLASS
NAME "Bridges"
COLOR 0 0 0
SYMBOL 'bridge'
SIZE 40
LABEL
ANGLE AUTO
COLOR 0 0 0
FONT fritqat-italic
TYPE truetype
SIZE 10
POSITION AUTO
PARTIALS FALSE
OFFSET 20 -8
END
END
METADATA
"WMS_TITLE" "cite:Bridges"
"WMS_ABSTRACT" "Bridges layer."
"WMS_SRS" "EPSG:4326"
END
END # layer
LAYER
NAME Lakes
TYPE POLYGON
STATUS ON
DATA Lakes
PROJECTION
"init=epsg:4326"
END
TEMPLATE "lakes.html"
CLASS
NAME "Lakes"
COLOR 0 0 205
SIZE 8
TEXT "BLUE | LAKE"
LABEL
ANGLE AUTO
COLOR 255 255 255
FONT fritqat
TYPE truetype
SIZE 9
POSITION LL
PARTIALS FALSE
WRAP "|"
OFFSET 15 -10
FORCE true
END
END
METADATA
"WMS_TITLE" "cite:Lakes"
"WMS_ABSTRACT" "Lakes layer."
"WMS_SRS" "EPSG:4326"
END
END # layer
LAYER
NAME Buildings
TYPE POLYGON
STATUS ON
DATA Buildings
PROJECTION
"init=epsg:4326"
END
TEMPLATE "buildings.html"
CLASS
NAME "Buildings"
COLOR 255 255 255
OUTLINECOLOR 0 0 0
END
METADATA
"WMS_TITLE" "cite:Buildings"
"WMS_ABSTRACT" "Buildings layer."
"WMS_SRS" "EPSG:4326"
END
END # layer
LAYER
NAME BuildingCenters
TYPE POINT
STATUS ON
DATA BuildingCenters
PROJECTION
"init=epsg:4326"
END
CLASS
NAME "BuildingCenters"
COLOR 0 0 0
SYMBOL 'circle'
SIZE 4
END
METADATA
"WMS_TITLE" "cite:BuildingCenters"
"WMS_ABSTRACT" "BuildingCenters layer."
"WMS_SRS" "EPSG:4326"
END
END # layer
END # Map File
nicolas.fortin at ec.gc.ca wrote:
>Hi Heryk,
>
>Only the layer 1 is set to default, all other are set to OFF. I
>thought that doesn't matter in WMS cause you only got the layers you
>are querying.
>
>I set layer 1 to ON and
>1- try LAYERS=2,1 and only got layer 2
>2- try LAYERS=1 and got nothing
>
>I set layer 1 to OFF (like the others) and
>1- try LAYERS=2,1 and only got layer 2
>2- try LAYERS=1 and got nothing
>
>Weird...
>Nick
>
>-----Message d'origine-----
>De : Julien, Heryk [mailto:hjulien at nrcan.gc.ca]
>Envoyé : Monday, January 12, 2004 4:00 PM
>À : 'nicolas.fortin at ec.gc.ca'
>Objet : RE: [Mapserver-users] WMS LAYERS=
>
>
>Hi,
>Are your layers set to "default" in the mapfile? Is so, you will be
>calling layers 1,2 and all the layers that are set to default! So your
>might be calling layers 1 and 2 a second time around! Try setting them
>to "ON".
>
>Bonne chance!
>Héryk
>
>
>-----Message d'origine-----
>De : nicolas.fortin at ec.gc.ca [mailto:nicolas.fortin at ec.gc.ca] Envoyé :
>Monday, January 12, 2004 3:30 PM À : mapserver-users at lists.gis.umn.edu
>Objet
>: [Mapserver-users] WMS LAYERS=
>
>
>Hi list,
>
>When I make a WMS request with the layers parameters like LAYERS=2,1
>
>In accordance to the OGC WMS Spec, layer 1 is suppose to be at the top
>of layer 2 but it isn't the case...why??
>
>Even if I change to LAYERS=1,2 ... no change
>
>In the mapfile, layer 1 is at the end of the file and is always the top
>layer on others applications using this mapfile.
>
>
>Thx for your help,
>
>Nicolas Fortin
>Mathématicien, Programmeur, Analyste de données
>SMC-Québec Hydrologie, Environnement Canada
>1141, Rte de l'Église, Sainte-Foy(QC) G1V 4H5
>(418)648-2516
>nicolas.fortin at ec.gc.ca <mailto:nicolas.fortin at ec.gc.ca>
>
>_______________________________________________
>Mapserver-users mailing list
>Mapserver-users at lists.gis.umn.edu
>http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
>_______________________________________________
>Mapserver-users mailing list
>Mapserver-users at lists.gis.umn.edu
>http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
>
>
_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list