Tag Info

New answers tagged

0

There's also desktop client solution (although commercial) for GPS-enabled imagery and video acquisition, storing and publishing: GeoView. It recognizes a wide range of GPS-related data embedded in a still photo (or video), such as position, elevation, azimuth, and more. Once data is recognized, it may get stored into geospatial database for further ...


2

You will find the route relations in the planet_osm_line table, with a negative osm_id field value corresponding to the OSM relation ID. Once you have loaded the table, you can set a filter on the table with rightclick on the layer entry: "osm_id" = '-51855' to get only the trail you want, and then export the result to the format you want. If you want a ...


2

The use of && will return quicker than ST_Intersects, as it is only checking bounding boxes, which is the first stage of any spatial intersection query, via the bounding boxes stored as part of R-Tree indexing (technically a GIST index in Postgis, but the bounding box is still used in index construction). As, the second stage, the actual intersection ...


1

Yes, regex is supported with the =~ operator. For example, [name=~'^.{12,}$'] { text-name: ''; } will remove labels above a certain length. You can find this and more examples in this Advanced CartoCSS techniques slide deck.


1

PostgreSQL doesn't use indexes for functions, it uses indexes for operators only. What happens is function inlining. ST_INTERSECTS is defined as: CREATE OR REPLACE FUNCTION ST_Intersects(geom1 geometry, geom2 geometry) RETURNS boolean AS 'SELECT $1 && $2 AND _ST_Intersects($1,$2)' LANGUAGE 'sql' IMMUTABLE; And so the query gets rewritten to use ...


0

You have to consider that the tiles are not built from your database only. For low zoom levels, coastline shapefiles and Natural Earth shapefiles are used, and osm data is added from about zoom level 5 onwards. There is a special roads layers with simplified geometries for lower zoom levels as well. The rendering time is a balance of database query time ...


0

