1

DBeaver Spatial Viewer showing geometries without OSMI'm using DBeaver (which is a universal database manager) to connect to a Postgis database on a offline computer (not connected to internet).

The spatial viewer of DBeaver uses Leaflet to display spatial geometries and is very very useful for debugging purposes. It features the geometries on top of a background OSM map.

My problem: As the computer is not connected to the internet, I have no background map (as there is no connection to OSM).

My Question: Is there a way to config a local background map ? Is there a way I can "make" leaflet go to a local map? (As it is a program, I have no code I can adjust, as far as I can tell).

(I'm using DBeaver version 6.1.5 and Postgis 2.5.2)

5
  • If you want to have OSM offline, you have to download the tiles/vectors. One possiblity is OpenMapTiles at openmaptiles.com/downloads/planet for download of complete map (by regions). You could also use SASPlanet program (openhub.net/p/sasplanet) for downloading addhoc selected tiles.
    – TomazicM
    Nov 17 '19 at 10:23
  • @TomazicM, I don't mind if the local background map will be OSM, a local raster or a local WMS - I don't know if it's even possible to configure it in DBeaver\Leaflet , and if it is ,I don't know how to configure it, and that's what I'm asking...
    – jonatr
    Nov 17 '19 at 11:23
  • I'm not familiar with DBeaver, just with Leaflet. Since DBeaver seems to be only database, only Leaflet deals with OSM or any other map. Seen relevant part of your code would help in understanding what you want/need.
    – TomazicM
    Nov 17 '19 at 12:05
  • @TomazicM, thanks. As DBeaver is a program I download as a exe, I don't know its sourcecode. As I don't know leaflet as well, I have no idea what to look for, in order to "tweak" it...
    – jonatr
    Nov 17 '19 at 14:06
  • 1
    From what I could gather from internet, Leaflet is bundled/integrated into DBeaver and I couldn't find any info about tweaking this, so I'm afraid I can't be of help here.
    – TomazicM
    Nov 17 '19 at 15:03
1

This is not a direct answer to your question, but a work-around to see your own data within a local map (too long for a comment):

  • Load the map into your database you want to use as background (i.e. OSM). You only need one column of datatype geography representing your geographical elements you want to see (called shape below). For example when using administrative boundaries one cell would be an line around that element. You can load all of OSM from shp. But this is quite a bit of data.
  • Join your own data with the map.
select 
    a.*, 
    b.shape.STAsText() 
 from mydata as a 
 inner join map as b 
 on a.shape.STContains(b.point) = 1

Syntax on postgis might be slighty different. Try using spatial indexes if performance matters.

Two last remarks:

  • DBeaver is available as plugin for eclipse as well. As far as I could see there is no way to configure your own Map Service.

  • There exists a DBeaver version (CE) that is opensource.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.