[Mapserver-users] Empty Map with Oracle spatial

Fernando S. simon at inf.univali.br
Thu Feb 26 06:54:14 PST 2004


This is a multi-part message in MIME format.
--------------040402050207060102060102
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hi Henrik
    I don't know if I can  help you, but I will try.
    Did you import the data to OracleSpatial from shapefile? If yes, did 
you execute this command in sqlplus?    (EXECUTE 
SDO_MIGRATE.TO_CURRENT('TABLE','GEOMETRY_COLUMN');
    If you execute your CGI passing layer=points, what it happens? Can 
you see an image?
        
http://willi1/scripts/mapserv.exe?map=/data/projects/spatial1/testora1.map&mode=map&layers=points
    Try to define one layer with status default and others with status 
off , I don't know if import, just try.
    Well, look the SDO_GTYPE in your databate. It's report type 3003.  
Three-dimensional polygon, I don't know if mapserv show this type. Try 
to pass this type to 2003 .

==================================================================
Fernando Simon - simon at cttmar.univali.br
==================================================================
DataBase Manager, Mapserver, OracleSpatial and PostGis Developer
G10 - Laboratório de Computação Aplicada
Fone: 047 - 341 7960
http://g10.cttmar.univali.br
==================================================================

Henrik Wilsdorf wrote:

>Hi, Mapserver-users!
>
>I'm trying to get a map from Oracle Spatial 9i (9.2), but only the shape
>layer 
>is visible in the image but no data (no polygon, no line, no point) from
>oracle.
>With the shape layers all works fine in different maps.
>No other errors occure, but one in MS_ERRORFILE:
>    Thu Feb 26 12:26:40 2004 - msBuildPath: Unable to access file.
>*** What does it mean???
> This error comes also, when I get a correct map without oracle layers.
>
>The Oracle connection is also o.k.
>When I have an error in the tablename I get the following text:
>
>msDrawMap(): Image handling error. Failed to draw layer named 'polygons'. 
>msOracleSpatialLayerWhichShapes(): OracleSpatial error. ORA-00942: Tabelle
>oder View nicht vorhanden . 
>SQL statement: SELECT rownum, GEOMETRY FROM POLYGONS1 
>WHERE SDO_FILTER( POLYGONS1.GEOMETRY, 
>MDSYS.SDO_GEOMETRY(2003, NULL, NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),
>MDSYS.SDO_ORDINATE_ARRAY(-40,0,440,400) ),'querytype=window') = 'TRUE' 
>
>With the corrected statement I got tho following data back in SQLplus:
>
>ROWNUM GEOMETRY(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO,
>SDO_ORDINATES)
>     1 SDO_GEOMETRY(3003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1),
>SDO_ORDINATE_ARRAY(50, 260, 0, 50, 90, 0, 120, 90, 0, 120, 260, 0, 50, 260, 0))
>     2 SDO_GEOMETRY(3003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1),
>SDO_ORDINATE_ARRAY(140, 80, 0, 340, 80, 0, 340, 150, 0, 140, 80, 0))
>     
>This should be a rectangle and a triangle. Both are also shown in the Oracle
>spatial advisor.
>The spatial data are created with autodesk Map 2004.
>I use Windows 2000 / IIS 5 and the binaries Mapserver 4.0.1 (PNG + Oracle)
>from mapserver.gis.umn.edu.
>The address I used in
>IE6:
>http://willi1/scripts/mapserv.exe?map=/data/projects/spatial1/testora1.map&mode=map
>
>My Mapfile:
>
>MAP
>  NAME "testora1"
>  STATUS ON
>  EXTENT 0 0 400 400 
>  SIZE 600 500 
>  SHAPEPATH "data"
>  SYMBOLSET "etc/symbols.sym"
>  FONTSET "etc/fonts.txt"
>  IMAGETYPE PNG
>  IMAGECOLOR 255 255 200
>  UNITS METERS
>  WEB
>    IMAGEPATH "/data/tmp/"
>    IMAGEURL "/tmp/"
>    LOG "/data/log/mslog.txt"
>  END
>  
>  LAYER
>      NAME "polygonshape"
>      STATUS DEFAULT
>      DATA "polygonshape"
>      TYPE POLYGON
>      CLASS
>        STYLE
>          COLOR 200 200 100
>          OUTLINECOLOR 1 1 1
>         END
>      END
>  END
>  
>  LAYER
>        NAME "polygons"
>        STATUS DEFAULT
>        DATA "GEOMETRY FROM POLYGONS"
>        TYPE POLYGON
>        CONNECTIONTYPE ORACLESPATIAL
>        CONNECTION "map1/abc at willi1"
>        CLASS
>          STYLE
>            COLOR 0 128 128
>            OUTLINECOLOR 1 1 1
>          END
>        END
>    END
>
>  LAYER
>    NAME "polylines"
>    STATUS DEFAULT
>    DATA "GEOMETRY FROM POLYLINES"
>    TYPE LINE
>    CONNECTIONTYPE ORACLESPATIAL
>    CONNECTION "map1/abc at willi1"
>    CLASS
>      STYLE
>        COLOR 0 0 255
>        SIZE 50
>      END
>    END
>  END
>  
>  LAYER
>    NAME "points"
>    STATUS DEFAULT
>    DATA "GEOMETRY FROM POINTS"
>    TYPE POINT
>    CONNECTIONTYPE ORACLESPATIAL
>    CONNECTION "map1/abc at willi1"
>    CLASS
>      STYLE
>        SYMBOL 13
>        COLOR 1 1 1
>        SIZE 50
>      END
>    END
>   END
>   
>END
>----------------
>Waiting for some help.
>
>Regards
>
>Henrik Wilsdorf
>
>  
>


