[Mapbender-users] Problems with the handling of some OWS in Mapbender2 - solved
Armin Retterath
armin.retterath at lvermgeo.rlp.de
Wed Jul 9 04:58:53 PDT 2014
Hello,
the solution below is not sufficient, cause points out of a special area
are not projected.
E.g.:
SELECT X(st_transform(GeometryFromText('POINT(-180 -90)',4326),25832));
Will allways throw an error:
ERROR: transform: couldn't project point (-180 -90 0): latitude or longitude exceeded limits (-14)
It is not so easy to allow arbitrary transformations. Projected systems
are normally defined for special areas. The epsg registry have
information about the bboxes of those areas. If a transformation of a
longlat (EPSG:4326) point (bbox) into such a local system is demand, it
will be needed to alter the coordinates!
In following changesets a possibility is implemented to define such
areas for projection systems in the mapbender.conf:
http://trac.osgeo.org/mapbender/changeset/8993/trunk/mapbender
http://trac.osgeo.org/mapbender/changeset/8994/trunk/mapbender
Hope this helps a little bit ;-)
Armin
On 02.07.2014 16:03, Armin Retterath wrote:
> Hello together,
>
> in some Mapbender implementations it is not possible to register
> services, that have a global extent like -180,-90,180,90.
> It was possible without any problems under postgis 1.3.1 and proj4 4.5
> (e.g. debian lenny), but when updating to postgis 1.5.1 in conjunction
> with proj4.7 (e.g. debian wheezy) it came to problems when nadgrids
> are used to make precise coordinate transformations.
>
> The problem was the definition of the nadgrids in the epsg file and in
> the postgis spatial_ref_sys table. Before proj4.6, someone was able to
> define following proj4text:
>
> +proj=tmerc +lat_0=0 +lon_0=6 +k=1 +x_0=2500000 +y_0=0 +ellps=bessel
> +units=m +nadgrids=BETA2007.gsb
>
>
> When st_transform was invoked, the transformation was done without
> problems. In the newer version an error will occur, if the point that
> should be transformed is not in the bbox of the nadgrid itself. The
> spatial selects will throw an error and mapbender makes trouble ;-) .
>
> If you update to a newer postgis/proj version, you should set the @
> sign before the .gsb file and give a null value for the case, that the
> gsb file is not used (e.g. the point is outside the bbox of the grid
> or the grid file was not found).
>
> +proj=tmerc +lat_0=0 +lon_0=6 +k=1 +x_0=2500000 +y_0=0 +ellps=bessel
> +units=m +nadgrids=@BETA2007.gsb,null
>
>
> After this you will not longer will have trouble with your postgis and
> mapbender ;-) .
>
> SQL to update the proj4text in case of german-wide BETA2007
> transformations (you have to download the BETA2007.gsb to the proj
> folder before):
>
> UPDATE spatial_ref_sys set proj4text = '+proj=tmerc +lat_0=0 +lon_0=6
> +k=1 +x_0=2500000 +y_0=0 +ellps=bessel +units=m
> +nadgrids=@BETA2007.gsb,null' WHERE srid = 31466;
>
> UPDATE spatial_ref_sys set proj4text = '+proj=tmerc +lat_0=0 +lon_0=9
> +k=1 +x_0=3500000 +y_0=0 +ellps=bessel +units=m
> +nadgrids=@BETA2007.gsb,null' WHERE srid = 31467;
>
> UPDATE spatial_ref_sys set proj4text = '+proj=tmerc +lat_0=0 +lon_0=12
> +k=1 +x_0=4500000 +y_0=0 +ellps=bessel +units=m
> +nadgrids=@BETA2007.gsb,null' WHERE srid = 31468;
>
> UPDATE spatial_ref_sys set proj4text = '+proj=tmerc +lat_0=0 +lon_0=15
> +k=1 +x_0=5500000 +y_0=0 +ellps=bessel +units=m
> +nadgrids=@BETA2007.gsb,null' WHERE srid = 31469;
>
> UPDATE spatial_ref_sys set proj4text = '+proj=utm +zone=32
> +ellps=GRS80 +units=m +datum=WGS84' WHERE srid = 25832;
>
>
> Hope that helps a little bit
>
> Armin
>
--
Zentrale Stelle Geodateninfrastruktur
Rheinland-Pfalz
LVermGeo-RP
Ferdinand-Sauerbruch-Straße 15
56073 Koblenz
0261/492-466
armin.retterath at lvermgeo.rlp.de
http://www.geoportal.rlp.de
More information about the Mapbender_users
mailing list