[Qgis-user] Trouble with classifying a Spatialite layer (and OSM data)

Mayeul Kauffmann mayeul.kauffmann at free.fr
Tue Sep 20 15:21:22 PDT 2011


(answering to the list as there is still interest I guess)
original thread:
http://osgeo-org.1803224.n2.nabble.com/Trouble-with-classifying-a-Spatialite-layer-td6741169.html

Hi Jukka,

Thanks for the link to your  Super_easy_WMS_server.pdf. Looks great!
You asked:
"Does your osm2postresql tool work on Windows? "
The first part is install / configuration of the database in bash, so
no.
However, two thirds of the code (last part) is pure sql and can be run
on any postgis install. I've been using Linux at work and home for so
many years that I forgot everything I new about windows scripting.
However, if you think it is worth it, I can help you port osm2postresql
to Windows.
Still, I believe that improving the current OSM import QGIS plugin would
be probably more appropriate. I have detailed what to do a few months
ago in this thread:
http://osgeo-org.1803224.n2.nabble.com/Contributions-for-improved-QGIS-OSM-viewer-plugin-td6357363.html
In the last post I listed the only two problems that remain, mainly this
bug (minimum symbol size is 0.01 degree):
http://trac.osgeo.org/qgis/ticket/3825
plus the fact that roundabouts should NOT be considered as polygons.

Mayeul

Le mardi 20 septembre 2011 à 14:41 +0000, Rahkonen Jukka a écrit :
> Hi,
> 
> Thank you for the answer, it was not at all too late. Your rendering examples are impressive.
> 
> I have been playing with Spatialite and considered if it could be used as a media for delivering data for end users. I do not mean only  OSM data but also other datasets like the free vector data from the National Land Survey of Finland. Because in such use it is impossible to know what kind of filters users are willing to use the automatic classification of the resulting layer in the QGIS would be a great help for the users.
> 
> Does your osm2postresql tool work on Windows? Windows users are in a trouble with OSM data and that's also one reason for my Spatialite experiments. If OSM data would be available as Spatialite database people would not need to use osm2pgsql and PostGIS. Unfortunately Spatialite is rather slow but I believe gdal/ogr will soon support it better.
> Here is some reading about what I have done this far http://latuviitta.org/documents/Super_easy_WMS_server.pdf
> 
> -Jukka-
> 
> 
> 
> > -----Alkuperäinen viesti-----
> > Lähettäjä: Mayeul Kauffmann [mailto:mayeul.kauffmann at free.fr] 
> > Lähetetty: 19. syyskuuta 2011 21:47
> > Vastaanottaja: Rahkonen Jukka
> > Aihe: Re: [Qgis-user] Trouble with classifying a Spatialite layer
> > 
> > Hi Jukka,
> > I read this message, maybe a bit late.
> > One solution is to filter features (in QGIS) based on
> > a full text representation of the tags.
> > I created a suite of tools which helps this process. It also classify
> > the results (including many types of ways). I store the OSM data in
> > postgis but sometimes I export to sqlite.
> > 
> > You can get this:
> > http://www.qgis.org/wiki/OpenStreetMap_data_rendered_with_QGIS
> > 
> > 
> > I have developed a tool to prepare the data for use in QGIS, see:
> > http://wiki.openstreetmap.org/wiki/Osm2postgresql
> > 
> > See also:
> > http://www.qgis.org/wiki/Using_OpenStreetMap_data
> > 
> > I also created tools to make a statistical analysis of the 
> > frequency of
> > tags, and used this to fine tune my styles. FOr a demo, see:
> > http://www.youtube.com/watch?v=NBBYtH2svw0
> > For my styles:
> > http://wiki.openstreetmap.org/wiki/Osm2postgresql#See_also
> > Hope this helps,
> > 
> > 
> > Mayeul
> > 
> > Le mardi 30 août 2011 à 07:20 +0000, Rahkonen Jukka a écrit :
> > > Hi,
> > >  
> > > I am trying to classify a Spatialite layer but if I select 
> > the VARCHAR
> > > type attribute to be used for classification and press the Classify
> > > button in Layer Properties - Style dialog the value list does not
> > > appear.  I can classify the layer manually by creating classes with
> > > Add class button and writing the values by hand. If I convert the
> > > Spatialite layer into shapefile and use that in QGIS then the
> > > automatic classification works. I used ogr2ogr for conversion as 
> > > > ogr2ogr -f "ESRI Shapefile" -sql "select * from osm_line where
> > > highway in not null" highways.shp berlin.sqlite
> > >  
> > > I am using QGIS 1.8.0-Trunk r339d800 installed with Osgeo4W 
> > on Windows
> > > XP.  My test database can be downloaded from
> > > http://188.64.1.61/tiedostot/berlin_2011_08_25.zip. 
> > Database contains
> > > OpenStreerMap data of Berlin converted first into PostGIS with
> > > osm2pgsql and then to Spatialite with ogr2ogr.  The QGIS layer I was
> > > trying to classify is the osm_line layer filtered with sql="highway"
> > > NOT null.  Classification method is Unique value with the old
> > > symbology and Categorized with the new symbology. Neither 
> > of them show
> > > me the attribute value list.
> > >  
> > > Regards,
> > >  
> > > -Jukka Rahkonen-
> > > _______________________________________________
> > > Qgis-user mailing list
> > > Qgis-user at lists.osgeo.org
> > > http://lists.osgeo.org/mailman/listinfo/qgis-user
> > 
> > 
> > 





More information about the Qgis-user mailing list