TR: [Mapserver-users] OGR unable to access datasource

Julien, Heryk hjulien at nrcan.gc.ca
Thu Jan 29 13:42:38 EST 2004


-----Message d'origine-----
De : Anctil, Martin 
Envoyé : Thursday, January 29, 2004 1:26 PM
À : Julien, Heryk
Objet : RE: [Mapserver-users] OGR unable to access datasource



I've built mapserver 4.0.1 with a cvs version of gdal for Heryk Julien and
we still get the same error with mapserver even though the ODBC connection
seems to work. We can extract the table's content with the version of
gdal11.dll and ogrinfo.exe I compiled.

martin

-----Message d'origine-----
De : Paul Spencer [mailto:pagameba at magma.ca]
Envoyé : Thursday, January 29, 2004 9:08 AM
À : Julien, Heryk
Cc : Van Ulden, Joost; Anctil, Martin;
'mapserver-users at lists.gis.umn.edu'
Objet : Re: [Mapserver-users] OGR unable to access datasource


My first guess is that your mapserver is not built to support this.  I 
discovered from Frank Warmerdam in an earlier post that it is not 
sufficient to replace gdal11.dll, you need a new build of mapserver that 
is explicitly built against a new version of gdal in order for it to 
work because many of the internals of mapserver are bound directly to 
the OGR functions instead of through the dll (not sure if that is the 
right way to say it, thats how I think of it though).

If

ogrinfo c:\inetpub\wwwroot\MS_DEMO\ogr.ovf Desc_story

does not list all the features in your database, then it may be a 
problem with your ogr.ovf file or your DSN.  But if it does work, the 
you will be able to get it to work with MapServer if you have a properly 
built mapserver.

 From the look of your ovf file, I don't know if it will properly create 
the x/y values, you may need to remove the Desc_story. from the x= and 
y= values.  Using ogrinfo on the ovf file will tell you if points are 
being created or not.

Cheers,

Paul

Julien, Heryk wrote:

> Hi,
> I have the same problem and error message with Access2000.
> Take a look at the following bugzilla bug:
> http://bugzilla.remotesensing.org/show_bug.cgi?id=471
> and the mapserver user discussion forum with the following key word:
> VirtualSpatialData (OGR Connectiontype).
> 
> Good luck
> 
> -----Message d'origine-----
> De : Van Ulden, Joost [mailto:jvanulde at nrcan.gc.ca]
> 
> Envoyé : Wednesday, January 28, 2004 7:07 PM
> À : Mapserver-Users at Lists. Gis. Umn. Edu
> (mapserver-users at lists.gis.umn.edu)
> Objet : [Mapserver-users] OGR unable to access datasource
> 
> 
> Hi all, some talk of connecting to a datasource through OGR got me
excited.
> I am trying to connect to a Microsoft SQL Server database called
> geosemantica.  My points are in a table called Desc_story and the
coordinate
> fields are story_x and story_y.  I have set up a system DSN and tested the
> connection.  It checks out find.  Anyone have an idea as to what I am
doing
> wrong?
> 
> Everytime I try to render the map I get the following error (the file is
> definitely there):
> 
>   msDrawMap(): Image handling error. Failed to draw layer named
'OGRPoints'.
> 
>   msOGRFileOpen(): OGR error. Open failed for OGR connection
> `c:\inetpub\wwwroot\MS_DEMO\ogr.ovf'. File not found or unsupported
format. 
> 
> Here is my layer:
> 
>   LAYER
>     NAME OGRPoints
>     TYPE POINT
>     CONNECTIONTYPE OGR
>     CONNECTION "c:\inetpub\wwwroot\MS_DEMO\ogr.ovf"
>     DATA "Desc_story"
>     STATUS default
>     CLASS
>       COLOR 255 0 0
>     END
>   END
> 
> Contents of ogr.ovt:
> 
>   <OGRVRTDataSource>
> 
>       <OGRVRTLayer name="Desc_story">
>           <SrcDataSource>ODBC:foo/foo at geosemantica</SrcDataSource> 
>  	  <SrcLayer>Desc_story</SrcLayer> 
> 	  <GeometryType>wkbPoint</GeometryType> 
>           <LayerSRS>WGS84</LayerSRS>
> 	  <GeometryField encoding="PointFromColumns" x="Desc_story.story_x"
> y="Desc_story.story_y"/> 
>       </OGRVRTLayer>
> 
>   </OGRVRTDataSource>
> 
> Thank you in advance.
> 
> ============================================
> Joost van Ulden
> Programmer/Analyst
> Natural Resources Canada / Ressources naturelles Canada
> Geological Survey of Canada / Commission geologique du Canada
> 101 - 605 Robson Street / 101 - 605 rue Robson
> Vancouver, B.C. / Vancouver (C.-B.)
> V6B 5J3
> Office/Bureau:  604.666.7525
> fax/telecopieur: 604.666.1124
> jvanulde at nrcan.gc.ca
> ============================================
> _______________________________________________
> 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/|
  -----------------------------------------------------------------




More information about the mapserver-users mailing list