[postgis-users] Rejilla IGN ETRS89 y Postgis

Daniel López Sánchez daniel.lopez.sanchez1983 at gmail.com
Tue May 29 00:05:36 PDT 2012


Hello

I found this post because I find the need to use the grid from postgis
the problem I have is that not what the directory proj4 in ubuntu and
not locate. I saw that in /usr/share/proj files I have other grid and
placing there does not seem to be using. I updated the spatialrefsys and
get these results:


"to25830";"POINT(465350.352417599 4473163.67823047)"
"to4230";"POINT(-3.40836762519858 40.4083676249853)"
"to4258";"POINT(-3.40836762519858 40.4083676259167)"

Hola

He encontrado este post porque me encuentro con la necesidad de usar la
rejilla desde postgis el problema que tengo es que no se cual es el
directorio de proj4 en ubuntu y no lo localizo. He visto que
en /usr/share/proj tengo otros ficheros de rejilla y ubicandolo ahi no
parece que la esté utilizando. He actualizado la spatial refsys y
obtengo estos resultados:

"to25830";"POINT(465350.352417599 4473163.67823047)"
"to4230";"POINT(-3.40836762519858 40.4083676249853)"
"to4258";"POINT(-3.40836762519858 40.4083676259167)"

Alguna sugerencia??

Un saludo y gracias

El vie, 18-05-2012 a las 16:31 +0200, Jose Carlos Martinez escribió:
> Hi, to use the grid file in order to transform from ETRS89 to ED50 and
> viceversa you should download the .gsb (PENR2009.gsb in the example)
> file from the IGN web site and copy that file to your proj4 directory.
> 
> Then modify the spatial_Ref_sys with (change the utm zone if you need
> it):
> 
> update spatial_ref_sys set proj4text = '+proj=utm +zone=30
> +ellps=GRS80 +units=m +no_defs +nadgrids=null' where srid =25830;
> update spatial_ref_sys set proj4text = '+proj=utm +zone=30 +ellps=intl
> +units=m +no_defs +nadgrids=PENR2009.gsb' where srid = 23030;
> update spatial_ref_sys set proj4text = '+proj=longlat +ellps=intl
> +units=m nadgrids=PENR2009.gsb +no_defs' where srid = 4230;
> update spatial_ref_sys set proj4text = '+proj=longlat +ellps=GRS80
> +towgs84=0,0,0,0,0,0,0 +no_defs' where srid = 4258;
> 
> after that you can check it out using:
> 
> with tabla (geom) as (
>   select st_geomfromtext ('POINT (465348.7823 4473240.8768)',23030)
> )
> select 'to25830' as crs, st_astext(st_transform (geom, 25830)) from
> tabla
> union all
> select 'to4230', st_astext(st_transform (geom, 4230)) from tabla
> union all
> select 'to4258', st_astext(st_transform (geom, 4258)) from tabla;
> 
> and you must get this result:
> 
>    crs   |                 st_astext                 
> ---------+-------------------------------------------
>  to25830 | POINT(465239.372687467 4473032.96844837)
>  to4230  | POINT(-3.40836762519858 40.4083676249853)
>  to4258  | POINT(-3.40966841871938 40.40718544315)
> 
> which means PostGIS is using the ntv2 grid file with CRS: 4258, 4230,
> 23030 and 25830.
> Regards,
> Jose
> 
> 
> On 17/05/2012 19:20, José María Amuedo wrote: 
> > Buenas, 
> > 
> > Me gustaría saber si Postgis puede gestionar la información
> > topológica a través de la rejilla elaborada por el IGN y no tener
> > problemas de cálculos de mediciones.
> > 
> > Saludos,
> > 
> > Jose Maria
> > 
> > Hello,
> > 
> > I would like to know if it is possible working with geographic
> > information with spanish ETRS89 projection in Postgis.
> > 
> > Wishes,
> > 
> > Jose Mariai
> > 
> > 
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
> 
> 
> -- 
> 
> ------------------------------
> José Carlos Martínez Llario
> 
> Producción Cartográfica y SIG.
> Dpto. Ingeniería Cartográfica.
> Univ. Politécnica de Valencia.
> 
> E-mail: jomarlla at cgf.upv.es
> Telf: 963877000 ext. 75599
> ------------------------------
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users





More information about the postgis-users mailing list