Coordinates in degrees, minutes and seconds

David Lowther dlowther at COORDINATESOLUTIONS.COM
Fri May 25 05:56:01 PDT 2007


It might be easier to add a couple of fields to your database DDLat and
DDLong and calculate them via triggers from y and x. Then you could point
OGR at DDLong and DDLat...

David Lowther
 
 
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of H Garcia
Sent: Friday, May 25, 2007 8:41 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] Coordinates in degrees, minutes and seconds

Hello!

I'm using a SQLServer database and an OGR connection, like this:

LAYER
        NAME mylayer
        TYPE POINT
        CONNECTIONTYPE OGR
        CONNECTION 
        	"<OGRVRTDataSource>
			    <OGRVRTLayer name='mylayer'>
	
<SrcDataSource>ODBC:root/xxx at SQLServer</SrcDataSource> 
				<SrcLayer>pois</SrcLayer> 
				<FID>id</FID>
				<GeometryType>wkbPoint</GeometryType> 
				<LayerSRS>WGS84</LayerSRS>
				<GeometryField encoding='PointFromColumns'
x='x' y='y'/> 
			    </OGRVRTLayer>
		</OGRVRTDataSource>"
        
        ...

        PROJECTION
            "init=epsg:4326"
    	END
    	TRANSPARENCY 50
    	DUMP TRUE
    	...
END



The problem is that the x and y table fields are strings so as "42º 17'
30''N"
I would like to know if it is possible to make some type of transformation
between this representation and the decimal one, in order to mapserver to
understand my layer. 

The database is not ours, and we access it through a stored procedure,
that's the reason why we can't make this simple operation in the origin.


Thanks in advance!



More information about the MapServer-users mailing list