[mapguide-users] Buffer Issues Units
Scott Hameister
scotth at mpower-tech.com
Fri Jul 13 15:41:52 EDT 2007
What Units does Buffer Expect to be sent in?
I'm Starting with unit type of feet and distance of 100.
Background:
When I do a ->getunits on the Coordinate System (srsDs) it returns US_foot
When I do a ->getunitScale on the Coordinate System (srsDs) it returns
0.304800609601
Earlier in the PHP code it converts my Units to Meters from feet: {if($units
== "fe") //feet $distance *= .30480;} Returning distance=30.480 Then later
the Code does this: $dist = $srsDs->
<http://trac.osgeo.org/mapguide/wiki/ConvertMetersToCoordinateSystemUnits>
ConvertMetersToCoordinateSystemUnits?($distance) returning dist=99.9998
After this it Creates $measure = new
<http://trac.osgeo.org/mapguide/wiki/MgCoordinateSystemMeasure>
MgCoordinateSystemMeasure?($srsDs);
Here's Where it gets weird if I run measure->getDistance(1.0,0.0,0.0,0.0) I
would expect it to return the value of 1 but instead it returns
3.27654107864 (Shouldn't the Measure Object be in feet since it was created
off a US Foot coordinate system or is it assuming Meters on coordinates sent
in???) We Use Measure and dist to create the buffer so since a one unit
coordinate change returns 3.27654107864 it makes sense why the distance
would come up so much smaller. $geomBuffer = $geom->Buffer($dist, $measure);
Its somewhere in the
<http://trac.osgeo.org/mapguide/wiki/MgCoordinateSystemMeasure>
MgCoordinateSystemMeasure? area or in the 0.304800609601
<http://trac.osgeo.org/mapguide/wiki/UnitScale> UnitScale? on the coordinate
system...I know how to force a fix...but it wouldnt repair whats ultimately
really broken here.
From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Andy Morsell
Sent: Wednesday, July 11, 2007 12:13 PM
To: 'MapGuide Users Mail List'
Subject: RE: [mapguide-users] Buffer Issues Units
I just checked with 1.2.0 RC2 on a State Plane, feet map and see the same
results as you.
Regarding your other question below, I don't think this has anything at all
to do with Studio, it is a bug with the AJAX viewer. Have you logged this
issue in Trac yet?
Andy Morsell, P.E.
Spatial Integrators, Inc.
http://www.SpatialGIS.com
_____
From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Scott Hameister
Sent: Wednesday, July 11, 2007 9:46 AM
To: 'MapGuide Users Mail List'
Subject: RE: [mapguide-users] Buffer Issues Units
Nobody is having issues with buffers not working properly on Maps using
state Plane Coordinates? Or just no solutions.
From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Scott Hameister
Sent: Tuesday, July 10, 2007 10:34 AM
To: 'MapGuide Users Mail List'
Subject: [mapguide-users] Buffer Issues Units
Hello I am using Mapguide Open Source as my Server and Autodesk Mapguide
Studio as my Authoring tool.
All my Maps are Using state Plane feet in Different States.When I run a 66
foot buffer, it comes out 1/3 of what it should be, when I run a 66 Meter
buffer they run in what looks like feet.
Is this an issue with Mapguide Open Source trying to Buffer a map Made in
Mapguide Studio and not recognizing Autodesk Coord Systems in the open
Source Server?????? If so how do we address this for people that want to buy
Studio but Use Open Source for their Server????? Or is this part of a bigger
more Nefarious Issue?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20070713/de80def6/attachment.html
More information about the mapguide-users
mailing list