[R-sig-Geo] projection metadata

Edzer J. Pebesma e.pebesma at geo.uu.nl
Thu Apr 13 12:08:06 CEST 2006


Michael, I'm pretty new to the xml world, but I guess you need an 
application
that can write out proj.4 strings from the xml's manifold outputs. I thought
something like that was called an xslt rather than a schema/dtd, which 
define
rather the structure (dtd) and content (schema) of the xml.

Briefly browsing the web (google PROJ.4 xml) you may find something
useful in the context of the OGR work done by Frank Warmerdam. BTW
ogr is part of gdal, so if something's in there, you could get to it through
package rgdal.

Keep us updated on this interesting topic,
--
Edzer

Michael Sumner wrote:
> Hello, I'm looking for advice on parsing XML metadata and mapping 
> projection tags to PROJ.4 strings.
>
> Manifold GIS provides auxiliary .xml files with every export of 
> drawings, images, surfaces or labels and
> this is as robust as GeoTIFF headers and can be used to override the 
> limitations of shapefiles, png images
> etc. that don't store projection metadata completely if at all.
>
> I have a function that writes the xml for a Manifold surface when I 
> export an R xyz image to raw binary, it's totally ad hoc
> and just explicitly writes out the text lines - but it works well for 
> transferring my (usually latlon) data
> back and forth.
>
> I'd like to generalize this by mapping the XML tags to PROJ.4 arguments. 
>
> I've made some limited explorations using the XML package to parse the 
> xml and modify tags, but
> I'm trying to capture two data models (the xml and PROJ.4) at once and 
> it's beyond me.
>
> A shorter version of my query might be: is there a DTD or schema for 
> PROJ.4 arguments, and can anyone point
> me to examples of mapping other schemes to PROJ.4?  ( I imagine that the 
> GDAL code for GeoTIFF headers is
> likely good place.Any pointers would be appreciated. )  It will be 
> simple enough to create or obtain a
> DTD for the Manifold XML.
>
> Cheers, Mike.
>
> Here's an example of an XML file:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <preset>
>     <name>Lambert Azimuthal Equal Area</name>
>     <datum>World Geodetic 1984 (WGS84)</datum>
>     <system>Lambert Azimuthal Equal Area</system>
>     <unit>Meter</unit>
>     <majorAxis>6.378137000000000000000000e+006</majorAxis>
>     <eccentricity>8.181919084262148600000000e-002</eccentricity>
>     <centerX>0.000000000000000000000000e+000</centerX>
>     <centerY>0.000000000000000000000000e+000</centerY>
>     <centerZ>0.000000000000000000000000e+000</centerZ>
>     <rotationX>0.000000000000000000000000e+000</rotationX>
>     <rotationY>0.000000000000000000000000e+000</rotationY>
>     <rotationZ>0.000000000000000000000000e+000</rotationZ>
>     <scaleX>1.000000000000000000000000e+000</scaleX>
>     <localScaleX>1.000000000000000000000000e+000</localScaleX>
>     <scaleY>1.000000000000000000000000e+000</scaleY>
>     <localScaleY>1.000000000000000000000000e+000</localScaleY>
>     <falseEasting>0.000000000000000000000000e+000</falseEasting>
>     <localOffsetX>0.000000000000000000000000e+000</localOffsetX>
>     <falseNorthing>0.000000000000000000000000e+000</falseNorthing>
>     <localOffsetY>0.000000000000000000000000e+000</localOffsetY>
>     <centerLat>-4.200000000000000000000000e+001</centerLat>
>     <centerLon>1.500000000000000000000000e+002</centerLon>
> </preset>
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>




More information about the R-sig-Geo mailing list