Re: [OSGeo-Discuss] OSGeo has been accepted at Google Summer of Code!
uDig will partecipate. Thanks you very much Anne. Ciao, Andrea On Fri, Mar 16, 2012 at 10:09 PM, Anne Ghisla a.ghi...@gmail.com wrote: Hello all, and sorry for cross-posting, Wolf, Hamish and I have the great pleasure to announce that OSGeo has been accepted as a mentoring organization to the Google Summer of Code program [0]! What to do now? - OSGeo projects: confirm your participation by replying to this email - Would-be mentors: have a look at Mentors Guide, discuss with previous years' mentors and register. All links and info can be found at [1] - Would-be students: talk with the developers of your preferred project(s) and start creating your proposals. Have a look at the ideas page for inspiration [2] - All: feel free to discuss on soc mailing list on how to improve this year's SoC, and add your ideas to the wiki [3] [0] http://www.google-melange.com/gsoc/program/accepted_orgs/google/gsoc2012 and http://www.google-melange.com/gsoc/org/show/google/gsoc2012/osgeo [1] http://wiki.osgeo.org/wiki/Google_Summer_of_Code_2012_Administrative [2] http://wiki.osgeo.org/wiki/Google_Summer_of_Code_2012_Ideas [3] http://wiki.osgeo.org/wiki/Google_Summer_of_Code_2012_Improvements All the best! Anne Ghisla, Wolf Bergenheim and Hamish Bowman -- OSGeo GSoC Administrators ___ Discuss mailing list Discuss@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/discuss ___ Discuss mailing list Discuss@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/discuss
Re: [OSGeo-Discuss] Call for 2011 Annual Report Items: Sponsors, Projects, Chapters, Committee, Board
Morning Landon: I have started the initial draft of the incubation committee report here: - http://wiki.osgeo.org/wiki/Incubation_Committee_Report_2011 Given that many of these projects have not completed incubation (GEOS, GeoServer, gvSIG etc…) I will contact team leads and ask them to provide a small status update as part of this incubation report. Jody___ Discuss mailing list Discuss@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/discuss
Re: [OSGeo-Discuss] Need for to to convert/deconstruct a shapefile to create a relational table
On 17/03/12 00:06, Stephen Woodbridge wrote: On 3/16/2012 12:52 AM, Simon Cropper wrote: Hi, Does anyone know of a simple means to take a shapefile and create a either a SQLite or xBase table? Essentially it is taking an attached attribute table, inserting the coordinates in a field and saving the new file in a designated format. Most of the data being converted is point data or fixed area samples. Ideally the converter could record the centroid for grid cells with details of the furthest point. I know of various tools that can do this 'manually' one step at a time but as I have many files that come regularly, I would like to somehow automate the process. I think ogr2ogr that is part of the GDAL release will do this. -Steve W ___ Discuss mailing list Discuss@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/discuss Unfortunately ogr2ogr transfers data from one format to another but maintains the geospatial data separate from the attribute table. So if you have a shape file and export to sqlite for example you end up with one table with the attribute data and the other with the geospatial data. If you export to CSV only the attribute data gets converted -- no spatial data is bundled with the info. I know you can use SQL but you can't easily access the geometry table data using ogr2ogr. What I need is select data.*, geometry.lat, geometry.long from data, geometry where data.siteid==geometry.siteid into newtable but I can't seem to access the spatial data in the shapefile in this way and have the data exported into a simple flat table (DBF, CSV). I tried to see if I could convert to SQLite then export from there but the geometry data is stored as a blob field. -- Cheers Simon Simon Cropper - Open Content Creator / Website Administrator Free and Open Source Software Workflow Guides Introduction http://www.fossworkflowguides.com GIS Packages http://www.fossworkflowguides.com/gis bash / Pythonhttp://www.fossworkflowguides.com/scripting ___ Discuss mailing list Discuss@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/discuss
Re: [OSGeo-Discuss] Need for to to convert/deconstruct a shapefile to create a relational table
On 3/18/2012 7:50 PM, Simon Cropper wrote: On 17/03/12 00:06, Stephen Woodbridge wrote: On 3/16/2012 12:52 AM, Simon Cropper wrote: Hi, Does anyone know of a simple means to take a shapefile and create a either a SQLite or xBase table? Essentially it is taking an attached attribute table, inserting the coordinates in a field and saving the new file in a designated format. Most of the data being converted is point data or fixed area samples. Ideally the converter could record the centroid for grid cells with details of the furthest point. I know of various tools that can do this 'manually' one step at a time but as I have many files that come regularly, I would like to somehow automate the process. I think ogr2ogr that is part of the GDAL release will do this. -Steve W ___ Discuss mailing list Discuss@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/discuss Unfortunately ogr2ogr transfers data from one format to another but maintains the geospatial data separate from the attribute table. So if you have a shape file and export to sqlite for example you end up with one table with the attribute data and the other with the geospatial data. If you export to CSV only the attribute data gets converted -- no spatial data is bundled with the info. I know you can use SQL but you can't easily access the geometry table data using ogr2ogr. What I need is select data.*, geometry.lat, geometry.long from data, geometry where data.siteid==geometry.siteid into newtable but I can't seem to access the spatial data in the shapefile in this way and have the data exported into a simple flat table (DBF, CSV). I tried to see if I could convert to SQLite then export from there but the geometry data is stored as a blob field. Does this get you any closer to what you need: SELECT OGR_GEOM_WKT, * FROM data; -Steve ___ Discuss mailing list Discuss@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/discuss
Re: [OSGeo-Discuss] Need for to to convert/deconstruct a shapefile to create a relational table
On 19/03/12 12:46, Stephen Woodbridge wrote: On 3/18/2012 7:50 PM, Simon Cropper wrote: On 17/03/12 00:06, Stephen Woodbridge wrote: On 3/16/2012 12:52 AM, Simon Cropper wrote: Hi, Does anyone know of a simple means to take a shapefile and create a either a SQLite or xBase table? Essentially it is taking an attached attribute table, inserting the coordinates in a field and saving the new file in a designated format. Most of the data being converted is point data or fixed area samples. Ideally the converter could record the centroid for grid cells with details of the furthest point. I know of various tools that can do this 'manually' one step at a time but as I have many files that come regularly, I would like to somehow automate the process. I think ogr2ogr that is part of the GDAL release will do this. -Steve W ___ Discuss mailing list Discuss@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/discuss Unfortunately ogr2ogr transfers data from one format to another but maintains the geospatial data separate from the attribute table. So if you have a shape file and export to sqlite for example you end up with one table with the attribute data and the other with the geospatial data. If you export to CSV only the attribute data gets converted -- no spatial data is bundled with the info. I know you can use SQL but you can't easily access the geometry table data using ogr2ogr. What I need is select data.*, geometry.lat, geometry.long from data, geometry where data.siteid==geometry.siteid into newtable but I can't seem to access the spatial data in the shapefile in this way and have the data exported into a simple flat table (DBF, CSV). I tried to see if I could convert to SQLite then export from there but the geometry data is stored as a blob field. Does this get you any closer to what you need: SELECT OGR_GEOM_WKT, * FROM data; -Steve ___ Discuss mailing list Discuss@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/discuss That kind of worked. At least it cut out some time. Here is the small script to create a copy of the attribute table in a DBF directory that contains the coordinate data. Unfortunately you still need to parse the field to get the X,Y coordinates. #!/bin/bash # Extracts attribute table from shapefile and attaches geometry # data to each record, essentially making a flat file # Get names of all shapefiles in current directory for TheFile in *.shp; do # Get just name so we can use in SQL FileName=${TheFile%.*} # Provide some feedback echo Extracting attribute data from $TheFile file.. # Copy, rather than convert, attribute table with coordinate # data to new file ogr2ogr -sql SELECT OGR_GEOM_WKT AS GEOM_WKT, * FROM $FileName -overwrite ./dbf $TheFile done -- Cheers Simon Simon Cropper - Open Content Creator / Website Administrator Free and Open Source Software Workflow Guides Introduction http://www.fossworkflowguides.com GIS Packages http://www.fossworkflowguides.com/gis bash / Pythonhttp://www.fossworkflowguides.com/scripting ___ Discuss mailing list Discuss@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/discuss
Re: [OSGeo-Discuss] Need for to to convert/deconstruct a shapefile to create a relational table
On 2012-03-18, at 6:46 PM, Stephen Woodbridge wrote: Does this get you any closer to what you need: SELECT OGR_GEOM_WKT, * FROM data; -Steve That's some nice ogr-foo to learn :) Simon, it sounds like you could wrap this up pretty quickly in a python script too. A rough approach example: from osgeo import ogr ds = ogr.Open(/tmp/on_geoname.shp) l1 = ds.GetLayerByIndex(0) for f in range(l1.GetFeatureCount()): printme = [] g1 = l1.GetFeature(f) for fld in range(g1.GetFieldCount()): printme.append(g1.GetFieldAsString(fld)) gr1 = g1.GetGeometryRef() printme.append(str(gr1.GetX()) + - + str(gr1.GetY())) print printme For what it's worth, Tyler ___ Discuss mailing list Discuss@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/discuss