[Geomoose-users] Change projection

TC Haddad tchaddad at gmail.com
Tue Jan 6 08:01:45 PST 2015


If you want to use public map tiles, most likely you should set GeoMoose to
use 3867 as a base projection (this is the default in the demo). This means
that your overlay data will be reprojected from EPSG 25833 in order to
display correctly. Coordinates in the GeoMoose display will be in EPSG 3857
in this case.

How are you accessing your overlay data? If it comes from Mapserver, you
can add your projection of *EPSG:25833 *to the LAYER portion in the map
file so that Mapserver can access it correctly. e.g.

MAP
    ....
    WEB
        METADATA
            'ows_title' 'my_map'
            'ows_srs' 'EPSG:3857'
            'ows_enable_request' '*'
            'ows_onlineresource' 'http://www.geomoose.org'
        END
    END
    PROJECTION
        'init=epsg:3857'     #projection of the map
    END

  LAYER
    NAME 'my_layer'
    TYPE POLYGON
    DUMP true
    TEMPLATE fooOnlyForWMSGetFeatureInfo
    DATA './my_data.shp'
    METADATA
      'ows_title' 'my_layer'
    END
    STATUS OFF
    TRANSPARENCY 100
    PROJECTION
        'init=epsg:25833'   #projection of the layer
    END
    CLASS
      NAME "My Layer Name"
       STYLE
         WIDTH 0.91
         OUTLINECOLOR 180 180 180
         COLOR 145 155 92
       END
    END
  END
  END


On Tue, Jan 6, 2015 at 6:54 AM, James Klassen <klassen.js at gmail.com> wrote:

