I'm attempting to use OSM data in QGIS 2.8.2. I've imported my data into SpatiaLite layers using the following steps:   Vector -> OpenStreetMap -> Download Data... Vector -> OpenStreetMap -> Import Topology from XML... Vector -> OpenStreetMap -> Export Topology to SpatiaLite...   For the last step, I imported the polylines. I noticed that some of the primary highways have gaps in the middle. This isn't a case of a segment going outside my region--the gap is right in the middle of the region.  You'll notice that I put the primary highway on its own layer by selecting polylines with attributes I wanted. The light-blue lines beneath the primary highway are every single polyline. Notice that there is no polyline connecting the disjoint highway segments.  I'm assuming that when I chose "Vector -> OpenStreetMap -> Export Topology to SpatiaLite...", all polylines are exported no matter which attributes I check. Is that right? If not, is this a symptom of me not selecting "tunnels", for instance?  This is not a duplicate of . The aforementioned question is asking how to import OSM data. I've already demonstrated that I can import the data. The steps I listed are the same as in the accepted answer to . My question is about missing polylines.
22176
In QGIS 1.8 I used the openstreetmap plugin to request data from the server, or open a .osm XML file, which produced 3 layers (polygons, polylines and points) in QGIS.  This was great (give or take the 64bit bug which highly affects the freshly mapped area I work on), but how do I do that in QGIS 2.x?   I can't find any updated documentation about it.  In the vector menu, I've tried importing from osm servers, I get a .osm file, but then I'm stuck. There's a menu option for loading an XML file, but it produces a spatialite db, which apparently only has non-geometry tables when I try to add it as a spatialite layer. If I open the attribute table, I can see node ids, ways and so on, but I can't figure out how to actually make use of them.  I've also tried adding a vector layer from a .osm XML file. I get a gpsbabel window that shows nothing, then finally an invalid data source message in QGIS.
46492
I have several line layers (route, pipes, cables) that share the same geometry and would like to edit them simultaneously.   Is there a way to easily snap the geometry of the pipes and cables layers to the route layer so that I can simply change the geometry of the route layer and don't have to repeat all changes on the other two layers as well?  To clarify, I plan a fibreglass route and have three layers. The first one describes the route that I have to take to pass all homes that have to be connected. The second one contains the pipes in which the cables lie and the third layer is the cable layer. So all features on those layers have to have the same geometry. Once I change the pathway of the route layer, I have to apply the same changes to the other two layers to ensure that they are still aligned with the route layer. I'm not sure whether I understand your comments correctly, but I use the basic editing tools in QGIS 3.
53593
I have a CSV file where one line looks like this:  Duration, user, lat-start, long-start, lat-end, long-end 298, Casual,38.9101,-77.0444,38.91554,-77.03818   Each row in the CSV has two points and I need to draw a line between those two points for each row.   How can I do this using QGIS 1.8.0?   I have tried using the delimited text file plug-in, but it just draws points and has no line option from what I can see.
41338
I am digitising line-features based on WGS-84 point-coordinates from a PDF which cannot be copied from.  The final line layer should contain lines which each connect two points and have the following attributes:   Name of start point - name of end point value in [ft] value in [m] remark (same for all features) date of creation   Currently I have a csv-based point layer which simply contains the name and coordinates of each point.    Creating the point layer is no problem, but creating the lines is a bit of a hassle. Either I manually create a .csv containing all existing connections between points like the following table and run connect by lines:    Or I digitise the lines manually but fill in the values (except for the value in [ft]) automatically.    Personally I would prefer option 2, since option 1 involves more manual work and the process has to be repeated regularly (and I figure I could transfer the solution to other tasks), but I can't get the expression right which should fill in the name of the line. All other values are created flawlessly (though they are not taken from another layer based on geometry).  I added the WKT of each point to the point-layer. Currently I am running the following, which returns NULL, despite it seems to be correct to me:  attribute(get_feature('point-layer','geom',geom_to_wkt(start_point($geometry))),'Waypoint')||' - '||attribute(get_feature('point-layer','geom',geom_to_wkt(end_point($geometry))),'Waypoint')   Any ideas where I went wrong?
78868
In PostGIS 2.0, I am seeking an efficient way to create a spatially enabled view that is viewable in QGIS.    I followed the context of Part 2 of @Mike Toews answer to , and the view shows up as a point layer (in my case) in the "Add PostGIS Layers" dialog.  But after creating the view and spatially enabling it, I received the following error when trying to add the view to QGIS:     You must select a table in order to add a layer   Can someone explain why the spatial view will not load into QGIS, and what I need to do in order to make it loadable as a layer in QGIS?  I'm currently using QGIS v1.8 from the OSGEO installer  I view is built from the geonames database, loaded into PostGIS.  The geoname table/spatial data can be selected/viewed in QGIS just fine.  When I try to select the "mt_view", QGIS sees the view in the dialog, but won't let me select it.  It gives a dotted box around the area, but does not highlight and select the view.      I just noticed that when I run my first query:  CREATE OR REPLACE VIEW data.test AS SELECT * FROM data.geoname WHERE admin1='MT'   the view shows up in the QGIS Add Layer Dialog, but is unselectable.  Then when I run:  SELECT Populate_Geometry_Columns('data.test'::regclass);   I get the result of "0", where according to the , I think it should be returning "1".
80173
I have a woodland scheme advice layer that has a polygon for each area of advice (brown layer in the picture). I also have a polygon layer of UK local authorities (red boundary layer in the picture). I would like to perform a spatial query which returns the local authority name for each woodland advice scheme. This would work fine if each woodland advice scheme was found in just one local authority boundary. However many are found across a boundary of two different authorities. For instance, one scheme sits across the boundaries of the authorities of Fife and Angus. The scheme is the yellow selected polygon in the picture and the red line is the authority boundary. How do I get the spatial join to return a value of Fife; Angus (or something similar to identify two values) instead of just Fife or Angus.
87909
I want OSM administrative boundaries from . I can get the geodata in different formats there, but the attribute data always is a separate JSON file. I want them both in just one file, or to be able to merge the information.   I haven't found a solution to merge the GeoJSON.   What's the workflow to get the two files joined and saved as a shapefile, for example?
111414
Using QGIS v2.6.0-Brighton.  This question is not about editing layers geographically in anyway. It is merely trying to find data from two layers as you would in an SQL Query and append an extra ID to the second layer.  I have one polyline layer each identified with two different IDs. There is a point layer also with one of these IDs, I wish to find this corresponding ID and append them as a column to the point layer.  How do I do this without finding each row individually and typing it in manually (i.e. larger scale)? I would prefer to use SQL like syntax but if there is a GUI as well that would be ideal. Happy to install official plugins.
35644
I have a set of data as polygons, each with a Number field with value X. Is there then a way to copy this into X number of polys at the same location? (ideally points distributed across the poly but that's a bonus).  In QGIS I have tried Random Points, but this doesn't inherit attributes, and Join Attributes by Location is useless if the parent polys overlap.  The reason behind this is for collating data easily with the GroupStats plugin.
116910
I have a dataset where different road types are in separate layers, i.e. motorways, primary roads and secondary roads. In turn, each layer is subdivided by embedded codes into different sub-types - 4 lane roads, 2 lane roads etc.  I currently have the layer style set so that each road is outlined in black. Thanks to another answer to a question here on GIS SE, I already know how to make different road segments 'blend together' so the black outline remains 'underneath' the colour using symbol levels, and that works fine.  However, because for example, the primary roads are in an entirely separate layer to the secondary roads, and are obviously above them in the rendering order, the black outline of the primary roads cuts over the colour line of the secondary roads. This has the effect of making any secondary road that meets a primary road look like a dead end.  The drawing order is essentially:  Primary road colour Primary road outline Secondary road colour Secondary road outline   When it needs to be:  Primary road colour Secondary road colour Primary road outline Secondary road outline   So that the colour line of the Secondary road blends seamlessly with that of the Primary road. Within a layer this is obviously handled by Symbol Levels, but this is overridden by the layer order. Drawing Layer 0 in the Primary road layer is still higher than Drawing Layer 1 in the Secondary road layer.  How can I fix this?
111248
I was debating with one of my collegues on OpenLayers v/s Leaflet. I made a point that OpenLayers is much better API if we wish to build a project, where you need direct connectivity to the Geoserver and PostGIS.  Then I found , which looks pretty new but has the features of connectivity with the Geoserver and PostGIS.  So my project details are as follows,   Use the map interface to fetch Feature Info Create a customized tool that takes the lat/lon from user as to where he/she clicks on the map and then fetches the Climate Data from the raster (which is handled by a py script on the server) Allows user to upload excel, which is sent to the py script, which returns a GeoJSON, which creates Vector Features on the map Allow user to create vector polygons, which will fetch the Features it intersects from the WFS Layer. Fetches Layer from the PostGIS Datastore on GeoServer and displays the layers on the map.   So now I am confused on which is better and why using OpenLayers over Leaflet makes more sense or not?
25661
I'm currently trying to download data from OpenStreetMap specifically from San Carlos, Venezuela. I'd like to take the OSM file and convert it to SHP for use in ArcGIS.   I've used geofabrik for other country's in the past, but Venezuela is not available for download. Exporting a bounding box of the city directly from OpenStreetMap, then using OpenStreetMap Toolbox to convert the OSM to SHP gives me the lines but it's missing street names and city. Ideally I'd have addresses as well, but I can live with just street names.  Is there any way to achieve this? Export all streets within a city from OpenStreetMap, then convert it to SHP with city and street name attributes?
38524
I need to extract the Lat/long coordinates of the centroids of districts. My QGIS project SCR and the different layers have all been set on "WGS 84 / UTM zone 18N".   I've created the centroids using the usual tool. I could then extracted the coordinates using the "Vector > Geometry Tools > Export/Add Geometry Columns", or saving the layer in CSV typing "GEOMETRY=AS_XY" in the "Layers" part of the "OGR creation options".  Nevertheless, both methods output Cartesian coordinates, whereas I need Lat/long coordinates.
78856
I run the function "Join attributes by location" in Qgis 2.2 between a point vector layer and a polygon vector layer. When I open the resulting table of contents of point layer there is a column of numbers (fields from 10 to 13) that fail, because there is the same value in every row.   In "input" a list of unique numeric values (example: 100000000001, 100000000002, 100000000003...), in output results the same value in every row (example: -12345678, -12345678, -12345678...).
81329
I've been working with loads of shapefiles projected according to OSGB 1936 (CRS 27700). The project CRS is set to EPSG:27700 and "On the fly reprojection" to EPSG:27700 is set (I keep this as a default as I work with OSGB 1936 95% of my time).  I decided to download OSM layers from the OpenLayers plugin. When I load this, the EPSG in the bottom right of the screen goes from EPSG:27700 to EPSG:3857   Question 1: should this be happening anyway as it would suggest that the whole project has been re-projected to EPSG:3857?   As soon as the OSM layer is loaded it's way out of alignment but a quick pan seems to bring it altogether quiet nicely.   What I have noted is that (Question 2), if I try to re-specify the CRS to 27700, then the shapefiles "move" by a few tens of meters with respect to the OSM. Does this suggest that QGIS is doing a second re-projection (from what to what?)?   Also (Question 3), does it mean that if I import another shapefile that would be originally a dataset digitised with EPSG:27700 it would be re-projected to EPSG:3857 because the CRS in the bottom right of the screen was set to EPSG:3857 after the OSM import. This is all a bit confusing and logic would suggest that the import of a non-ESPG:27700 (project default CRS) should not go and change the EPSG setting in the bottom right of the screen. Anita Graser's book says on page 34 "Your project CRS will automatically be changed to Pseudo Mercator when you load a background map using the OpenLayers plugin option".   Does that mean there is no way of keeping ESPG:27700 active in the project when importing basemaps from OpenLayers? If so, what alternatives are there?  What I am trying to bottom out is to understand the correct way of importing basemaps (usually Google, Bing or OSM through the OpenLayers plugin) into my projects (always EPSG:27700) without losing alignment and getting layers to correctly re-project. I'm trying to support greater use of QGIS in my company but don't want to lose credibility by promoting the use of a tool that is misaligning datasets. Don't get me wrong. QGIS is a great tool and I am very fond of it but importing layers with different CRS's is quite common these days and getting this right from the start is half the job done.  I did quite an extensive Google search before posting and didn't come up with a recent, clear cut answer to my questions above. There is a bit of content out there on problems with older versions of QGIS, PROJ4, etc. but nothing recent for QGIS 2.0 so worth an update.
101252
I'm trying to add Openstreet Map (OSM) to QGIS3 (Ubuntu 16.04) as a background WMS layer. I found a list of , and a WMS tab in the new Data Source Manager (Ctrl+L).  But after clicking the new button and entering the URL http://www.osm-wms.de to Create a New WMS Connection, I get a new connection called osm, which cannot be used. I can't expand the connection in the index pane as with other things like PostGIS, or add anything from that connection.  Can someone provide some pointers on how to manually add the WMS layer (ideally without using plugins)?
110545
I do have two vector layer, of which one is a point layer based on "events" by remote sensing and the second one is a line layer from local research.   In my case these are earthquakes and tectonic faults, but I guess one could simply choose "car-accidents and roads" as a general example.  So what I'd like to do is move/copy the points onto the closest point of the lines, as long as its within a tolerance distance (say 1-2km or 0.0xx°), with the new point layer (+attr moved y/n).  Any ideas ?  Linux, QGIS 1.8