[Mapserver-users] Re: VirtualSpatialData (OGR Connectiontype)

Julien, Heryk hjulien at nrcan.gc.ca
Thu Jan 22 07:24:17 PST 2004


Hi to all,

I replaced my version of Mapserver with a precompiled one. I also installed
the latest  version of gdal11.dll and ogrinfo from the OpenEV_FW zip.

As suggested by Frank Warmerdam I used the following SrcDataSource tag in
the virtual file:
<SrcDataSource>ODBC:MGWI_MAPSERVER</SrcDataSource>. MGWI_MAPSERVER is the
DSN for my ODBC data source.

Here is the orginfo output:

D:\WebScripts\MapServer>ogrinfo --formats
Loaded OGR Format Drivers:
  -> "ESRI Shapefile" (read/write)
  -> "UK .NTF" (readonly)
  -> "SDTS" (readonly)
  -> "TIGER" (read/write)
  -> "S57" (read/write)
  -> "MapInfo File" (read/write)
  -> "DGN" (read/write)
  -> "VRT" (readonly)
  -> "AVCBin" (readonly)
  -> "REC" (readonly)
  -> "Memory" (read/write)
  -> "GML" (read/write)
  -> "ODBC" (read/write)
  -> "OGDI" (readonly)
  -> "FMEObjects Gateway" (readonly)

D:\WebScripts\MapServer>ogrinfo
D:\webCGCq\lcnp\mapserver_demo\maritimes\data\shp\geo83\mgwi.ovf
ERROR 4: Update access not supported for VRT datasources.
Had to open data source read-only.
INFO: Open of
`D:\webCGCq\lcnp\mapserver_demo\maritimes\data\shp\geo83\mgwi.ovf'
using driver `VRT' successful.
1: MGWI_TBLLOC (Point)

When I execute Mapserver I got the following message:
msDrawMap(): Image handling error. Failed to draw layer named 'MGWI_TBLLOC'.