You can look at the OSM-Full-History-Dump File. Every change that has been made ever to an osm feature (geometry or attributes) is saved in this file. Using the OSM-History-Splitter (https://github.com/MaZderMind/osm-history-splitter) to clip the OSM history file to a BBOX and use the OSM-History-Importer (https://github.com/MaZderMind/osm-history-renderer) ...


2

Note that planners have difficulty with subqueries, and your example can be rewritten without subqueries. A flattened query should look like this: SELECT A.* FROM osm_addr2 AS addr, osm_addr2 AS POI WHERE POI.osm_id=-332537 AND ST_Intersects(addr.geometry, POI.geometry); There's a relevant example in the manual (last two SQL examples), where a subquery is ...


0

Judging by the cost and quantity of rows estimated to be returned, the spatial index wasn't necessary. At least the optimizer didn't think it was and chose a seq scan instead. Is it running slow? How may rows do you expect back? How many rows are in the table altogether? Sorry if I overlooked that in your question but sometimes a full scan is faster. ...


1

As an alternative to osmosis you can try to use osmconvert and osmfilter in your scripts. Availeable on both, WIN and Linux. You can download a bigger country extract from geofabrik.de or other sources, and then do a kind of clipping with bounding boxes or maybe even polygon files. Maybe there are even boundary relations which describe the exact ...


0

This is a great post highlighting available solutions. We went the OSM pgRouting approach for drive time / distance polygons and packaged it up into a service that we are using with our premium Google Maps extension. I am happy to share how we built it if you are interested. Happy to spread the knowledge. Here is how we ultimately packaged it up. ...


1

I have found that rearranging the query so that the sub-query is at the same level as the initial select, essentially a Cartesian product, but then using the where clause to restrict the records read, will cause the indexes to be used and avoid a full table scan. SELECT * FROM osm_addr2 AS addr, (SELECT geometry FROM osm_addr2 WHERE osm_id=-332537) ...


1

I had a similar problem an I solved it with the following statement: SELECT city.name, postcode.tags->'postal_code' FROM planet_osm_polygon postcode JOIN planet_osm_polygon city ON ST_INTERSECTS(city.geometry, postcode.geometry) AND NOT ST_Touches(city.geometry, postcode.geometry) WHERE a.name = 'cityname' AND b.boundary = 'postal_code'; ...


0

You might try Maperitve as a lightweigt source of rendering tiles as well. It works on Windows on small and medium areas, and needs no database.


0

mod_tile effectively has no Windows support. If you don't need it's cache invalidation, you might consider a tile server like MapProxy which has Windows support and can render a Mapnik-based map. You'll find that there is relatively little to no documentation about getting all of the parts to work together on Windows systems. If you do get it working, ...


2

The reason you are getting a "not well formed" error in console is because your tilejson file loads asynchronously, meaning the script continues to execute while the tilejson object is only partly loaded as an incomplete promise object. So when you pass your tilejson object to L.mapbox.map, you are actually passing a promise object (which it can't parse). ...


0

Are you committed to using OpenLayers only? Is Leaflet an option? I found the Leaflet code a lot simpler in the local-tiles use case. Here's the code (get the full .js and .css paths from leaflet website.. I've localized everything here as this is going to be operated offline) <html> <head> <link rel="stylesheet" href="lib/leaflet.css" /> ...


0

Because the types of tags associated with a feature can be arbitrary and range in size, the mapbox-streets-v5 source can only included a small subset of possible OSM tags for each feature they include. For the #building layer, they have only included osm_id, but it shouldn't be hard to look up the building in osm (or just visually identify it) and add the ...


1

Last time I tried to pass tileJSON directly to the L.mapbox.map constructor, I ran into issues when mapbox.js tried to automatically load retina tiles from my non-mapbox tileserver. If you are using a retina device, could point to your problem. If not, might cause additional problems after you've fixed your current issue. Check your console to see if you ...


0

Just use AND in your WHERE clause...


0

I really think you should have a look at ESRI's "ArcGIS Editor for OpenStreetMap". It includes a tool to build Network Datasets from OSM data: http://www.esri.com/software/arcgis/extensions/openstreetmap Shapefiles are kind of "deprecated" in the world of ArcGIS. I recommend using the tools included in the toolbox, and a File Geodatabase for storage of the ...


2

Please add WHERE ST_Intersects(lg.geometry, bbox.geom) AND admin_level < 4. This will give you the result for those features which intersect with the given geometry AND whose admin_level is less than 4.


0

I would use getJSON() from the jquery library: <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> var tilejson; $.getJSON('/path/to/your.json', function(data) { tilejson = data; });


0

You can change the first line to <osm-script> to get an ordinary osm file which can be used by the QuickOSM plugin for input. If it is too big, try to use GDAL ogr2ogr to transform it to a spatialite database. Apart from that, you are only querying housenumbers on nodes. You will miss housenumbers put on building footprints. These are stored in ...


1

In addition to what AndreJ said, it might help to use osmconvert to determine which objects are large enough to be displayed at a requested zoom level. The --add-bboxweight-tags will help you: --add-bboxweight-tags This option will add the binary logarithm of the bbox area of each way and each relation. For example: <tag ...


2

Assuming that you want the actual intersection of the bounding box, then create a bounding box as a sub-query at the same level as the select from osm_admin, and take the intersection of this bbox with lg.geometry. Note the ST_Intersects also in the where clause. SELECT row_to_json(fc) FROM ( SELECT ST_AsGeoJSON(ST_Intersection(lg.geometry, ...


1

Form Here! it says .. SELECT * FROM {table_name} WHERE the_geom && ST_SetSRID(ST_MakeBox2D(ST_Point(-73.9980, 40.726), ST_Point(-73.995, 40.723)), 4326) Here, we use some of the same functions you have seen previously. The opperator, &&, always uses the bounding box of geometries, unlike ST_Intersects which uses the full shape of a ...


1

The best place for subsetted datasets is geofabrik IMHO. The tool of choice, if you want to keep the data in PBF format is Osmosis It is a java Application and will run on Windows and Linux. I run mine on Windows 2008 R2 and Ubuntu Trusty. Check Out The Beginners Guide I did not have too much trouble getting to grips with it.


1

Have a look at the following sites: http://wiki.openstreetmap.org/wiki/Mod_tile#tile_expiry https://github.com/openstreetmap/mod_tile/blob/master/mod_tile.conf Another option is to touch all files in the cache to a recent date & time (for example januari 12 2015 0:00u): find /var/lib/mod_tile/[tiledir]/ -type f -exec touch -t 201501120000 {} \;


2

I suggest to go through the Mapnik style definition file. These can be: osm.xml including all files in the inc subfolder (Old style) CartoCSS stylesheets (Current style) the rendering rulesets of Maperitive Look out for the items that are used for low levels, and keep those. For the zoom levels 0 to 5, Mapnik uses coastline shapefiles and Natural Earth ...


0

Working on the assumption that the polygons are only ever going to be at the end of lines, your query should return each polygon from your diagram, but not in the format you have indicated. This makes me think that you have a small gap between your polygon and the end of the line. I think the tolerance is 0.00001 for ST_Intersects. Rather than using ...


0

Just till 9, right? Use Maperitive : http://maperitive.net Lazy caching: Clear out the current map by hitting Ctrl+N, and add Tools > Add Web Map > MapQuest Open Aerial (I'm guessing that's the one you want) Browse through all the places you want tiles of, at the zoom levels you want. Type zoom 2,zoom 3 etc in the command line to be sure you're at ...


3

First of all, there's also a Geofabrik Tool available to find ways without tags, called OSM Inspector. The respective analysis can be found in the tagging view as ways without tags (just in case someone wonders, why overpass turbo comes into play for this). Back to the question: Find all ways in a bbox and remove all ways with any tag will give you the ...


1

AFAIK iD currently doesn't support WMS but TMS protocol (press B key and add a custom TMS URL). Thus you might deliver a tile map service instead of WMS or use a proxy (for example mapproxy).


0

I'm not sure how to do this in Android, but here's how to do it on the computer: I was able to use Maperitive to mark a bounding area, download OSM data for the area, generate tiles for it locally, and deploy the map on a local webpage using leaflet.js . I can browse this map without any internet connection. Download and run Maperitive. First, click "Map > ...


1

I think you are encountering this known issue: Bug report #10000 Cannot use osm layers (no features?) You'll have to save to a different file format before you can use the data with Processing.


2

Overpass can also be used in "script"-mode. All queries can be formulated as http-requests to the Overpass server. Overpass Turbo is only for interactive queries There is already a service providing the information that you need, unfortunately the server seems to be down for maintenance at the moment. However, you can find some information about it on ...


1

Setting bounds for the layer solves the problem. Because leaflet will not try to fetch tiles out of the specified bounds var southWest = L.latLng(13.02504085518189, 80.23609399795532), northEast = L.latLng(13.026849183135116, 80.23797690868378), bounds = L.latLngBounds(southWest, northEast); L.tileLayer('static/b18/{z}/{x}/{y}.png', { maxZoom:22, ...


3

If I restate your question, the problem that you are trying to solve is to have tiles in EPSG:3071. The solution to this problem lies in creating tiles in this projection itself, rather than reprojecting existing web-mercator tiles into this projections. For this you need two things. You need a Map server to create the images, and a Tiler to create the ...


0

Leaflet works as designed. It's normal that it tries to download tiles when you zoom in and out. You have to set minZoom and maxZoom in the map options so that they match the zoom levels in static/b18/ folder You can also set maxNativeZoom in your TileLayer options (http://leafletjs.com/reference.html#tilelayer) so that leaflet expand existing tiles in ...


3

While the answer that you have posted works, it doesn't really get to the root of the issue. The error indicates that you are trying to load the JSON from a a location that is not on the same domain. In the OP's case, the application is not being hosted from a webserver, and is trying to load the JSON from the file system. The real solution for this is to ...


1

The GDAL osm driver makes use of an osmconf.ini file: http://www.gdal.org/drv_osm.html Within that file, you can uncomment the line #other_tags=no to avoid saving all possible names of Sweden in that database column. By the way, GDAL can read the osm.pbf file directly, no need to extract it first.


3

You can get the Umweltzone using the following Settings in Quick OSM. Note that you can simply search for the name: Afterwards, you can use Save as ... to save to a Shapefile (or just copy the temporary Shapefile Quick OSM creates).


4

You could use the following approach: [bbox:{{bbox}}]; way[highway][name="6th Avenue"];node(w)->.n1; way[highway][name="West 23rd Street"];node(w)->.n2; node.n1.n2; out meta; Try it on overpass turbo: http://overpass-turbo.eu/s/6Pb Edit: node.n1.n2; calculates the intersection of input set .n1 and .n2. Please check the documentation for details.


1

If your goal is to extract features from osm database and save them to shapefiles, then I would suggest using Qgis with the quickOSM plugin. With QuickOSM you can easilly query the Openstreepmaps database (it uses turbo overpass) and add the result to Qgis canvas while saving it to a shapefile.


0

When displaying the map data as vector graphic via mapsforge, have a closer look at GraphHopper when you need a routing engine on mobile systems like android. There is a demo apk file for android testing purposes, and instructions how to get routing map data from raw OSM data. I also remember some topics on Graphhoppers mailing list about android use ...


0

As per your question Any other software available for SLD editing? Yes, If you are looking for SLD editing tool, there is a extension of Geo Server for styling http://docs.geoserver.org/latest/en/user/extensions/css/index.html and here is the complete guide of CSS cookbook. http://docs.geoserver.org/latest/en/user/extensions/css/cookbook/index.html ...


0

Project your OSM data to a cartesian coordinate system (e.g., a UTM), which enables you to apply an affine transformation on your data. It's not mandatory that you know the reference system of the vector file. You will take the projected OSM data as reference anyways. Now follow the steps I wrote in the answer to this post which describe the process of ...



Top 50 recent answers are included