[mapguide-internals] Fusion refers to an external server - spatialreference.org which is offline

Zac Spitzer zac.spitzer at gmail.com
Mon Feb 21 23:05:54 EST 2011


I have filed this in trac

http://trac.osgeo.org/fusion/ticket/434

z

On Thu, Feb 17, 2011 at 12:34 PM, Zac Spitzer <zac.spitzer at gmail.com> wrote:
> Hi Michael,
>
> With RC2, the standard template is uses the fusion/lib/def directory
> while the other templates use the template/def directory.
>
> I don't see why it makes sense to maintain the defs under the template
> directory for the same reason we want to avoid maintaining another set
> of projections
>
> Digging into it, the single file version uses lib/defs, the uncombined version
> uses template/defs
>
> the map I'm currently working with has this projection in the map definition
>
> <CoordinateSystem>PROJCS["MGA-55",GEOGCS["LL-GDA94",DATUM["GDA94",SPHEROID["GRS1980",6378137.000,298.25722210]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["false_easting",500000.000],PARAMETER["false_northing",10000000.000],PARAMETER["scale_factor",0.999600000000],PARAMETER["central_meridian",147.00000000000000],PARAMETER["latitude_of_origin",0.00000000000000],UNIT["Meter",1.00000000000000]]</CoordinateSystem>
>
> looking at the proj4js-combined.js file around line 486, I see the
> following code
>
>  //check to see if this is a WKT string
>      if ((srsCode.indexOf('GEOGCS') >= 0) ||
>          (srsCode.indexOf('GEOCCS') >= 0) ||
>          (srsCode.indexOf('PROJCS') >= 0) ||
>          (srsCode.indexOf('LOCAL_CS') >= 0)) {
>            this.parseWKT(srsCode);
>            this.datum = new Proj4js.datum(this);
>            this.loadProjCode(this.projName);
>            return;
>      }
>
> The SRS being passed is only the EPSG:28355 string, as opposed
> to the definition from the map
>
> hacking around, If I change the line in LoadMap.php line 114
>
>    $mapObj->wkt = $srs;
>    $mapObj->epsg = $epsgCode;
>
> to
>
>    $mapObj->wkt = $srs;
>    $mapObj->epsg = $srs;
>
> I don't see any external projection requests as proj4js parsing
> of PROJCS is triggered
>
> Regards
>
> Zac
>
>
> On Thu, Feb 17, 2011 at 5:22 AM, Michael Adair <madair at dmsolutions.ca> wrote:
>> Zac,
>>
>> We wanted to avoid storing all the projection definitions on disk because we
>> want to avoid maintaining that data.  Ideally the projection definitions
>> will come from the MapDefinition as CS WKT.
>>
>> An app would typically have a set of known projections that it has to deal
>> with, in which case it makes sense to me to have the definition come from
>> the template directory if it isn't provided as WKT from the server.  In the
>> case where you don't know what projections the map will be using beforehand,
>> then it is much better to have a lookup service (maintained elsewhere) to
>> get them from.
>>
>>
>> Mike
>>
>>
>> On 16/02/2011 5:34 AM, Zac Spitzer wrote:
>>>
>>> the def's appear to be loaded from under the given
>>> templates directory in RC3
>>>
>>> how big would all be js projections be on disk?
>>>
>>> But can't cs map return this?
>>>
>>>
>>>
>>> On Sat, Jan 8, 2011 at 5:27 AM, Jason Birch<jason at jasonbirch.com>  wrote:
>>>>
>>>> The site is down because it was causing reliability issues for the
>>>> server it was hosted on in late december (see the openlayers dev
>>>> mailng list)
>>>>
>>>> I don't think we should have a dependency on spatialreference.org, not
>>>> because it's external but because--as useful as it is--it's just a
>>>> utility site put up by two members of the community. It's not
>>>> advertised as a reliable service, and we shouldn't be using it as such
>>>> without clearing that use with the maintainers first (and likely
>>>> contributing time/money to turning it into a reliable service).
>>>>
>>>> Jason
>>>>
>>>> On 2011-01-07, Dave Wilson<dave.wilson at autodesk.com>  wrote:
>>>>>
>>>>> It looks like their website name has changed. There is a hyphen in the
>>>>> name
>>>>> currently for the working website. A Google search only shows listing
>>>>> for
>>>>> the non-hyphenated name.
>>>>>
>>>>> http://spatial-reference.org
>>>>>
>>>>> Maybe they are on a backup site or they are in transition. There is no
>>>>> notice to indicate why the name has changed.
>>>>>
>>>>> I too questioned the use of such an embedded reference a while back, but
>>>>> I
>>>>> don't think we came to any conclusion about continuing to include it or
>>>>> not.
>>>>> If your site is purely internal do you want to reference an external
>>>>> site?
>>>>>
>>>>> And now the scenario where the site is referenced and "it's down".
>>>>>
>>>>> Dave
>>>>>
>>>>> -----Original Message-----
>>>>> From: mapguide-internals-bounces at lists.osgeo.org
>>>>> [mailto:mapguide-internals-bounces at lists.osgeo.org] On Behalf Of Michael
>>>>> Adair
>>>>> Sent: Friday, January 07, 2011 7:36 AM
>>>>> To: mapguide-internals at lists.osgeo.org
>>>>> Subject: Re: [mapguide-internals] Fusion refers to an external server -
>>>>> spatialreference.org which is offline
>>>>>
>>>>> Zac,
>>>>>
>>>>> That is the Proj4js library trying to find the projection definitions
>>>>> for EPSG:28355 and it only goes to spatialreference.org as the last
>>>>> resort, and that is really only for cases where you don't know what
>>>>> projections you app will be using.  When you do know what projections
>>>>> you will be dealing with, you can put the definiton in your JavaScript
>>>>> somewhere, eg. (substitute you own EPSG code and data):
>>>>>
>>>>> <script type="text/javascript" src="EPSG42304.js"></script>
>>>>>
>>>>> where that file contains the Proj.4 init string:
>>>>>
>>>>> Proj4js.defs["EPSG:42304"]="+title=Atlas of Canada, LCC +proj=lcc
>>>>> +lat_1=49 +lat_2=77 +lat_0=49 +lon_0=-95 +x_0=0 +y_0=0 +ellps=GRS80
>>>>> +datum=NAD83 +units=m +no_defs";
>>>>>
>>>>> If that Proj4js.defs value is not found, it then looks in a directory
>>>>> for the file automatically ('/lib' I think?)  and if not found there it
>>>>> looks on spatialreference.org.
>>>>>
>>>>> Fusion trunk includes the latest Proj4js which can also parse the
>>>>> projection initialization from the WKT returned by MapGuide so you don't
>>>>> need to include the init string.  That part can use more testing to make
>>>>> sure all the WK cases get tested.
>>>>>
>>>>> Mike
>>>>>
>>>>>
>>>>> On 07/01/2011 12:08 AM, Zac Spitzer wrote:
>>>>>>
>>>>>> Just been playing with 2.2 RC2,
>>>>>>
>>>>>> I noticed that fusion is trying to access
>>>>>>
>>>>>> http://spatialreference.org/ref/epsg/28355/proj4js/
>>>>>>
>>>>>> a website which is offline at the moment,
>>>>>>
>>>>>> should we really be dependant on third party websites?
>>>>>>
>>>>>> can we use a local call to CS-MAP instead?
>>>>>>
>>>>>> z
>>>>>>
>>>>> _______________________________________________
>>>>> mapguide-internals mailing list
>>>>> mapguide-internals at lists.osgeo.org
>>>>> http://lists.osgeo.org/mailman/listinfo/mapguide-internals
>>>>> _______________________________________________
>>>>> mapguide-internals mailing list
>>>>> mapguide-internals at lists.osgeo.org
>>>>> http://lists.osgeo.org/mailman/listinfo/mapguide-internals
>>>>>
>>>> _______________________________________________
>>>> mapguide-internals mailing list
>>>> mapguide-internals at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/mapguide-internals
>>>>
>>>
>>>
>> _______________________________________________
>> mapguide-internals mailing list
>> mapguide-internals at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapguide-internals
>>
>
>
>
> --
> Zac Spitzer
> Solution Architect / Director
> Ennoble Consultancy Australia
> http://www.ennoble.com.au
> http://zacster.blogspot.com
> +61 405 847 168
>



-- 
Zac Spitzer
Solution Architect / Director
Ennoble Consultancy Australia
http://www.ennoble.com.au
http://zacster.blogspot.com
+61 405 847 168


More information about the mapguide-internals mailing list