--------------040402050207060102060102
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body>
<font face="Helvetica, Arial, sans-serif">Hi Henrik<br>
    I don't know if I can  help you, but I will try.<br>
    Did you import the data to OracleSpatial from shapefile? If yes,
did you execute this command in sqlplus?    (EXECUTE
SDO_MIGRATE.TO_CURRENT('TABLE','GEOMETRY_COLUMN');<br>
    If you execute your CGI passing layer=points, what it happens? Can
you see an image?<br>
       
<a class="moz-txt-link-freetext" href="http://willi1/scripts/mapserv.exe?map=/data/projects/spatial1/testora1.map&mode=map&layers=points">http://willi1/scripts/mapserv.exe?map=/data/projects/spatial1/testora1.map&mode=map&layers=points</a><br>
    Try to define one layer with status default and others with status
off , I don't know if import, just try.<br>
    Well, look the SDO_GTYPE in your databate. It's report type 3003. 
Three-dimensional polygon, I don't know if mapserv show this type. Try
to pass this type to 2003 .<br>
<br>
==================================================================
<br>
Fernando Simon - <a class="moz-txt-link-abbreviated"
 href="mailto:simon at cttmar.univali.br">simon at cttmar.univali.br</a> <br>
==================================================================
<br>
DataBase Manager, Mapserver, OracleSpatial and PostGis Developer
<br>
G10 - Laboratório de Computação Aplicada
<br>
Fone: 047 - 341 7960
<br>
<a class="moz-txt-link-freetext" href="http://g10.cttmar.univali.br">http://g10.cttmar.univali.br</a><br>
==================================================================</font>
<br>
<br>
Henrik Wilsdorf wrote:
<blockquote cite="mid12090.1077801762 at www38.gmx.net" type="cite">
  <pre wrap="">Hi, Mapserver-users!

I'm trying to get a map from Oracle Spatial 9i (9.2), but only the shape
layer 
is visible in the image but no data (no polygon, no line, no point) from
oracle.
With the shape layers all works fine in different maps.
No other errors occure, but one in MS_ERRORFILE:
    Thu Feb 26 12:26:40 2004 - msBuildPath: Unable to access file.
*** What does it mean???
 This error comes also, when I get a correct map without oracle layers.

The Oracle connection is also o.k.
When I have an error in the tablename I get the following text:

msDrawMap(): Image handling error. Failed to draw layer named 'polygons'. 
msOracleSpatialLayerWhichShapes(): OracleSpatial error. ORA-00942: Tabelle
oder View nicht vorhanden . 
SQL statement: SELECT rownum, GEOMETRY FROM POLYGONS1 
WHERE SDO_FILTER( POLYGONS1.GEOMETRY, 
MDSYS.SDO_GEOMETRY(2003, NULL, NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),
MDSYS.SDO_ORDINATE_ARRAY(-40,0,440,400) ),'querytype=window') = 'TRUE' 

