[Tilecache] Integrate projection parameter into an ArcXML
request
Simone Gadenz
simone.gadenz at jrc.it
Wed May 7 11:04:22 EDT 2008
Just a brief explanation. ArcIMS reproject data on-the-fly but for this to
work it requires both the AXL configuration file and the AXL request to
include a series of spatial reference related tags.
In particular:
- the config file must include the featurecoordsys and filtercoordsys as
children of the map\properties tag
- each layer must include the coordsys tag to specify its original spatial
reference
- the filtercoordsys and featurecoordsys are to be specified in any map
request.
This said, for me it would be enough to transform the existent code in svn:
xml = """<?xml version="1.0" encoding="UTF-8" ?>
<ARCXML version="1.1">
<REQUEST>
<GET_IMAGE>
<PROPERTIES>
<ENVELOPE minx="%s" miny="%s"
maxx="%s" maxy="%s" />
<IMAGESIZE height="%s" width="%s" />
<LAYERLIST >
%s
%s
</LAYERLIST>
</PROPERTIES>
</GET_IMAGE>
</REQUEST>
</ARCXML>""" % (bbox[0], bbox[1], bbox[2], bbox[3],
tile.size()[0], tile.size()[1], "\n".join(layers), "\n".join(off_layers))
in the following code:
xml = """<?xml version="1.0" encoding="UTF-8" ?>
<ARCXML version="1.1">
<REQUEST>
<GET_IMAGE>
<PROPERTIES>
<ENVELOPE minx="%s"
miny="%s" maxx="%s" maxy="%s" />
<FEATURECOORDSYS string="%s"
/>
<FILTERCOORDSYS string="%s"
/>
<IMAGESIZE height="%s"
width="%s" />
<LAYERLIST >
%s
%s
</LAYERLIST>
</PROPERTIES>
</GET_IMAGE>
</REQUEST>
</ARCXML>""" % (bbox[0], bbox[1], bbox[2], bbox[3],
feturecoordsys, filtercoordsys, tile.size()[0], tile.size()[1],
"\n".join(layers), "\n".join(off_layers))
where the content of the featurecoordsys and filtercoordsys should be
something like this:
<FEATURECOORDSYS
string="PROJCS["GoogleSphere",GEOGCS["GoogleSphereCS",DA
TUM["<custom>",SPHEROID["<custom>",6378137.0
,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.017453292
5199433]],PROJECTION["Mercator"],PARAMETER["False_Easting&quo
t;,0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Me
ridian",0.0],PARAMETER["standard_parallel_1",0.0],UNIT["
Meter",1.0]]" />
<FILTERCOORDSYS
string="PROJCS["GoogleSphere",GEOGCS["GoogleSphereCS",DA
TUM["<custom>",SPHEROID["<custom>",6378137.0
,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.017453292
5199433]],PROJECTION["Mercator"],PARAMETER["False_Easting&quo
t;,0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Me
ridian",0.0],PARAMETER["standard_parallel_1",0.0],UNIT["
Meter",1.0]]" />
orfor projection already implemented something like:
<FEATURECOORDSYS id="4326">
<FILTERCOORDSYS id="4326">
The best thing to do would be to leave the content as a parameter of the
ArcXML layer definition.
Please do not hesitate to ask more info if needed. I think it would be very
useful implementation for people like us that have aleready a lot of
services running under ArcIMS to generate tiles in the Google Mercator
projection. Apparently there is no way to make the ArcIMS WMS connector
publish data in Google Mercator.
Simone
-----Original Message-----
From: Christopher Schmidt [mailto:crschmidt at metacarta.com]
Sent: mercoledì 7 maggio 2008 15.20
To: Simone Gadenz
Cc: tilecache at openlayers.org
Subject: Re: [Tilecache] Integrate projection parameter into an ArcXML
request
On Wed, May 07, 2008 at 02:43:47PM +0200, Simone Gadenz wrote:
> Hello!
>
> In order to have ArcIMS reprojecting previus map service in the Google
> Mercator projection I need to pass the projection tags in any AXL call. I
> modified the axl into the ArcXML.py, but I would like to have either a
> parameter with the definition of the projection requeired or a new layer
> type including these tags into the arcxml.
Can you give an example of:
* The current XML generated by the code in SVN
* The XML that needs to be generated in order to cause the tile you
want to be returned
Note that I am (to be honest) surprised you've gotten as far as you have
given my complete lack of knowledge of ArcXML. I would have expected it
to not work at all, so the fact that it is possible to use is a major
relief. :)
Regards,
--
Christopher Schmidt
MetaCarta
More information about the Tilecache
mailing list