[Mapserver-users] Displaying x-y Datasets using PHP/Mapscript

Paul Spencer spencer at dmsolutions.ca
Fri Feb 13 11:27:47 EST 2004


Jan,

mapserver is apparently bound to ogr directly and does not use all the 
functions exported by gdal11.dll so it is not sufficient to replace 
gdal11.dll, you must also have a mapserver that is built against the 
correct version of gdal.  ogrinfo may work when mapserver doesn't and 
this is a symptom of this.

Paul

Jan Vietmeier wrote:

> Hi,
> Thanks a lot for the Help. In the meantime I am able to dynamically add
> points to a layer using PHP/Mapscript, but the method suggested by Zak seems
> to be the best solution for my purpose.
> 
> Now I am wading through the manual
> http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?VirtualSpatialData and
> everythink is working fine including the step "Testing" ... the virtual data
> file ... "using ogrinfo". The implementation into Mapserver fails with the
> error Message "... [MapServer Error]: msOGRFileOpen(): Open failed for OGR
> connection `D:\www\data\shapes\punktquelle.ovf'. File not found or
> unsupported format ...".
> 
> In my opinion, this can have two reasons:
> 
> 1. My version of ogrinfo is from the openev_fw-Program downloaded at
> http://www.remotesensing.org and my mapserver-version is the binary-version
> from DM Solutions (mapserver-4.0-win32-php4.3.2.zip from 26-Aug-2003). Maybe
> my mapserver-version don't supports virtual layer.
> 
> How can I find out if my gdal11.dll supports the ogr-vrt format (does
> gdalxx.dll contains ogr?)
> 
> 2. There is someting wrong with my mapfile or punktquelle.ovf-file. Here
> some code-snipps:
> The virtual layer file:
> 
> <OGRVRTDataSource>
>     <OGRVRTLayer name="tbl_einsatz">
>         <SrcDataSource>ODBC:@myeinsatz</SrcDataSource>
>  	     <SrcTable>tbl_einsatz</SrcTable>
> 	     <GeometryType>wkbPoint</GeometryType>
> 	     <GeometryField encoding="PointFromColumns" x="x" y="y"/>
>     </OGRVRTLayer>
> </OGRVRTDataSource>
> 
> The Mapfile:
> 
>   LAYER
>     NAME "MyVirtualLayer"
>     TYPE POINT
>     CONNECTIONTYPE OGR
>     CONNECTION "D:\www\polizei\data\shapes\punktquelle.ovf" # the name and
> path to the virtual.ovf file, relative to shapepath may work?
>     DATA "tbl_einsatz" # the name of the OGRVrtLayer
>     STATUS ON
>     LABELITEM "Einsatz" #may need to use table.name or just name depending
> on your OVF file.
>     PROJECTION
>       "init=epsg:31468"
>     END
>     CLASS
>       SYMBOL 1
>       SIZE 6
>       COLOR 255 0 0
>       LABEL
> 	SIZE MEDIUM
> 	TYPE BITMAP
> 	COLOR 0 0 0
>       END
>     END
>   END
> 
> Does anyone have an idea?
> 
> Tanks,
> 
> Jan
> 
> 
> Jan Vietmeier, Diplom-Geograph
> Im Fichtenhain 18
> 51069 Köln
> 
> Tel.  +49 (0)221 9468252
> Mobil +49 (0)178 3744854
> Fax.  +49 (0)221 9468251
> 
> 
> 
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> 

-- 
  -----------------------------------------------------------------
|Paul Spencer                           spencer at dmsolutions.ca    |
|-----------------------------------------------------------------|
|Applications & Software Development                              |
|DM Solutions Group Inc                 http://www.dmsolutions.ca/|
  -----------------------------------------------------------------




More information about the mapserver-users mailing list