[Geomoose-users] Scalebar & Measure

Dan Little danlittle at yahoo.com
Thu May 27 12:12:18 EDT 2010


Is there ever a reason why geodetic would be avoided (besides the compute cost in doing the math).  Also, I'm vehemently against adding arbitrary parameters to the XML definition.




----- Original Message ----
> From: Brent Fraser <bfraser at geoanalytic.com>
> To: Dan Little <danlittle at yahoo.com>
> Cc: Len Kne <lkne at houstoneng.com>; "geomoose-users at lists.sourceforge.net" <geomoose-users at lists.sourceforge.net>
> Sent: Thu, May 27, 2010 11:11:14 AM
> Subject: Re: [Geomoose-users] Scalebar & Measure
> 
> How about omething like:

<tool name="measure"    
> title="Measure"      type="internal" action="measure"  
>   geodesic="false"/>
<tool name="measurearea" title="Measure Area" 
> type="internal" action="measurearea" geodesic="false"/>

Note the 
> default would be true so the implementer would need to turn it off if they 
> wanted distances on the mapping plane.


Hmm. Does this imply I could 
> have both geodesic AND map measures at the same time by creating these tools as 
> well:

<tool name="measure2"     title="Measure Ground Dist" 
> type="internal" action="measure"     geodesic="true"/>
<tool 
> name="measurearea2" title="Measure Ground Area" type="internal" 
> action="measurearea" geodesic="true"/>

Brent