> I think OSM (and most other widely available tilesets) only support 3857.
> The map sources you use need to support the projection you select in
> GeoMoose.
>
> Also, tilesets only support fixed zoom levels. (Although I think there is
> an OpenLayers server_resolutions parameters that works around this by
> rescaling the tiles in the browser.  I don't remember if it is accessible
> from GeoMoose).
> On Jan 6, 2015 7:07 AM, <geo.graefin at web.de> wrote:
>
>> Hello,
>>
>> here more in detail what I did:
>>
>>  1. I created a new js file including the declaration of the EPSG code
>> from spatialreference.org and deleted the one of EPSG:26915.
>> *Proj4js.defs["EPSG:25833"] = "+proj=utm +zone=33 +ellps=GRS80 +units=m
>> +no_defs";*
>>
>> 2. I referenced this new js file in geomoose.html. Beside there is
>> another projection for the geographic coordinates (EPSG:3857). I deleted
>> the reference of EPSG:26915.
>>
>> *<script type="text/javascript" src="projections/EPSG3857.js"></script>
>> <script type="text/javascript" src="projections/EPSG25833.js"></script>*
>>
>> 3. I changed the parameters projection, max_extent and initial_extent in
>> mapbook.xml.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *<param name="projection">EPSG:25833</param>         <param
>> name="zoomto"><![CDATA[         {             "Zoom To:" : {
>>  "Sachsen und Niederschlesien" : [295743,5511505,709358,5755456]
>>  }         }         ]]></param>         <param
>> name="max_extent">100000,1000000,999999,9999999</param>         <param
>> name="initial_extent">295743,5511505,709358,5755456</param>          <param
>> name="measure_tool.show_area_segments">false</param>         <param
>> name="layer_controls.legend.on">false</param>         <param
>> name="layer_controls.up.on">false</param>         <param
>> name="layer_controls.down.on">false</param>         <param
>> name="layer_controls.metadata.on">false</param>         <param
>> name="layer_controls.legend.on">true</param>         <param
>> name="group_checkboxes">false</param>         <param
>> name="default_tab">Catalog</param>         <param
>> name="ground_units">m</param>         <param
>> name="maxResolution">156543.03390625</param>         <param
>> name="numZoomLevels">20</param>         <param
>> name="coordinate_display.usng">false</param>          <param
>> name="jumpto_scales"><![CDATA[         {             "1:100000" : 100000,
>>             "1:50000" : 50000,             "1:24000" : 24000,
>>  "1:10000" : 10000,             "1:5000" : 5000         }     ]]></param>*
>>
>> When I change the coordinates of max_extent then GeoMOOSE shows another
>> area. Maybe there is the problem? When I set the fractional_zoom to true,
>> the osm tiles will be displayed pink.
>>
>> 4. I changed the projection of the map in local_settings.ini and
>> settings.ini:
>>
>> *[map] projection=EPSG:25833*
>>
>> That is what I have done. Is there anywhere a reference to the "old"
>> projection of EPSG:26915? Anything I have missing?
>> Unfortunately I have no own data, that I can proof, because there is a
>> mistake in the map file of the data's source.
>>
>> Thanks a lot for your help!
>>
>> Greetings, Geograefin
>>  *Gesendet:* Montag, 05. Januar 2015 um 22:16 Uhr
>> *Von:* "TC Haddad" <tchaddad at gmail.com>
>> *An:* geo.graefin at web.de
>> *Betreff:* Re: Re: [Geomoose-users] Change projection
>>
>> Let's back up - can you describe your symptoms in more detail?
>>
>> - You started from the demo
>> - You made your projection changes and something didn't work
>>
>> - is your data displaying correctly in the map?
>> - do you get a pink screen when you try to view your data?
>> - are the coordinates displaying below the map incorrect? or duplicated
>> in 2 projections?
>>
>> More items to double check or try:
>>
>> - Did you set appropriate initial and maximum extent values in the
>> Mapbook?
>> ie.     <param name="max_extent">7110968,-610403,9234765,956456</param>
>>         <param name="initial_extent">7296650,228568,7570144,408049</param>
>> - Did you set the correct units in the Mapbook?
>>         <param name="ground_units">ft</param>
>> - Did you set appropriate zoom levels in the Mapbook?
>>         <param name="fractional_zoom">true</param>
>>         <param
>> name="scales">0.25,0.5,1,2,4,8,16,32,64,128,256,512,1024,2048</param>
>>
>>
>> On Mon, Jan 5, 2015 at 11:14 AM, <geo.graefin at web.de> wrote:
>>>
>>>   Thank you for your answer,
>>>
>>> I did all the steps, including the both of your answer. I really have no
>>> idea, what is wrong. Maybe the local_settings.ini could not overwrite the
>>> settings.ini?
>>>
>>> *Gesendet:* Montag, 05. Januar 2015 um 18:10 Uhr
>>> *Von:* "TC Haddad" <tchaddad at gmail.com>
>>> *An:* geo.graefin at web.de
>>> *Betreff:* Re: [Geomoose-users] Change projection
>>>   Some ideas to check if you started from the Demo file:
>>>
>>>    - Did you place the epsg25833.js file that you created in Step 2 in
>>>    the projections directory?
>>>    - Did you remove the reference to the old projection from your HTML?
>>>    ie.
>>>    delete <script type=”text/javascript”
>>>    src=”projections/EPSG26915.js”></script>
>>>    insert <script type=”text/javascript”
>>>    src=”projections/EPSG25833.js”></script>
>>>
>>>
>>> On Mon, Jan 5, 2015 at 8:35 AM, <geo.graefin at web.de> wrote:
>>>>
>>>>  Dear community,
>>>>
>>>> I have problems with changing the projection of my GeoMOOSE project. I
>>>> have followed the instructions at the GeoMOOSE site [
>>>> http://docs.geomoose.org/2.7/docs/projections.html]. In addition to
>>>> all these steps I changed the EPSG code in local_settings.ini. But there is
>>>> no effect.  It still shows the projection (EPSG code 26915) of the demo, as
>>>> well as the coordinates x,y at the status bar. The "new" epsg code is 25833.
>>>> Do you have any ideas, what instructions are missing or what i did
>>>> wrong?
>>>>
>>>> I would be very grateful for help! Thank you in advance!
>>>>
>>>> Greetings, Geograefin
>>>>
>>>> _______________________________________________
>>>> Geomoose-users mailing list
>>>> Geomoose-users at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/geomoose-users
>>>
>>>
>> _______________________________________________
>> Geomoose-users mailing list
>> Geomoose-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/geomoose-users
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20150106/33fc11cc/attachment.html>


More information about the Geomoose-users mailing list