Regarding this new google mercator projection, I’ve made the following changes to add support for it in my Postgis database, and my Geoserver implementation:
### POSTGIS spatial_ref_sys
INSERT INTO spatial_ref_sys (srid, auth_name, auth_srid, srtext, proj4text)
VALUES (
900913,
'EPSG',
900913,
'PROJCS["WGS84 / Simple Mercator", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS_1984", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Longitude", EAST], AXIS["Latitude", NORTH]], PROJECTION["Mercator_1SP_Google"], PARAMETER["latitude_of_origin", 0.0], PARAMETER["central_meridian", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 0.0], PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["x", EAST], AXIS["y", NORTH], AUTHORITY["EPSG","900913"]]',
'+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'
);
### GEOSERVER geoserver/Data/user_projections/epsg.properties
900913=``PROJCS["WGS84 / Simple Mercator", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS_1984", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Longitude", EAST], AXIS["Latitude", NORTH]], PROJECTION["Mercator_1SP_Google"], PARAMETER["latitude_of_origin", 0.0], PARAMETER["central_meridian", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 0.0], PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["x", EAST], AXIS["y", NORTH], AUTHORITY["EPSG","54004"]]
The only thing is, my geoserver version (I want to say 1.6beta1) is using gt2-epsg-hsql-2.4-SNAPSHOT.jar. The HSQL database that is dynamically created does not contain this new projection. Does anyone know how I can incorporate the new projection here? I’m guessing a few insert statements would do, but I am unfamiliar what tables (and values for that matter) to insert records into.
Oh, and is the epsg.properties file under user_projections used by Geoserver?
Andrea Aime wrote:
···
__________________________________
Jeremy Nix
Senior Application Developer
Southwest Financial Services, Ltd.
(513) 621-6699
Jason Pickering ha scritto:
What is the status of this in the code? I have managed to get this
projection (10003) running from one of the nightly builds from a few
days back, with excellent results. However, for some reason, this
nightly build does not handle spatial views in PostGIS correctly, and
always assigns an SRID of -1. I have this documented and can log it to
jira if needed, but since it is a nightly build, this might be expected.
Is there a version that you would recommend for use with the Google
projection?
Jason,
I'm not aware of any change to the code to make views behave badly.
They are simply treaded as tables, and the code expects you to
register them in the geometry_column just as a standard table.
We have no woodoo to figure out from which tables the view
was generated and get the right crs from them.
If you have registered the views in geometry_columns, declared the
crs for each of the view geometry column in there, then yes we
are facing a bug and we need more informations to track it down,
otherwise it's expected behaviour.
Let me know
Cheers
Andrea
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> [http://get.splunk.com/](http://get.splunk.com/)
_______________________________________________
Geoserver-users mailing list
[Geoserver-users@lists.sourceforge.net](mailto:Geoserver-users@lists.sourceforge.net)
[https://lists.sourceforge.net/lists/listinfo/geoserver-users](https://lists.sourceforge.net/lists/listinfo/geoserver-users)