This object is in archive! 

Adding coodinate systems

Heikki Juva shared this idea 11 years ago
Completed

How can i add new coordinate systems to "coordinate type"-list in localization-menu? I would need the following EPSG-codes: EPSG:3067 EPSG:2393 EPSG:4326 EPSG:900913 EPSG:31467.

Replies (14)

photo
0

hey heikki


It`s not possible to add a coordinate system.

photo
0

Hello Heikki,


you`re not the first one who wanted to add some custom map projections to Locus. As Gynta correctly wrote, it`s not possible in current Locus version.


For that reason, and also because Locus is mainly mapping tool and ability to use custom coordinate formats is quite essential, I just created a way to define own map projections. Short description how-to is here http://docs.locusmap.eu/doku.php/manu...


Keep in mind that this will work in next Locus version (or any testing version that will appear during a May), not in current.


At bottom on wiki page are defined systems you wanted, just for test, and seems to works correctly.

photo
0

Thank you for the reply and the wiki page, that would be excellent feature on Locus. Looking for the future versions to begin testing Finnish WMS-services on Android.

photo
0

if you`ll have time, please check this test version http://forum.locusmap.eu/viewtopic.ph... where current system should already work. I`ll be glad for confirmation that it works, thanks

photo
0

Hi, sorry for my late response on this matter. I tested the version you linked and it works quite fine with some finnish WMS-services. With most of our own WMS-services Locus returns "Unknown error".


Is there any way to inspect what is causing the error, or see the raw request url with all the parameters that are sent to the HTTP-server? This error could be caused by our mapserver that supports only png-format for map tiles, but on the other hand it could be something completely different..

photo
0

Hi,


hmm this is different task. What I did, so the ability to add some custom map projection, is useful only! for display and tranformation of these coordinate systems.


If you want to use some WMS maps and these do not work in Locus, then send me url to these maps and I`ll check where is a problem. Anyway for using WMS maps, even maps with some special map projections, you don`t need to define this projection in Locus manually.

photo
0

This is one of the WMS-services i tried, and it returned the "Unknown problem": http://kartat.lounaispaikka.fi/wms/ma...


This WMS-service is hosted at our own servers, so any configuration errors on our side could be fixed quite quickly.


You can test the WMS-layer on any GIS-software, or at our own test site http://www.lounaispaikka.fi/testaaja/


To add new WMS-layer, paste the WMS-url to "Lisää uusi WMS-taso"-field, and click "Lisää", then select the first layer that is bolded and click "Lisää taso". The WMS-layer should now be visible on map.

photo
0

hmm interesting ...


this is result. It`s request on tile


top, left: 60.58696734204493, 22.851562501277634


bottom, right: 60.41385234636843, 23.203125006520025


loadUrl:http://kartat.lounaispaikka.fi/wms/maakuntakaava?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&SRS=EPSG:900913&FORMAT=image/png&STYLES=&LAYERS=mk_aluevaraus&TRANSPARENT=TRUE&BBOX=2543824.301473,8492459.589673,2582960.060538,8531595.349030&WIDTH=512&HEIGHT=512


loadUrl:http://kartat.lounaispaikka.fi/wms/maakuntakaava?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&SRS=EPSG:4326&FORMAT=image/png&STYLES=&LAYERS=mk_aluevaraus&TRANSPARENT=TRUE&BBOX=22.851563,60.413852,23.203125,60.586967&WIDTH=512&HEIGHT=512


first URL is not working. It`s current Locus system. Second url IS working. It`s a request on exactly same tile but in EPSG 4326 and not in 900913 as first tile. Interesting mainly because your server returns


projection library error, no option found in "init" file


So this means that your server do not support 900913 even you mention this in base xml file?

photo
0

Thanks for testing, I will ask from our GIS-specialist if the 900913 is there for a reason. Did you test the second URL in Locus?

photo
0

you mean the one with 4326? Yes, I hardcoded this value and WMS layer worked fine. Anyway I see this SRS in list of supported systems from capabilities.xml


<SRS>EPSG:3067</SRS><SRS>EPSG:2393</SRS><SRS>EPSG:4326</SRS><SRS>EPSG:900913</SRS><SRS>EPSG:31467</SRS>


so I expect, that this should work. By the error, it seems to be some problem in missing configuration on your server, anyway usually it`s a problem in Locus in the end :). So let me know ...

photo
0

We removed the 900913 and some other coordinate system, so projection errors should be gone now. We also noticed that WMS-layer does not work if url is kartat.lounaispaikka.fi/wms/, but with kartat.lounaispaikka.fi/wms-nc/ it works.


The "-nc"-option disables tilecaching on server and requests the mapserver to generate all tiles from shapefiles. If user tries to use wms with caching, it returns "WMS server error: Invalid SRS given: SRS must be valid for all requested layers". For example with kartat.lounaispaikka.fi/wms/maakuntakaava


So the following url works now in Locus: kartat.lounaispaikka.fi/wms-nc/maakuntakaava


But our official regional land-use plan at: kartat.lounaispaikka.fi/wms-nc/vs_maakuntakaava_vahvistettu returns "Unknown problem". We have no idea why this happens, as these two wms-services should be almost identical.

photo
0

I completely forget on this topic due to many reported issue here on GetSatisfaction, sorry ...


I`m checking URL you wrote above and this is result from your server


text:Unauthorized access. Please contact info at lounaispaikka . fi


these maps are username/password protected? If so Locus do not support it. If I remember, two people already asked me, but no one was able to give me some testing access to any password protected WMS maps, so I was not able to implement it yet

photo
0

Oh, I`m sorry about that. Some of our WMS-services may be restricted when accessing it from outside out IP-range. Can you specify what URL you tested, and I look into it. The land-use plans that linked earlier should be open to all, so if you could not access it I would be very glad to fix that.


Can you test if you can load maptiles from following URLs:


Cached WMS-service of official land-use plan:


http://kartat.lounaispaikka.fi/wms/vs...


Uncached:


http://kartat.lounaispaikka.fi/wms-nc...


Cached WMS-service of unofficial(non-confirmed) land-use plan:


http://kartat.lounaispaikka.fi/wms/ma...


Uncached:


http://kartat.lounaispaikka.fi/wms-nc...

photo
0

hi,


only first url cause problems, all others work fine

Replies have been locked on this page!