New answers tagged srid
1
There are a couple of problems with your JSON.
Firstly, the coordinates should be an array of arrays.
Secondly, looking at the coordinates, it looks like the values are Latlong in a Geographic coordinate system, most probably EPSG:4326. That then needs to be transformed to EPSG:3857.
Once you correct these two things, you can insert the row, using the ...
1
GeoTools (and GeoServer) provide EPSG:404000 for generic 2D systems. Search for GENERIC_2D in http://docs.geotools.org/latest/userguide/library/referencing/crs.html for details.
I've never tried to use it myself but I think it should do what you need.
5
Taking a look at the source code of PostGIS I found out how it parses SRIDs. Here is the correct way to specify the SRID in GeoJSON.
The GeoJSON specification says that the coordinates of a polygon are an array of line strings. Therefore I had to wrap them with additional brackets.
{
"type":"Polygon",
"coordinates":
[
[
...
2
your geojson must have UTM values instead, you could transform that with Proj or other online tools, but you can do it easily and directly with postgis before inserting it into your table, try this (untested):
SELECT ST_AsText(ST_Transform(ST_GeomFromGeoJSON
(
{
"type":"Polygon",
"coordinates":[
...
5
You have loaded your data with the wrong SRID. 4269 is lon/lat NAD 83. 4326 is lon/lat WGS 84. They are practically the same projection, and both geographic. Judging from your coordinates, the data is actually in some planar projection, though without knowing extra information (like where you are) I can't even take an informed guess as to which one.
2
The metadata are available on the web site. Clicking on any of the choices gives an extensive metadata listing in a standardized (extremely verbose) format. For instance, from the metadata for Alabama 2012 I find (in the "spatial reference section" near the end) the following:
FOR CROPSCAPE USERS: Albers Conical Equal Area is the native projection used in ...
0
I have solved my problem with a workaround, so this is not exactly the answer to my question, because originally I wanted this with javascript, but, well, maybe it helps someone in the future:
I needed the srsname in the gml geometry because I have to use the PostGIS function ST_GeomFromGML and it is not working without srsname.
Actually I'm passing the ...
Top 50 recent answers are included
