Most Popular

1500 questions
26
votes
4 answers

Leaflet mouse wheel zoom only after click on map

I'm working with the Leaflet JavaScript Library and attached a (working) map to my HTML Document. It is in the middle of the page, and when I'm scrolling down with my mouse wheel and arrive at the map, it automatically zooms into the map. I want to…
Jandroide
  • 483
  • 2
  • 5
  • 8
26
votes
2 answers

What is the best hack for importing large datasets into PostGIS?

I have to import large Shapefiles (> 1 million records) into PostGIS, and I have been wondering about the best way to do it. In my question I used the word "hack", instead of tool, on purpose because I think this is not so much a matter of which…
doublebyte
  • 777
  • 5
  • 15
25
votes
1 answer

Selecting features by attributes using ogr2ogr?

I am writing a shapefile after some processing; however, in the final step I need to do some selection by attributes from the the shapefile. I am using the command in a shell with the aim of using it in a Python script when it works. ogr2ogr -f…
user2757128
  • 523
  • 2
  • 6
  • 9
25
votes
3 answers

How to create a new 'gis' database in PostGIS?

I'd like to create a new database in PostGIS, so I can load stuff into it while the current database is being used. According to the docs Some packaged distributions of PostGIS (in particular the Win32 installers for PostGIS >= 1.1.5) load the…
Steve Bennett
  • 5,682
  • 2
  • 44
  • 69
25
votes
5 answers

Finding distance of point along polyline using ArcGIS Desktop?

We need to find the distance of a series of point along a given polyline. We have a polyline dataset repsenting rivers in a catchment, broken up into river reaches (FID 1 through 35 for example). We also have a point dataset of abstraction licenses…
user2040
25
votes
3 answers

Speeding up plotting of polygons in R

I want to plot the country borders of North America over a raster image depicting some variable and then overlay contours on top of the plot using R. I have been successful in doing this using base graphics and lattice, but it seems that the…
ialm
  • 826
  • 1
  • 7
  • 11
25
votes
1 answer

Joining layers with respective elements with PostGIS Topology

I'm currently using PostGIS topology extension, but I have some difficulties in understanding how the structure works: One of the key points is the use of "layer"s: as of what I understand, features attributes should be stored in a table out of the…
Davide
  • 359
  • 2
  • 3
25
votes
6 answers

Algorithms for matching segments

What are the best algorithms to match segments? I'm trying to match corresponding segments from two map sources, one less accurate but with segment names, and one more accurate without segment names. I want to semi-automatically apply the segment…
Adam Matan
  • 6,838
  • 7
  • 37
  • 50
25
votes
5 answers

Adding PDF (especially GeoPDF) to ArcMap as data?

I receive a lot of PDF maps (vector, image, with georeference and without) and I am having to convert them to an image file before I can add them to ArcMap and georeference. I can't see any obvious out-of-the-box utility that would allow me to add…
Jakub Sisak GeoGraphics
  • 20,294
  • 20
  • 104
  • 180
25
votes
6 answers

Extracting raster values and creating new raster in QGIS?

I want to extract certain values of a raster image in order to create a new raster which then should only contain the extracted/chosen values. How to do this in QGIS?
Peter QGis
  • 251
  • 1
  • 3
  • 3
25
votes
3 answers

Programatically check for mouse click in PyQGIS

I want to know how to check for a mouse click in QGIS. I am trying to write a Python plugin and want to provide functionality similar to the "Select Single Feature" tool that already exists in QGIS. I checked the QGIS API docs and…
robert
  • 375
  • 1
  • 3
  • 7
25
votes
10 answers

Existing solutions to automate generalisation/simplification of geographical data?

I am looking for existing solutions (softwares, libraries, methods, etc.) to automate the generalisation/simplification of geographical data as presented there, and also there. Do you know and use some tools to simplify your geographical data? I…
julien
  • 10,186
  • 6
  • 55
  • 93
25
votes
2 answers

Getting Lat, Long of clicked location using Leaflet API?

I am using OSM with Leaflet API. Now I want to get the lat and long of a clicked location. I meant something similar to this. ex: http://openlayers.org/dev/examples/click.html map.events.register("click", map, function(e) { var position…
DomincJune
  • 399
  • 2
  • 6
  • 10
25
votes
1 answer

Unit testing for QGIS 3 plugins

There is a nice resource on unit testing for QGIS. There is also a post on this, Writing automated tests for QGIS plugins, which requires the use of docker and relies on QGIS 2 plugin - QGIS Tester. The progress on QGIS 3 is related to two plugins:…
banbar
  • 999
  • 8
  • 14
25
votes
5 answers

Simplifying geometries (generalization)

What are the recommended ways of simplifying geometries? Keeping in mind projections, and simplifying state geometries, for example. I've heard about converting to an 'equi-distant' projection that allows simplification without distortion, and then…
John Weldon
  • 653
  • 1
  • 7
  • 14