Dan Little 
> wrote:
> Probably just make it the default setting inside of the 
> tools.
> 
> 
> ----- Original Message ----
>> From: 
> Brent Fraser <
> href="mailto:bfraser at geoanalytic.com">bfraser at geoanalytic.com>
>> 
> To: Len Kne <
> href="mailto:lkne at houstoneng.com">lkne at houstoneng.com>
>> Cc: 
> "
> href="mailto:geomoose-users at lists.sourceforge.net">geomoose-users at lists.sourceforge.net" 
> <
> href="mailto:geomoose-users at lists.sourceforge.net">geomoose-users at lists.sourceforge.net>
>> 
> Sent: Thu, May 27, 2010 10:02:01 AM
>> Subject: Re: [Geomoose-users] 
> Scalebar & Measure
>> 
>> Good.
> 
>  
>   Should we just hard-code it within Geomoose (as below), or 
>> 
> provide a 
> configuration parameter in the mapbook?
> 
> 
> Brent
> 
> Len 
>> Kne wrote:
>> Very nice!  
> Worked great and is much simpler than the way I was doing the calculation.  
> 
>> Len
>> 
>> 
>> -----Original 
> Message-----
>> From: Brent Fraser [mailto:
>> 
> ymailto="mailto:
> href="mailto:bfraser at geoanalytic.com">bfraser at geoanalytic.com" 
> href="mailto:
> href="mailto:bfraser at geoanalytic.com">bfraser at geoanalytic.com">
> ymailto="mailto:bfraser at geoanalytic.com" 
> href="mailto:bfraser at geoanalytic.com">bfraser at geoanalytic.com] 
>> 
> Sent: Wednesday, May 26, 2010 1:53 PM
>> To: Len Kne
>> Cc: 
> '
>> ymailto="mailto:
> ymailto="mailto:geomoose-users at lists.sourceforge.net" 
> href="mailto:geomoose-users at lists.sourceforge.net">geomoose-users at lists.sourceforge.net" 
> href="mailto:
> href="mailto:geomoose-users at lists.sourceforge.net">geomoose-users at lists.sourceforge.net">
> ymailto="mailto:geomoose-users at lists.sourceforge.net" 
> href="mailto:geomoose-users at lists.sourceforge.net">geomoose-users at lists.sourceforge.net'
>> 
> 
>> Subject: Re: [Geomoose-users] Scalebar & Measure
>> 
> 
>> Len(and others interested in measuring),
>> 
> 
>>    Here's my solution to the measure problem:
>> 
> 
>> In main.js somewhere around line 138 add the two lines below marked 
> with a "//BWF":
>> 
>> 
>>    
> Tools['measure'] = new 
>> 
> OpenLayers.Control.GeoMooseMeasure(OpenLayers.Handler.MeasurePath, 
>> 
> measureToolOptions);
>>     Tools['measure'].geodesic = 
> true;  //BWF
>> 
>>     Tools['measurearea'] = 
> new 
>> 
> OpenLayers.Control.GeoMooseMeasure(OpenLayers.Handler.MeasurePolygon, 
> 
>> measureToolOptions);
>>    
> Tools['measurearea'].geodesic = true;  //BWF
>> 
>> 
> 
>> Thoughts?
>> 
>> Brent
>> 
>> 
> 
>> Brent Fraser wrote:
>>> Paul, Len,
>>> 
> 
>>>    Our scale 
>> problem is a (mostly) map 
> projection issue.  All map projections 
>>> introduce 
> distortions in trying to represent a round(ish) Earth on 
>> a flat 
> plane. 
>>>   Mercator is no different: it is like wrapping 
> 
>> an up-right cylinder around the 
>>> Earth, projecting 
> light from the 
>> center onto the cylinder 
> (http://en.wikipedia.org/wiki/Mercator_projection).  As you can imagine the 
> 
>>> distortions get "worse" the further from the equator.  
> The 
>> distortions can be 
>>> modeled as a Point Scale 
> Factor.  At the 
>> equator the Point Scale Factor is 1.0, 
> 
>>> at latitude 60 degrees North 
>> (or South), the scale 
> factor is 0.5!
>>>    So 
>> what's the 
> solution?  Here's mine:
>>>    1. 
>> 
> Enhance Proj4 (and Proj4js) to return the Point Scale factor (given the 
> 
>>> projection and a location)
>>>    2. 
> Enhance 
>> MapServer and Openlayers to use the Point Scale Factor in 
> calculating distances and scale.
>>> I'm trying to drum up 
> 
>> interest, but so no takers....
>>>    
> 
>> 
> http://osgeo-org.1803224.n2.nabble.com/Point-Scale-factor-service-td4938743.html
>>>  
> 
>> 
> http://osgeo-org.1803224.n2.nabble.com/Re-3265-Scale-dependent-layer-switching-error-with-Mercator-td4966902.html
>>> 
> 
>> Best Regards,
>>> Brent Fraser
>>> 
> 
>>> Len Kne 
>> wrote:
>>>> The scale bar 
> issue with the web Mercator projection is a 
>> limitation of 
> 
>>>> OpenLayers, the application GeoMOOSE 2.x uses to 
> 
>> render the map frame. 
>>>>   There has been 
> discussion on the 
>> OpenLayers site about providing a 
> 
>>>> patch (this link offers a 
>> patch 
> http://trac.openlayers.org/ticket/1890 ) 
>>>> in the next 
> 
>> version 2.9.  I'm sure GM will upgrade to OL 2.9, but not sure 
> there is any schedule in place to do this.
>>>>  
> 
>>>> The 
>> cursor issue is also kind of fun because 
> it seems each browser handles the custom icons differently.  Here's the 
> attribute in the 
>>>> mapbook which defines the query for the 
> Identify 
>> service:
>>>>  
>>>> 
> 
>> cursor="url('cursors/identify2.cur') 9 
> 9,url('cursors/identify2.cur'),auto"
>>>>  This makes three 
> attempts to draw the cursor, 
>> the first offsets the 
> 
>>>> mouse click 9 pixels from the top and the 
>> 
> left.  Firefox can use this 
>>>> value and seems to line 
> the 
>> mouse click up pretty good with the 
>>>> 
> crosshair.  However, 
>> IE cannot handle the offset adjustment, 
> so it reads 
>>>> the second 
>> cursor 
> definition.  There are tools like AT File Mole which 
>>>> 
> can be used to edit the hotspot of a cursor.  Attached is 
>> the 
> latest 
>>>> version I have been using for Identify service, 
> 
>> again this seems to line 
>>>> the crosshair up 
> pretty well with the 
>> mouse click.  If you are using 
> 
>>>> Safari or Chrome, these 
>> setting don't seem to 
> work at all and I would 
>>>> recommend not 
>> using 
> customer cursors with those browsers.
>>>>  
> 
>>>> 
>> Len
>>>>  
> 
>>>> 
>> *From:* Wirth, Paul [mailto:
>> 
> href="mailto:
> href="mailto:Paul.Wirth at kniferiver.com">Paul.Wirth at kniferiver.com">
> ymailto="mailto:Paul.Wirth at kniferiver.com" 
> href="mailto:Paul.Wirth at kniferiver.com">Paul.Wirth at kniferiver.com]
>> 
> *Sent:* Saturday, May 01, 2010 9:03 PM
>>>> *To:* '
>> 
> ymailto="mailto:
> href="mailto:geomoose-users at lists.sourceforge.net">geomoose-users at lists.sourceforge.net" 
> href="mailto:
> href="mailto:geomoose-users at lists.sourceforge.net">geomoose-users at lists.sourceforge.net">
> ymailto="mailto:geomoose-users at lists.sourceforge.net" 
> href="mailto:geomoose-users at lists.sourceforge.net">geomoose-users at lists.sourceforge.net'
>> 
> *Subject:* [Geomoose-users] Scalebar & Measure
>>>>  
> 
>>>> 
>> Two questions:
>>>>  
> 1.       I have a web Mercator 
>> application, and I 
> noticed that the 
>>>> scalebar does not display 
>> the 
> correct distance.  For instance, when the 
>>>> scalebar 
> 
>> shows a distance of 20 miles, it measures only 13.8 miles.  I 
> 
>>>> know the measure tools are working correctly, so I assume 
> this 
>> is a 
>>>> scalebar issue.  Any thoughts 
> on how to fix 
>> this?
>>>> 2.       I 
> think this 
>> question was asked before, but I can't seem to 
> 
>>>> find it on the 
>> e-mail list.  With the 
> measure tools, the cursor does not start measuring at the "crosshairs" when the 
> user clicks, but rather in 
>>>> the NW quadrant of the 
> crosshairs.  Is there a way to 
>> change it so the 
> 
>>>> measure start point will be on the 
>> 
> crosshairs?
>>>> 
>>>> 
>> 
> ------------------------------------------------------------------------
>>>> 
> 
>> 
> ------------------------------------------------------------------------------
>>>> 
> 
>>>> 
>> 
> ------------------------------------------------------------------------
>>>> 
> 
>> _______________________________________________
>>>> 
> Geomoose-users 
>> mailing list
>> ymailto="mailto:
> ymailto="mailto:Geomoose-users at lists.sourceforge.net" 
> href="mailto:Geomoose-users at lists.sourceforge.net">Geomoose-users at lists.sourceforge.net" 
> href="mailto:
> href="mailto:Geomoose-users at lists.sourceforge.net">Geomoose-users at lists.sourceforge.net">
> ymailto="mailto:Geomoose-users at lists.sourceforge.net" 
> href="mailto:Geomoose-users at lists.sourceforge.net">Geomoose-users at lists.sourceforge.net
>> 
> target=_blank 
>>> 
> href="https://lists.sourceforge.net/lists/listinfo/geomoose-users" target=_blank 
> >https://lists.sourceforge.net/lists/listinfo/geomoose-users
>>> 
> 
>>> 
>> 
> ------------------------------------------------------------------------------
>> 
> _______________________________________________
>>> Geomoose-users 
> 
>> mailing list
>> ymailto="mailto:
> ymailto="mailto:Geomoose-users at lists.sourceforge.net" 
> href="mailto:Geomoose-users at lists.sourceforge.net">Geomoose-users at lists.sourceforge.net" 
> href="mailto:
> href="mailto:Geomoose-users at lists.sourceforge.net">Geomoose-users at lists.sourceforge.net">
> ymailto="mailto:Geomoose-users at lists.sourceforge.net" 
> href="mailto:Geomoose-users at lists.sourceforge.net">Geomoose-users at lists.sourceforge.net
>> 
> target=_blank 
>>> 
> href="https://lists.sourceforge.net/lists/listinfo/geomoose-users" target=_blank 
> >https://lists.sourceforge.net/lists/listinfo/geomoose-users
>>> 
> 
>> 
>> 
>> 
> 
> 
> 
> ------------------------------------------------------------------------------
> 
> 
> _______________________________________________
> Geomoose-users 
> 
>> mailing list
> 
>> href="mailto:
> ymailto="mailto:Geomoose-users at lists.sourceforge.net" 
> href="mailto:Geomoose-users at lists.sourceforge.net">Geomoose-users at lists.sourceforge.net">
> ymailto="mailto:Geomoose-users at lists.sourceforge.net" 
> href="mailto:Geomoose-users at lists.sourceforge.net">Geomoose-users at lists.sourceforge.net
> 
> 
>> href="
> href="https://lists.sourceforge.net/lists/listinfo/geomoose-users" target=_blank 
> >https://lists.sourceforge.net/lists/listinfo/geomoose-users" target=_blank 
> 
>>> 
> href="https://lists.sourceforge.net/lists/listinfo/geomoose-users" target=_blank 
> >https://lists.sourceforge.net/lists/listinfo/geomoose-users
> 
> 
> 
>      


      




More information about the Geomoose-users mailing list