msOGRFileOpen(): OGR error. Open failed for OGR connection `mgwi.ovf'. File
not found or unsupported format. 



Thanks for the help

Héryk



-----Message d'origine-----
De : Normand Savard [mailto:nsavard at dmsolutions.ca]
Envoyé : Wednesday, January 21, 2004 5:26 PM
À : Julien, Heryk
Cc : 'spencer at dmsolutions.ca'; 'Mapserver-users at lists.gis.umn.edu';
Anctil, Martin
Objet : Re: [Mapserver-users] Re: VirtualSpatialData (OGR
Connectiontype)


Julien,

Just because I do not know all the steps you have done, can you tell me 
if you were able to have some output form "ogrinfo" command?

Norm

Julien, Heryk wrote:

>Hi Paul,
>What do I write in the virtual file SrcDataSource tag when I log on a
Access
>db with no user restrictions and pass word?
>I've tried the following combinations without success:
>
><SrcDataSource>ODBC:MGWI_MAPSERVER</SrcDataSource>
><SrcDataSource>ODBC:@MGWI_MAPSERVER</SrcDataSource>
><SrcDataSource>ODBC:/@MGWI_MAPSERVER</SrcDataSource>
><SrcDataSource>ODBC:administor/@MGWI_MAPSERVER</SrcDataSource> 
><SrcDataSource>ODBC:administeur/@MGWI_MAPSERVER</SrcDataSource>
>
>Thanks
>Héryk
>
>
>-----Message d'origine-----
>De : Paul Spencer [mailto:pagameba at magma.ca]
>Envoyé : Wednesday, January 21, 2004 1:43 PM
>À : Julien, Heryk
>Cc : 'spencer at dmsolutions.ca'; 'Mapserver-users at lists.gis.umn.edu';
>Anctil, Martin
>Objet : [Mapserver-users] Re: VirtualSpatialData (OGR Connectiontype)
>
>
>I believe there is a limitation in the OGR OBDC connection that requires 
>that you provide a user name and password in the OVF file (I think that 
>is mentioned in the wiki also).
>
>Cheers,
>
>Paul
>
>Julien, Heryk wrote:
>  
>
>>Hi,
>>I'm trying out the Virtual Spatial Data procedure in MapServerWiki
>>(http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?VirtualSpatialData) with IIS
>>and an Access 2000 ODBC connection.
>>
>>I keep on getting the following error message when I attempt ton see my
>>    
>>
>map:
>  
>
>>msDrawMap(): Image handling error. Failed to draw layer named
>>    
>>
>'MGWI_TBLLOC'.
>  
>
>>msOGRFileOpen(): OGR error. Open failed for OGR connection `mgwi.ovf'.
>>    
>>
>File
>  
>
>>not found or unsupported format.
>>
>>Anyone can help me?
>>
>>
>>
>>Here is my virtual file (mgw.ovf):
>>
>><OGRVRTDataSource>
>>    <OGRVRTLayer name="MGWI_TBLLOC">
>>        <SrcDataSource>ODBC:MGWI_MAPSERVER</SrcDataSource> 
>> 	<SrcLayer>tblloc</SrcLayer> 
>>	<GeometryType>wkbPoint</GeometryType>
>>	<!-- LayerSRS>WGS84</LayerSRS !-->         
>>	<GeometryField encoding="PointFromColumns" x="x" y="y"/> 
>>    </OGRVRTLayer>
>></OGRVRTDataSource>
>>
>>
>>
>>
>>My virtual layer is in the same directory as my shapefiles:
>>
>>SHAPEPATH "d:\webcgcq\lcnp\mapserver_demo\maritimes\data\shp\geo83"
>>
>>
>>
>>
>>Here is the section of my mapfile where I call my virtual layer:
>>
>>LAYER
>>	NAME "MGWI_TBLLOC"
>>	TYPE POINT
>>	CONNECTIONTYPE OGR
>>	CONNECTION "mgwi.ovf"
>>	DATA "MGWI_TBLLOC"
>>	STATUS DEFAULT
>>	LABELITEM "LOCID"
>>	PROJECTION
>>		"init=epsg:26920"
>>	END #projection
>>	CLASS
>>		SYMBOL 'circle'
>>		SIZE 8
>>		LABEL
>>			COLOR 132 31 31
>>			SHADOWCOLOR 218 218 218
>>			SHADOWSIZE 2 2
>>			TYPE TRUETYPE
>>			FONT arial-bold
>>			FORCE true
>>			SIZE 10
>>			POSITION auto
>>			PARTIALS FALSE
>>			MINDISTANCE 0
>>			BUFFER 2
>>		END # end of label
>>	    TEMPLATE
>>"d:\webcgcq\lcnp\mapserver_demo\maritimes\templates\field_capt_query.html"
>>	END # CLASS
>>END # LAYER
>>
>>
>>
>>
>>
>>
>>==========================================
>>Héryk
>>NRCan
>>
>>-----Message d'origine-----
>>De : Julien, Heryk [mailto:hjulien at nrcan.gc.ca]
>>Envoyé : Wednesday, January 14, 2004 8:44 AM
>>À : 'spencer at dmsolutions.ca'
>>Cc : 'Mapserver-users at lists.gis.umn.edu'
>>Objet : RE: TR: [Mapserver-users] MySQL and Mapserver
>>
>>
>>Thanks
>>
>>Héryk
>>
>>-----Message d'origine-----
>>De : Paul Spencer [mailto:pagameba at magma.ca]
>>Envoyé : Tuesday, January 13, 2004 5:00 PM
>>À : Julien, Heryk
>>Cc : 'Paul Spencer '; 'Mapserver-users at lists.gis.umn.edu'
>>Objet : Re: TR: [Mapserver-users] MySQL and Mapserver
>>
>>
>>Maybe you missed it?
>>
>>
>>    
>>
>http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0401/msg00111.html
>  
>
>>Cheers,
>>
>>Paul
>>
>>Julien, Heryk wrote:
>>
>>
>>    
>>
>>>Hi Paul,
>>>Could you send me or post information on the "new format in 
>>>OGR to set up a virtual layer that can draw columns from any ODBC data 
>>>source and map two of the columns to x and y locations"?
>>>
>>>Thanks
>>>Héryk
>>>
>>>-----Message d'origine-----
>>>De : Julien, Heryk [mailto:hjulien at nrcan.gc.ca]
>>>Envoyé : Monday, January 05, 2004 9:23 AM
>>>À : 'spencer at dmsolutions.ca'
>>>Cc : 'Mapserver-users at lists.gis.umn.edu'
>>>Objet : RE: [Mapserver-users] MySQL and Mapserver
>>>
>>>
>>>Hi,
>>>I am also very interseted in that fonction. I would like to be able to
map
>>>well positions from a database x and y colums. Would this permit me to
>>>      
>>>
>>have
>>
>>    
>>
>>>an up to date point geometry layer which reflects the changes in my well
>>>database? Can you send me more details?
>>>
>>>Thanks
>>>
>>>Héryk
>>>NRCan
>>>
>>>-----Message d'origine-----
>>>De : Paul Spencer [mailto:pagameba at magma.ca]
>>>Envoyé : Saturday, January 03, 2004 4:28 PM
>>>À : bartvde at xs4all.nl
>>>Cc : mapserver-users at lists.gis.umn.edu
>>>Objet : Re: [Mapserver-users] MySQL and Mapserver
>>>
>>>
>>>Bart,
>>>
>>>if you are interested in point geometries only, there is a new format in 
>>>OGR to set up a virtual layer that can draw columns from any ODBC data 
>>>source and map two of the columns to x and y locations.  We've used it 
>>>for a couple of clients and it works very nicely.  If you are interested 
>>>I can send you more details.
>>>
>>>Cheers,
>>>
>>>Paul
>>>
>>>Bart van den Eijnden wrote:
>>>
>>>
>>>
>>>      
>>>
>>>>Hi list,
>>>>
>>>>I see in the history log that there has been some work done recently 
>>>>(early December) by Attila on supporting MySQL 4.X for the MyGIS 
>>>>connector. Can it be used already?
>>>>
>>>>Also, is it possible to keep the geometries in shapefiles and use 
>>>>Mapserver JOINS to link to tables in MySQL?
>>>>
>>>>Thanks in advance for the info.
>>>>
>>>>Best regards,
>>>>Bart
>>>>_______________________________________________
>>>>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