[Mapserver-users] Generating dynamic point layer

Van Ulden, Joost jvanulde at nrcan.gc.ca
Wed May 12 11:11:03 PDT 2004


Hi David,

You can use OGR to connect to your access database.  Consider the following
layer object:

LAYER
  NAME OGRPoints
  TYPE POINT
  CONNECTIONTYPE OGR
  CONNECTION 
  
  '<OGRVRTDataSource>
       <OGRVRTLayer name="MyPoints">
        <SrcDataSource>ODBC:MySystemDSN,MyTable</SrcDataSource> 
        <SrcLayer>MyTable</SrcLayer> 
        <GeometryType>wkbPoint</GeometryType> 
        <GeometryField encoding="PointFromColumns" x="MyXColumn"
y="MyYColumn"/> 
      </OGRVRTLayer>
  </OGRVRTDataSource>'

  DUMP TRUE # for WFS only
  DATA "MyPoints"
  STATUS default
  CLASS
    SYMBOL 'circle'
    SIZE 25
    COLOR 255 0 0
  END
END

You can do this for any ODBC compliant db.  Let me know if you need anything
further.

Regards,

============================================ 
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 
============================================



-----Original Message-----
From: David Fawcett [mailto:David.Fawcett at state.mn.us] 
Sent: Wednesday, May 12, 2004 7:14 AM
To: samuzzal at linux.net; fx.prunayre at oieau.fr
Cc: mapserver-users at lists.gis.umn.edu
Subject: Re: [Mapserver-users] Generating dynamic point layer


Has anyone successfully created point layers from Access .mdb files?  

David J. Fawcett
MN Office of Environmental Assistance

>>> François-Xavier Prunayre <fx.prunayre at oieau.fr> 5/12/2004 4:47:23 AM 
>>> >>>
>    I have an access table with the georeferencing positions (X, Y). 
> Could anybody please help me by sending some code to generate a point 
> layer dynamically from these information. Thanks for previous helps I 
> got from the group.

You could do that using OGR virtual layer; Wiki page is
http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?VirtualSpatialData.

Set DSN in odbc connection; for exemple French,
then Ovf file look like this :
<OGRVRTDataSource>
    <OGRVRTLayer name="STATIONS">
        <SrcDataSource>ODBC:French,STATIONS</SrcDataSource>
     	<SrcLayer>STATIONS</SrcLayer>
    	<GeometryType>wkbPoint</GeometryType>
    	<LayerSRS></LayerSRS>
                 <GeometryField encoding="PointFromColumns"
x="X_LAMBERT_II_ET" y="Y_LAMBERT_II_ET"/>  </OGRVRTLayer>
</OGRVRTDataSource> where X_LAMBERT_II_ET is X coordinates and
Y_LAMBERT_II_ET is Y.

Map file layer tag is :
LAYER
    NAME OVF
    TYPE POINT
    CONNECTIONTYPE OGR
    CONNECTION "french.ovf"
    DATA "STATIONS" # the name of the OGRVrtLayer
    STATUS DEFAULT
    PROJECTION
      "init=epsg:27582"
    END
  DUMP TRUE
	CLASS
    		TEMPLATE "ttt_query.html"
    		SYMBOL "circle"
    		SIZE 6
    		NAME "STATION_FR"
    		OUTLINECOLOR 239 16 16
	END
END

You could also use Mapscript.

HTH
Francois

----- Original Message ----- 
From: "Sam Choudry" <samuzzal at linux.net>
To: <mapserver-users at lists.gis.umn.edu>
Sent: Wednesday, May 12, 2004 9:27 AM
Subject: [Mapserver-users] Generating dynamic point layer


> Hello group,
>
>
>                                               Samuzzal
>
>
>
> _____________________________________________________________
> Linux.Net -->Open Source to everyone
> Powered by Linare Corporation
> http://www.linare.com/
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu 
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users 
>
> --
> Ce message a ete verifie par MailScanner pour des virus ou des polluriels
et rien de suspect n'a ete trouve.
>
> Les donnees et renseignements contenus dans ce message sont 
> personnels,
confidentiels et prives. Toute publication, utilisation ou diffusion, meme
partielle, doit etre autorisee.
>
> Any data and information contained in this electronic mail is 
> personal,
confidential and secret. Any total or partial publication, use or
distribution must be authorized.


-- 
Ce message a ete verifie par MailScanner pour des virus ou des polluriels et
rien de suspect n'a ete trouve.

Les donnees et renseignements contenus dans ce message sont personnels,
confidentiels et prives. Toute publication, utilisation ou diffusion, meme
partielle, doit etre autorisee.

Any data and information contained in this electronic mail is personal,
confidential and secret. Any total or partial publication, use or
distribution must be authorized.

_______________________________________________
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