bioclimate

RSS

Not Found In Epsg Support Files

Not Found In Epsg Support Files Rating: 8,0/10 8670votes
Give More Feedback

Class Units(models.Model): year = models.IntegerField( blank= True, null= True) unit_type = models.CharField( max_length= 40, blank= True, null= True) metadata = JSONField() source = models.CharField( max_length= 40, blank= True, null= True) source_id = models.CharField( max_length= 40, blank= True, null= True) geom = models.MultiPolygonField( srid= 96630, blank= True, null= True) id = models.UUIDField( primary_key= True, default=uuid.uuid4, editable= False) class Meta: managed = False db_table = 'units' verbose_name = 'Unit'.

See More On Stackoverflow

ERROR 6: EPSG PCS/GCS code 900913 not found in EPSG support files. Is this a valid EPSG coordinate system? ERROR 6: No translation for. How do I teach ogr2ogr about a projection? EPSG PCS/GCS code 102100 not found in EPSG support files. Is this a valid EPSG coordinate system?

I'm trying to include a Google Maps widget in my admin-interface using on a Linux system (presently running locally on a Bitnami django stack in VMWare Player). The map renders, but point features (any features really) in my database are not showing up on the map, and when trying to register points through the map interface, I get an error that: An error occurred when transforming the geometry to the SRID of the geometry form field. I realized from the that the Googles spatial reference system is not included when initializing the spatialite/sqlite database, and the solution should be to issue the following commands, to add the SRS: $ python manage shell >>>from django.contrib.gis.utils import add_srs_entry >>>add_srs_entry(900913) However, when I do this from my project directory, I get: ERROR 6: EPSG PCS/GCS code 900913 not found in EPSG support files. Is this a valid EPSG coordinate system? I have confirmed that GDAL, GEOS and PROJ4 is installed, and I have added environment variables GDAL_DATA and PROJ_LIB to my.profile. I have checked the /usr/local/share/gdal/gcs.csv file which appears to not have an entry for 900913 (I have googled for other versions of gcs.csv, but none seem to contain 900913).

I assume this is causing the error. However, the cubewerx_extra.wkt in the same directory does have a WKT entry for 900913. My question is: How do I make add_srs_entry find the right SRS representation in order to add it to my database? Or is there a work-around, e.g.

Somehow converting the WKT representation and inserting it manually in gcs.csv? I appreciate any help! EDIT: I found a way to manually insert the EPSG 900913 into the spatialite database. OK, I found the answer to the main question, as also indicated under the edit-post. For future reference, here is a method how to add the Google spherical projection to a spatialite database (which must be already be spatially enabled): 1) Create a text file with the following content: BEGIN; INSERT into spatial_ref_sys (srid, auth_name, auth_srid, ref_sys_name, proj4text) values (900913,'EPSG',900913,'Google Maps Global Mercator','+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs'); COMMIT; 2) Save the file with a name like init_EPSG900913.sql in the directory holding you spatialite database. 3) Issue the following command to execute the SQL statement on the database: spatialite some_database.sqlite. It turns out, that the missing EPSG definition was only part of the problem.

The other part was related to the fact that the app is running on a bitnami ubuntu django stack. When following the installation guide in the geodjango docs on the bitnami ubuntu django stack, all the extra python packages and spatial libraries are installed in the system folders /user/local/.something. Typing Teacher.

Not in the self-contained bitnami environment. For future reference, make sure to issue the following statements before installing additional python packages: $ sudo su $ /opt/bitnami/use_djangostack Then packages will be installed in the bitnami environment. Also, when configuring builds of the different spatial libraries with the. Mario Party 8 Nds Ita. /configure command, extra options must be added to place the shared files in the bitnami environment. I have typically used something like: $./configure --prefix=/opt/bitnami/common Additional arguments might have to be passed as described in the geodjango docs - but the paths specified in these arguments must be changed to point to the proper subdirectories of /opt/bitnami/.