On Mon, Apr 21, 2008 at 06:28:31AM -0700, Cranio wrote: > > Hi folks, > > I am writing a web application using MySQL/OpenLayers/AJAX/PHP; this app > must enable some users to draw a vector shape and then import it in a > Spatial-aware MySQL database. > > Now, everything is theoretically fine, till I have to put the actual > polygonal data in the database; 'cause I use for this the WKT format > exported string, but the resulting string is calculated on the Google base > layer projection (EPSG:900913). > > That won't do, because my database holds data in UTM33S projection > (EPSG:32733), and I want data to be consistent among already existing > pre-defined shapes. > > Is there a way to force the point coordinates to show up in the other EPSG > projection, so I can put them directly in the DB with a single and > straightforward query (obviously without performing boring string parsing > and coord conversion routines)?
Formats all have an internal (feature) and external (string) projection options, passed at create time. These options allow you to specify projection objects, which are used to change the coordinates when reading/writing. You will need the support of a library which can transform from EPSG:900913 to EPSG:32733 correctly. proj4js may be able to do this; I don't know for sure. Regards, -- Christopher Schmidt MetaCarta _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
