[Gfoss] Fwd: autorizzazione derivazione dati Friuli Venezia Giulia

christian pellegrin chripell a gmail.com
Gio 27 Nov 2008 09:21:34 CET


2008/11/26 Luca Delucchi <lucadeluge a gmail.com>:
> Qualcono sa il sistema di riferimento? non lo vedo scritto da nessuna parte
>

Coordinate Gauss-Boaga "ridotte" map-datum Roma40. "Ridotte" nel senso
che è applicato un offset per rendere il numero di cifre consistente
su tutto il territorio Regionale. La documentazione completa si trova
qua:

http://www.regione.fvg.it/rafvg/territorioambiente/dettaglio.act?dir=/rafvg/cms/RAFVG/AT9/ARG13/FOGLIA1/

nei link a destra.

Ecco il codice per trasformarle in WGS84 dato che un frammento di
codice python vale quanto 1000 parole (points è un array di oggetti
che rappresentano i punti della carta. Per ogni punto x,y,z sono le
coordinate "grezze" mentre  lat,long,h sono le WGS84 (in uscita)):

def tolatlong(points):
    gb = osgeo.osr.SpatialReference()
    gb.ImportFromProj4("+proj=tmerc +lat_0=0 +lon_0=15 +k=0.999600
+x_0=2520000 +y_0=0 +ellps=intl +units=m
+towgs84=-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68")
    wgs84 = osgeo.osr.SpatialReference()
    wgs84.ImportFromEPSG(4326)
    tr = osgeo.osr.CoordinateTransformation(gb, wgs84)
    for tp in points:
        p = tp[1]
        z = p['z']
        if z == 999999:
            z = 0
        else:
            z = z / 100.0
        (lon, lat, h) = tr.TransformPoint((p['x'] + 200000000) / 100.0,
                                          (p['y'] + 500000000) / 100.0,
                                          z)
        p['lat'] = lat
        p['lon'] = lon
        # Ci interessa l'altezza dal geoide
        p['h'] = z
        # p['h'] = h


-- 
Christian Pellegrin, see http://www.evolware.org/chri/
"Real Programmers don't play tennis, or any other sport which requires
you to change clothes. Mountain climbing is OK, and Real Programmers
wear their climbing boots to work in case a mountain should suddenly
spring up in the middle of the computer room."


Maggiori informazioni sulla lista Gfoss