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

Julien, Heryk hjulien at nrcan.gc.ca
Fri Jan 23 11:03:22 PST 2004


Okay,
If run the orginfo with the ODBC connection name (MGWI_TBLLOC) instead of
the Access table name (tblloc) I get my table content. Thanks.

Now I'm back to the original problem. All the components seem to work
perfectly but I keep on getting the same error message when I try to draw
the map:

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.

It doesn't seem to find the mgwi.ovf file. I tried both relative and
absolute paths. I checked my mapfile and everyting seems okay

LAYER
	NAME "MGWI_TBLLOC"
	TYPE POINT
	CONNECTIONTYPE OGR
	CONNECTION
"D:\webCGCq\lcnp\mapserver_demo\maritimes\data\shp\geo83\mgwi.ovf"
	DATA "MGWI_TBLLOC"
	STATUS default
	LABELITEM locid
	PROJECTION
		"init=epsg:26920"
	END #projection
	CLASS
		SYMBOL 1
		SIZE 8
		COLOR 255 0 0
		LABEL
			SIZE MEDIUM
			TYPE BITMAP
			COLOR 0 0 0
		END # end of label
	END # CLASS
END # LAYER


John, are you using an Access database? Are you working on Linux or Window?


Thank you all for your help
Héryk

mgwi.ovf:

<OGRVRTDataSource>
    <OGRVRTLayer name="MGWI_TBLLOC">
	<SrcDataSource>ODBC:MGWI_MAPSERVER,tblloc</SrcDataSource> 
 	<SrcLayer>tblloc</SrcLayer> 
	<GeometryType>wkbPoint</GeometryType>
	<GeometryField encoding="PointFromColumns" x="X" y="Y"/> 
    </OGRVRTLayer>
</OGRVRTDataSource>




-----Message d'origine-----
De : Frank Warmerdam [mailto:warmerdam at pobox.com]
Envoyé : Friday, January 23, 2004 10:24 AM
À : Julien, Heryk
Cc : 'Zak James'; 'Arthur, John'; 'Normand Savard';
'Mapserver-users at lists.gis.umn.edu'; Anctil, Martin;
'spencer at dmsolutions.ca'
Objet : Re: [Mapserver-users] Re: VirtualSpatialData (OGR
Connectiontype)


Julien, Heryk wrote:
> Hi,
> I tried it and I don't get the table content!
> 
> Firt try:
> 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)
> 
> 
> 
> Second try with the table name:
> D:\WebScripts\MapServer>ogrinfo
> D:\webCGCq\lcnp\mapserver_demo\maritimes\data\shp\geo83\mgwi.ovf tblloc
> 
> 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.
> 
> 
> 
> The table doesn't seem to be coming through! Any idea?
> 
> I tried the new build that Paul made available this morning and I get the
> same problem! 

Hi,

I'm not sure if I missed some of the email on this thread (it is pretty
overwhelming!) but you didn't use the correct table name in your ogrinfo
query.  When you ran ogrinfo without the layer name you got "1: MGWI_TBLLOC
(Point)" as the result.  The "MGWI_TBLLOC" portion of this is the layer
name.  So you should use it, not TBLLOC as the layer name in your ogrinfo
query:

Good luck,
-- 
---------------------------------------+------------------------------------
--
I set the clouds in motion - turn up   | Frank Warmerdam,
warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent





More information about the MapServer-users mailing list