La descarga está en progreso. Por favor, espere

La descarga está en progreso. Por favor, espere

|| Free Software Developers for hire || Usando Python para integrar mis datos con GoogleMaps, y viceversa Anthony.

Presentaciones similares


Presentación del tema: "|| Free Software Developers for hire || Usando Python para integrar mis datos con GoogleMaps, y viceversa Anthony."— Transcripción de la presentación:

1 http://except.com.arhttp://except.com.ar || Free Software Developers for hire || Usando Python para integrar mis datos con GoogleMaps, y viceversa Anthony Lenton - Except 8 as jornadas regionales de Software Libre Argentina – Agosto 2008 Anthony Lenton - anthony@except.com.aranthony@except.com.ar Except 0

2 http://except.com.arhttp://except.com.ar || Free Software Developers for hire || Resumen de la charla Presentación de los jugadores Integración hacia un lado Integración hacia el otro Preguntas 1

3 http://except.com.arhttp://except.com.ar || Free Software Developers for hire || Qué tiene Google Maps? Fotos satelitales de buena calidad Mapas callejeros Integración con muchos datos georeferenciados Geocodificación, en algunos lados Interfaz web interesante Nada de otro mundo, pero es popular 2

4 http://except.com.arhttp://except.com.ar || Free Software Developers for hire || Qué tienen nuestros datos? Son especiales, únicos, mejores Son de la zona que nos concierne Están en la proyección que nos gusta Tenemos el control 3

5 http://except.com.arhttp://except.com.ar || Free Software Developers for hire || Qué tiene Python? Muy adecuado para scripting y prototipado rápido Viene con las baterías incluidas :-) Sencillo, legible, soportado por la comunidad 4

6 http://except.com.arhttp://except.com.ar || Free Software Developers for hire || Fuentes tradicionales y aplicaciones de escritorio Como fuentes tradicionales usaremos Shapefiles, PostGIS, y GeoTIFF Como aplicación de escritorio usaremos Thuban http://thuban.intevation.org/ 5

7 http://except.com.arhttp://except.com.ar || Free Software Developers for hire || Un par de trucos viejos Alcanza con generar un poco de javascript Datos en latitud/longitud (sin proyectar) Se pone pesado con un par de cientos de puntos Podemos de paso mostrar los metadatos de los puntos http://localhost/~anthony/JRSL/1/ http://localhost/~anthony/JRSL/2/ GMarkers, GPolyline, GPolygon 6

8 http://except.com.arhttp://except.com.ar || Free Software Developers for hire || ✔ Google Maps API http://code.google.com/apis/maps/documentation/ ✔ shapelib, dbflib: ftp://intevation.de/users/bh/ftp://intevation.de/users/bh/ ✔ psycopg: http://www.initd.org/svn/psycopg/http://www.initd.org/svn/psycopg/ 14

9 http://except.com.arhttp://except.com.ar || Free Software Developers for hire || Superponiendo imágenes Para datos raster Hay que escribir un proveedor de tiles Proveer las imágenes en tiles de 256x256 Datos proyectados, claramente http://localhost/~anthony/JRSL/3/ http://localhost/~anthony/JRSL/3.5/ GTileLayer, GTileLayerOverlay 15

10 http://except.com.arhttp://except.com.ar || Free Software Developers for hire || Y... la proyección? Sea la tierra esférica, y con longitud de circunferencia una potencia de dos Las cuentas se simplifican 20 http://trac.osgeo.org/proj/

11 http://except.com.arhttp://except.com.ar || Free Software Developers for hire || Enter MapServer Podemos generar datos raster a partir de nuestros datos vectoriales No más límites por cantidad de features Software libre Trabaja (muy bien!) convirtiendo nuestros datos en imágenes Hay bindings para Python http://localhost/~anthony/JRSL/4/ 23

12 http://except.com.arhttp://except.com.ar || Free Software Developers for hire || ✔ shapelib, dbflib: ftp://intevation.de/users/bh/ftp://intevation.de/users/bh/ ✔ psycopg: http://www.initd.org/svn/psycopg/http://www.initd.org/svn/psycopg/ ✔ mapcript: http://mapserver.gis.umn.edu/http://mapserver.gis.umn.edu/ 30

13 http://except.com.arhttp://except.com.ar || Free Software Developers for hire || Integrando con callbacks Perdimos la manera fácil de mostrar metadatos sobre los puntos Hay que escribir un callback cgi o script de algún tipo Obtenemos un control más absoluto EventHandlers http://localhost/~anthony/JRSL/5/ 31

14 http://except.com.arhttp://except.com.ar || Free Software Developers for hire || Y geocodificar? Necesitamos datos que lo soporten La integración no es el problema http://localhost/~anthony/JRSL/6/ 35

15 http://except.com.arhttp://except.com.ar || Free Software Developers for hire || El camino inverso Ojo con los Terminos y Condiciones! La mayoría de las veces los tiles se obtienen de la misma manera Hay que unir los pedazos, y agregar georeferenciamiento Datos raster 40

16 http://except.com.arhttp://except.com.ar || Free Software Developers for hire || El camino inverso A veces viene un feed xml Si no, hay que leer el código Con los datos armamos nuestro shapefile, o lo que gustemos Datos vectoriales 42

17 http://except.com.arhttp://except.com.ar || Free Software Developers for hire || ✔ shapelib, dbflib: ftp://intevation.de/users/bh/ftp://intevation.de/users/bh/ ✔ psycopg: http://www.initd.org/svn/psycopg/http://www.initd.org/svn/psycopg/ ✔ mapcript: http://mapserver.gis.umn.edu/http://mapserver.gis.umn.edu/ ✔ gdal, ogr: http://www.gdal.org/http://www.gdal.org/ 44

18 http://except.com.arhttp://except.com.ar || Free Software Developers for hire || Preguntas? Anthony Lenton - anthony@except.com.aranthony@except.com.ar Except 45


Descargar ppt "|| Free Software Developers for hire || Usando Python para integrar mis datos con GoogleMaps, y viceversa Anthony."

Presentaciones similares


Anuncios Google