OGR Virtual

Eijnden, B. van den (Bart) b.vdeijnden at AGI.RWS.MINVENW.NL
Wed Dec 21 01:42:29 EST 2005


Hi,

you might want to put Mapserver and OGR debugging on. Make sure Mapserver is
built with debug info (DEBUG=MSDEBUG when you do mapserv -v)

1) define an environment variable MS_ERRORFILE with a value of stderr (if
you have Apache do it in the httpd.conf with SetEnv, debugging will end up
in the Apache error log file)

2) add CONFIG CPL_DEBUG "ON" to your MAP object in your MAP file, this will
put GDAL/OGR debugging on.

3) add DEBUG ON to your LAYER

Btw, if you have PostgreSQL why not use PostGIS?

Best regards,
Bart

-----Oorspronkelijk bericht-----
Van: UMN MapServer Users List
[mailto:MAPSERVER-USERS at LISTS.UMN.EDU]Namens Frank Fica
Verzonden: woensdag 21 december 2005 7:10
Aan: MAPSERVER-USERS at LISTS.UMN.EDU
Onderwerp: [UMN_MAPSERVER-USERS] OGR Virtual


Hello,

I've been trying to map a non-spatial postgre table with ogr via ODBC but no
success. There must
be a simple solution to what I'm missing and I haven't been able to figure
it out. My other layers
do render but my Virtual layer doesn't. When I test in ogrinfo I can connect
but when I try to map
in mapserver the image is blank, only my mapinfo layer renders.

Does someone has any suggestions on what I'm missing?

Here are is my ovf file:

<OGRVRTDataSource>
    <OGRVRTLayer name="sorento">
        <SrcDataSource>ODBC:@PostgreSQL,sorento</SrcDataSource>
        <SrcLayer>sorento</SrcLayer>
        <GeometryType>wkbPoint</GeometryType>
        <GeometryField encoding="PointFromColumns" x="Lon" y="Lat"/>
    </OGRVRTLayer>
</OGRVRTDataSource>

and map file:

MAP
  IMAGETYPE PNG
  EXTENT -90.760314 14.252771 -90.210352 14.937117
  SIZE 640 480
  UNITS METERS

  SYMBOL
   NAME "circle"
   TYPE ELLIPSE
   POINTS
    1 1
   END
   FILLED TRUE
  END

 LAYER
  NAME "ciudad"
  TYPE POLYGON
  STATUS ON
  CONNECTIONTYPE OGR
  CONNECTION "/var/www/html/guatemala/data/ciudad.tab"
  STYLEITEM "AUTO"
    CLASS
      NAME "Ciudad"
    END
 END

 LAYER
    NAME "sorento"
    TYPE POINT
    CONNECTIONTYPE OGR
    CONNECTION "virtual.ovf"
    DATA "sorento"
    STATUS DEFAULT
    CLASS
      STYLE
      SYMBOL 'circle'
      SIZE 30
      COLOR 255 0 0
      END
     END
 END
END

Disclaimer
************************************************************************
Aan dit bericht kunnen geen rechten worden ontleend. Dit bericht is
uitsluitend bestemd voor de geadresseerde. Als u dit bericht per abuis
hebt ontvangen, wordt u verzocht het te vernietigen en de afzender te 
informeren. Wij adviseren u om bij twijfel over de juistheid of de 
volledigheid van de mail contact met afzender op te nemen.

This message shall not constitute any rights or obligations.
This message is intended solely for the addressee.
If you have received this message in error, please delete it and
notify the sender immediately. When in doubt whether this message
is correct or complete, please contact the sender.
************************************************************************



More information about the mapserver-users mailing list