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

Arthur, John John.Arthur at T-Mobile.com
Thu Jan 22 14:46:50 PST 2004


I just wanted you all to know that Héryk is not alone.  I too, am having the
exact same issue.  Works fine with ogrinfo, but not with MapServer.  I only
have one version of gdal11.dll, so there should be no issues there.  

Could the problem be that the precompiled version that DM provides, was
compiled against a different version of gdal than what is provided by the
OpenEV_FW_163.zip?  Because the gdal11.dll contained in mapserver zip is
different that the version in the OpenEV_FW_163.zip.

-----Original Message-----
From: Julien, Heryk [mailto:hjulien at nrcan.gc.ca]
Sent: Thursday, January 22, 2004 4:59 PM
To: 'spencer at dmsolutions.ca'
Cc: 'Normand Savard'; 'Frank Warmerdam';
'Mapserver-users at lists.gis.umn.edu'; Anctil, Martin
Subject: RE: [Mapserver-users] Re: VirtualSpatialData (OGR
Connectiontype)


Hi,
Yes the ovf file works with ogrinfo.
Martin checked the gdal11.dll and that does not seem to be the problem.


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)


As suggested, I'll "return to my mapfile"!

I now have a new understanding of one of the Virtual Spatial Data
prerequisites: "that you are not afraid to figure things out"!!

(http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?VirtualSpatialData)

:-/

Héryk

-----Message d'origine-----
De : Paul Spencer [mailto:pagameba at magma.ca]
Envoyé : Thursday, January 22, 2004 3:09 PM
À : Julien, Heryk
Cc : 'Mapserver-users at lists.gis.umn.edu'
Objet : Re: [Mapserver-users] Re: VirtualSpatialData (OGR
Connectiontype)


Does the ovf file work with ogrinfo?  That is the first place to start 
because it will give you more detailed debugging information.  Once that 
works, then you should return to the map file.  Until you can get the 
ovf file to work with ogrinfo, you are not going to get useful debugging 
information because MapServer will continue to tell you that it can't 
draw the layer with misleading information.

BTW, one other thing to check .. gdal11.dll may appear in multiple 
places in your system and you may not be using the one you think you 
are.  Search your system for this file and make sure they are all the 
same, or that you are certain that mapserver is using the right one.

Cheers,

Paul

Julien, Heryk wrote:

> Hi Norm,
> That was a cut and paste error in my email.
> The virtual file is okay: mgwi.ovf
> 
> I tried the mapfile LABELITEM suggestion:" may need to use table.name or
> just name depending on your OVF file".
> 
> I also tried a relative and absolute CONNECTION in the mapfile.
> 
> I keep on getting the following message:
> msDrawMap(): Image handling error. Failed to draw layer named
'MGWI_TBLLOC'.
> 
> msOGRFileOpen(): OGR error. Open failed for OGR connection
> `D:\webCGCq\lcnp\mapserver_demo\maritimes\data\shp\geo83\mgwi.ovf'. File
not
> found or unsupported format. 
> 
> 
> Héryk
> 
> 
> 
> -----Message d'origine-----
> De : Normand Savard [mailto:nsavard at dmsolutions.ca]
> Envoyé : Thursday, January 22, 2004 1:48 PM
> À : Julien, Heryk
> Cc : 'spencer at dmsolutions.ca'; 'Frank Warmerdam';
> 'Mapserver-users at lists.gis.umn.edu'; Anctil, Martin
> Objet : Re: [Mapserver-users] Re: VirtualSpatialData (OGR
> Connectiontype)
> 
> 
> Julien,
> 
> What is the exact name of your "ovf" file?  Because the name you 
> specified in the "CONNECTION" parameter in the map file does not match 
> the one given for you "ovf" file.
> 
> See in your email below:  "Here is my virtual file (mgw.ovf):"
> 
> See your "CONNECTION" parameter into your map file for your specific 
> virtual layer:
> 
> ...
> CONNECTIONTYPE OGR
> CONNECTION "mgwi.ovf"
> 
> ...
> 
> Norm
> 
> 
> Julien, Heryk wrote:
> 
> 
>>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.htm
l
> 
> "
> 
>>>>	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.ht
m
> 
> l
> 
>>>
>>>   
>>>
>>>
>>>>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
>>
>>_______________________________________________
>>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
> 
> 

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

_______________________________________________
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