[Tilecache] ArcXML layer improvements
Jason Suwala
jsuwala at hatfieldgroup.com
Wed May 28 20:47:57 EDT 2008
Hi All:
I've been trying to get the TileCache ArcXML layer to work, and had to make
a couple of changes.
These changes include:
1) adding the attribute "order="true"" to the LAYERLIST tag. This makes the
order in which you list the layers in tilecache.cfg important - the last one
listed ends up being the top-most layer (and the first listed is at the
bottom)
2) If the projection is specified as an EPSG number (such as "4326" for
EPSG:4326), the FEATURECOORDSYS and FILTERCOORDSYS tags need to have the
attribute name set to "id" instead of "string".
My patch incorporating these changes is attached, and included below my
signature.
Cheers,
Jason Suwala, B.Eng
Environmental Information System Specialist
Hatfield Consultants
201 - 1571 Bellevue Avenue
West Vancouver, BC
Canada V7V 1A6
Phone: 604.926-3261
Fax: 604.926-5389
Website: www.hatfieldgroup.com
Index: ArcXML.py
===================================================================
--- ArcXML.py (revision 307)
+++ ArcXML.py (working copy)
@@ -84,7 +84,10 @@
if self.projection:
doc = m.Document()
feat = doc.createElement("FEATURECOORDSYS")
- feat.setAttribute("string", self.projection)
+ if self.projection.isdigit():
+ feat.setAttribute("id", self.projection)
+ else:
+ feat.setAttribute("string", self.projection)
projection_text = "%s\n%s" % (
feat.toxml(), feat.toxml().replace("FEATURE", "FILTER"))
return """<?xml version="1.0" encoding="UTF-8" ?>
@@ -95,7 +98,7 @@
<ENVELOPE minx="%s" miny="%s" maxx="%s" maxy="%s" />
%s
<IMAGESIZE height="%s" width="%s" />
-<LAYERLIST >
+<LAYERLIST order="true" >
%s
%s
</LAYERLIST>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ArcXML_py_patch_JS.patch
Type: application/octet-stream
Size: 835 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/tilecache/attachments/20080528/72083386/ArcXML_py_patch_JS.obj
More information about the Tilecache
mailing list