[mapguide-users] API call for transforming polygon to line?

Jason Birch Jason.Birch at nanaimo.ca
Thu Mar 16 01:36:21 EST 2006


Hey Andy,

The specific case that brought up this question was me trying to make the PHP code work with Sheboygan data, so I couldn't modify the source.  I had to stream the city boundary polygons as polys and use a transparent fill style in order to get the look I wanted, and even then GE doesn't do as good a job with borders as it does with real lines.

>From a data management perspective, I can see wanting to do this with a single data source in real life MapGuide though; I don't want to have both a polygon version (so I can shade in the web UI) and a linear version (for performance and presentation in GE).

Some of my initial experiments with GE were in using FME to generate a WKT string for my parcels and write that to a table, and do some post-processing in PHP to parse the WKT and build KML from it.  The PHP script used a lifo stack to push multi-part feature status while building a KML text string, which made it easy to close the tags when the string (or sub-element) terminated.  Hmm... here's the code:

http://earthdevel.nanaimo.ca/source/parcelimp.php

This worked with my well defined test dataset; I knew what I was expecting, and only dealt with that.

I never got much beyond proof of concept with this one; MapGuide made it much easier for me.

Jason


________________________________

From: Andy Morsell [mailto:amorsell at spatialgis.com]
Sent: Wed 2006-03-15 3:54 PM
To: users at mapguide.osgeo.org
Subject: RE: [mapguide-users] RE: API call for transforming polygon to line?


Hi Jason,
How about using FME to convert your polygon data to line data prior to loading through Studio?  As you know, I am generally not a proponent of pre-processing of data if it can be avoided.  But, I am finding that I have to generalize almost all of my data anyway for use with Google Earth / MapGuide Open to avoid the GE timeout problems you mention.  I do this with FME so adding a couple more transformers to the process to convert to lines wouldn't add too much overhead.  Doing this would also speed things up on the MapGuide processing side of things.

Andy Morsell, P.E. 
Spatial Integrators, Inc. 
http://www.SpatialGIS.com 

 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 5380 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapguide-users/attachments/20060315/b1022774/attachment.bin


More information about the Mapguide-users mailing list