biodiv / anycluster

Server-side clustering of map markers for (Geo)Django

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"Unsupported SRS" exception

clime opened this issue · comments

I am trying to get this app (which looks promising btw) working but now I am stuck on SRSException at /anycluster/grid/2/64/,
Getting this at:

        /srv/www/cwu/anycluster/clusterer.py in point_ToMercator
        line 161. mercator = SpatialReference("900913")

Any idea how to solve it?

The first thing to try is changing 900913 to 3785 or 3857.

3785 is old and was replaced by 900913 ('google') which was then replaced by 3857.

All of these 3 Spatial References describe the same Projection. Please let me know if it helped.

Yes, 3785 works. Thank you! I was trying to add 900913 to spatial_ref_sys table as described here: https://docs.djangoproject.com/en/dev/ref/contrib/gis/install/, but that was also giving me an error:

$ python manage.py shell
>>> from django.contrib.gis.utils import add_srs_entry
>>> add_srs_entry(900913)
GDAL_ERROR 6: EPSG PCS/GCS code 900913 not found in EPSG support files.  Is this a valid
EPSG coordinate system?

But with 3785, this was not needed. I am getting another exception tho. I'll descritbe it in the next issue.

I am leaving this issue open as I might include an exception handling falling back to 3785 if 900913 or 3875 do not exist

added exception handler with commit#29