makinacorpus/django-geojson — pull request #24 by bielfrontera (2014-04-11 11:30:58+00:00)
Title: Fix missed SRID after copying a geometry in _handle_geom

In _handle_geom, take the value as the geometry in case it is an instance of GEOSGeometry, instead of creating from GEOSGeometry constructor.

Motivation
----------
We use this tag in our template: {{ station_list|geojsonfeature:"position"|safe }}

It was working in our development environment, but in our production server we got this error:

> GEOSException: Calling transform() with no SRID set is not supported after using the templatetag

In our the production server it creates a new geometry without SRID. It seems that is a problem of libgeos (development: libgeos-3.3.8; production: libgeos-3.2.0).