With the corrected statement I got tho following data back in SQLplus:

ROWNUM GEOMETRY(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO,
SDO_ORDINATES)
     1 SDO_GEOMETRY(3003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1),
SDO_ORDINATE_ARRAY(50, 260, 0, 50, 90, 0, 120, 90, 0, 120, 260, 0, 50, 260, 0))
     2 SDO_GEOMETRY(3003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1),
SDO_ORDINATE_ARRAY(140, 80, 0, 340, 80, 0, 340, 150, 0, 140, 80, 0))
     
This should be a rectangle and a triangle. Both are also shown in the Oracle
spatial advisor.
The spatial data are created with autodesk Map 2004.
I use Windows 2000 / IIS 5 and the binaries Mapserver 4.0.1 (PNG + Oracle)
from mapserver.gis.umn.edu.
The address I used in
IE6:
<a class="moz-txt-link-freetext" href="http://willi1/scripts/mapserv.exe?map=/data/projects/spatial1/testora1.map&mode=map">http://willi1/scripts/mapserv.exe?map=/data/projects/spatial1/testora1.map&mode=map</a>

My Mapfile:

MAP
  NAME "testora1"
  STATUS ON
  EXTENT 0 0 400 400 
  SIZE 600 500 
  SHAPEPATH "data"
  SYMBOLSET "etc/symbols.sym"
  FONTSET "etc/fonts.txt"
  IMAGETYPE PNG
  IMAGECOLOR 255 255 200
  UNITS METERS
  WEB
    IMAGEPATH "/data/tmp/"
    IMAGEURL "/tmp/"
    LOG "/data/log/mslog.txt"
  END
  
  LAYER
      NAME "polygonshape"
      STATUS DEFAULT
      DATA "polygonshape"
      TYPE POLYGON
      CLASS
        STYLE
          COLOR 200 200 100
          OUTLINECOLOR 1 1 1
         END
      END
  END
  
  LAYER
        NAME "polygons"
        STATUS DEFAULT
        DATA "GEOMETRY FROM POLYGONS"
        TYPE POLYGON
        CONNECTIONTYPE ORACLESPATIAL
        CONNECTION "map1/abc at willi1"
        CLASS
          STYLE
            COLOR 0 128 128
            OUTLINECOLOR 1 1 1
          END
        END
    END

  LAYER
    NAME "polylines"
    STATUS DEFAULT
    DATA "GEOMETRY FROM POLYLINES"
    TYPE LINE
    CONNECTIONTYPE ORACLESPATIAL
    CONNECTION "map1/abc at willi1"
    CLASS
      STYLE
        COLOR 0 0 255
        SIZE 50
      END
    END
  END
  
  LAYER
    NAME "points"
    STATUS DEFAULT
    DATA "GEOMETRY FROM POINTS"
    TYPE POINT
    CONNECTIONTYPE ORACLESPATIAL
    CONNECTION "map1/abc at willi1"
    CLASS
      STYLE
        SYMBOL 13
        COLOR 1 1 1
        SIZE 50
      END
    END
   END
   
END
----------------
Waiting for some help.

Regards

Henrik Wilsdorf

  </pre>
</blockquote>
<br>
</body>
</html>

--------------040402050207060102060102--



More information about the MapServer-users mailing list