Hi all,
I know it is not the first time someone ask this kind of question but I still need some clarification from some experts here. I have a dataset from Macao to setup a demo on PostGIS/Geoserver + mapBuilder/uDig as a feasibility study. I got the all thing in shapefiles without any .prj file but I got a document with the following:
======================================================
Coordinates
Projection of Special Administrative Region of Macau
Transverse Mercator Projection.
Ellipsoid:
· International Hayford (a = 6,378, 388.000 m, 1/f = 297.00000000000)
· WGS-84 (World Geodetic System 1984) (a = 6,378,137.000 m, 1/f = 298.25722357000)
Origin
The following “datum” has been taken as the origin of the network for Special Administrative Region of Macau:
Longitude: 113º 32’ 11’’ E
Latitude: 22º 12’ 44’’ N
and the following as the corresponding rectangular coordinates:
20 000.000 m N and 20 000.000 m E
Projection parameters
International Hayford
Reference Ellipsoid : a (Major semi-axis) = 6,378,388.000 m
f (Flattening) = 1/297
Projection : Transverse Mercator Projection
Latitude of Origin : 22º 12’ 44’’ N
Longitude of Origin : 113º 32’ 11’’ E
False Easting : 20,000.000 m (meters) [X=x+20,000.000 m]
False Northing : 20,000.000 m (meters) [Y=y+20,000.000 m]
Datum Level : Mean Sea Level
Scale Factor : 1
I imported all feature type in PostGIS but my SRID is -1 so far (which is normal since I did not specify anything). I can access my data in uDig/qGIS no problem when I use directly PostGIS but not when I use GeoServer with mapbuilder (probably due to the missing CRS). In Geoserver I declared my feature type in EPSG:4326 and everything has been accepted and validated by GeoServer.
Here are a few questions I have to understand how to make the all things properly in PostGIS and GeoServer
- Should I insert the CRS in PostGIS/Geoserver as defined above or it is better to make a kind of “translation” in my data through some SQL code to make it fit in the 4326 system?
- based on the above CRS definition how can I write it in the EPSG format? I am not sure I understand how it is written. I believe I have everything to do it but how? Good question!!! Again isn’t it easier to “translate” my data (since I can see that I have a North and East translation). (something like GEOGCS[“WGS 84”, DATUM[“WGS_1984”, SPHEROID[“WGS 84”, 6378137.0, 298.257223563, AUTHORITY[“EPSG”,“7030”]], AUTHORITY[“EPSG”,“6326”]], PRIMEM[“Greenwich”, 0.0, AUTHORITY[“EPSG”,“8901”]], UNIT[“degree”, 0.017453292519943295], AXIS[“Lon”, EAST], AXIS[“Lat”, NORTH], AUTHORITY[“EPSG”,“4326”]])
I would appreciate some lights on my missing knowledge on this area!
Gerald
You should always tell geoserver what projection your data is in, even if it is the regular 4326 lat/lon projection. The data in the database should also be in the same projection and you should specify that in postgis.
When a request comes in from mapbuilder or udig, a "requested" SRS value is sent. Geoserver will look at that value, then look at the SRS of the data. If they are different, it will reproject the data for you into the "requested" projection.
Brent Owens
(The Open Planning Project)
Gerald Estadieu wrote:
Hi all,
I know it is not the first time someone ask this kind of question but I still need some clarification from some experts here. I have a dataset from Macao to setup a demo on PostGIS/Geoserver + mapBuilder/uDig as a feasibility study. I got the all thing in shapefiles without any .prj file but I got a document with the following:
Coordinates
Projection of Special Administrative Region of Macau
Transverse Mercator Projection.
Ellipsoid:
· International Hayford (a = 6,378, 388.000 m, 1/f = 297.00000000000)
· WGS-84 (World Geodetic System 1984) (a = 6,378,137.000 m, 1/f = 298.25722357000)
Origin
The following "datum" has been taken as the origin of the network for Special Administrative Region of Macau:
Longitude: 113º 32' 11'' E
Latitude: 22º 12' 44'' N
and the following as the corresponding rectangular coordinates:
20 000.000 m N and 20 000.000 m E
Projection parameters
International Hayford
Reference Ellipsoid : a (Major semi-axis) = 6,378,388.000 m
f (Flattening) = 1/297
Projection : Transverse Mercator Projection
Latitude of Origin : 22º 12' 44'' N
Longitude of Origin : 113º 32' 11'' E
False Easting : 20,000.000 m (meters) [X=x+20,000.000 m]
False Northing : 20,000.000 m (meters) [Y=y+20,000.000 m]
Datum Level : Mean Sea Level
Scale Factor : 1
I imported all feature type in PostGIS but my SRID is -1 so far (which is normal since I did not specify anything). I can access my data in uDig/qGIS no problem when I use directly PostGIS but not when I use GeoServer with mapbuilder (probably due to the missing CRS). In Geoserver I declared my feature type in EPSG:4326 and everything has been accepted and validated by GeoServer.
Here are a few questions I have to understand how to make the all things properly in PostGIS and GeoServer
- Should I insert the CRS in PostGIS/Geoserver as defined above or it is better to make a kind of "translation" in my data through some SQL code to make it fit in the 4326 system?
- based on the above CRS definition how can I write it in the EPSG format? I am not sure I understand how it is written. I believe I have everything to do it but how? Good question!!! Again isn't it easier to "translate" my data (since I can see that I have a North and East translation). (something like GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Lon", EAST], AXIS["Lat", NORTH], AUTHORITY["EPSG","4326"]])
I would appreciate some lights on my missing knowledge on this area!
Gerald
------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Brent,
thanks for your answer.
I understand that I have to specify the projection both in Geoserver and Postgis, and that’s where I am stuck because I actually do not know how to do it. In postgis I did not input SRID because I simply do not know what to do (just insert 4326 or translate all my features to correct the 20.000m translation described in my previous email and use 4326).
In geoserver you are forced to declare a CRS so I wrote 4326 but I am not sure neither how to declare my translation (if it is necessary at all).
Gerald
On 7/4/06, Brent Owens <brentowens@…84…> wrote:
You should always tell geoserver what projection your data is in, even
if it is the regular 4326 lat/lon projection. The data in the database
should also be in the same projection and you should specify that in
postgis.
When a request comes in from mapbuilder or udig, a “requested” SRS value
is sent. Geoserver will look at that value, then look at the SRS of the
data. If they are different, it will reproject the data for you into the
“requested” projection.
Brent Owens
(The Open Planning Project)
Gerald Estadieu wrote:
Hi all,
I know it is not the first time someone ask this kind of question but
I still need some clarification from some experts here. I have a
dataset from Macao to setup a demo on PostGIS/Geoserver +
mapBuilder/uDig as a feasibility study. I got the all thing in
shapefiles without any .prj file but I got a document with the following:
======================================================
Coordinates
Projection of Special Administrative Region of Macau
Transverse Mercator Projection.
Ellipsoid:
· International Hayford (a = 6,378, 388.000 m, 1/f = 297.00000000000)
· WGS-84 (World Geodetic System 1984) (a = 6,378,137.000 m, 1/f =
298.25722357000)
Origin
The following “datum” has been taken as the origin of the network for
Special Administrative Region of Macau:
Longitude: 113º 32’ 11’’ E
Latitude: 22º 12’ 44’’ N
and the following as the corresponding rectangular coordinates:
20 000.000 m N and 20 000.000 m E
Projection parameters
International Hayford
Reference Ellipsoid : a (Major semi-axis) = 6,378,388.000 m
f (Flattening) = 1/297
Projection : Transverse Mercator Projection
Latitude of Origin : 22º 12’ 44’’ N
Longitude of Origin : 113º 32’ 11’’ E
False Easting : 20,000.000 m (meters) [X=x+20,000.000 m]
False Northing : 20,000.000 m (meters) [Y=y+20,000.000 m]
Datum Level : Mean Sea Level
Scale Factor : 1
I imported all feature type in PostGIS but my SRID is -1 so far (which
is normal since I did not specify anything). I can access my data in
uDig/qGIS no problem when I use directly PostGIS but not when I use
GeoServer with mapbuilder (probably due to the missing CRS). In
Geoserver I declared my feature type in EPSG:4326 and everything has
been accepted and validated by GeoServer.
Here are a few questions I have to understand how to make the all
things properly in PostGIS and GeoServer
- Should I insert the CRS in PostGIS/Geoserver as defined above or it
is better to make a kind of “translation” in my data through some SQL
code to make it fit in the 4326 system?
- based on the above CRS definition how can I write it in the EPSG
format? I am not sure I understand how it is written. I believe I have
everything to do it but how? Good question!!! Again isn’t it easier to
“translate” my data (since I can see that I have a North and East
translation). (something like GEOGCS[“WGS 84”, DATUM[“WGS_1984”,
SPHEROID[“WGS 84”, 6378137.0, 298.257223563,
AUTHORITY[“EPSG”,“7030”]], AUTHORITY[“EPSG”,“6326”]],
PRIMEM[“Greenwich”, 0.0, AUTHORITY[“EPSG”,“8901”]], UNIT[“degree”,
0.017453292519943295], AXIS[“Lon”, EAST], AXIS[“Lat”, NORTH],
AUTHORITY[“EPSG”,“4326”]])
I would appreciate some lights on my missing knowledge on this area!
Gerald
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
- Should I insert the CRS in PostGIS/Geoserver as defined above or it is
better to make a kind of "translation" in my data through some SQL code to
make it fit in the 4326 system?
Well, you can do either, but it is definitely possible to define your
projection in both PostGIS and Geoserver. Which branch of Geoserver
are you running (WCS or trunk)?
- based on the above CRS definition how can I write it in the EPSG format?
Just see the wiki page(s):
http://docs.codehaus.org/display/GEOSDOC/Defining+a+custom+projection
And don't hesitate to ask more questions if something is not clear.
Alex