Query field for PostGIS data provider

55 views
Skip to first unread message

M.Tavakkoli

unread,
Jan 10, 2019, 5:49:17 AM1/10/19
to MapSurfer.NET
Hello,
I have imported world planet.osm data into PostgreSQL database using osm2pgsql.
It has generated 4 table: osm_line, osm_point, osm_polygon and osm_roads.
Now in MapSurfer.net when I select PostGIS as data provider, in Create provider window,
which value should I enter for 'Query' field?
Thanks for your guidance.

Runge

unread,
Jan 10, 2019, 1:41:52 PM1/10/19
to mapsur...@googlegroups.com
Hi,

You can define the query in two ways
1. As a full SQL select statement, for example "SELECT osm_id, landuse, way FROM planet_osm_line WHERE landuse IS NOT NULL"
2. Just where clause condition, for example "landuse IS NOT NULL"

 

M.Tavakkoli

unread,
Jan 12, 2019, 1:12:50 AM1/12/19
to MapSurfer.NET
Hi Runge,
I entered 'landuse IS NOT NULL' for Query field, but see this error: 42601: syntax error at or near "LIMIT".
Whether this condition should be used always or I should specify another condition and also is this condition enough for all tables?
Reply all
Reply to author
Forward
0 new messages