Skip to main content
6 votes
Accepted

Downloading library on button click in QGIS plugin

You can wrap import package line in try-except. If it throws ModuleNorFoundError, then install the package. import subprocess try: import numpy except ModuleNotFoundError: subprocess.call(['...
Kadir Şahbaz's user avatar
5 votes
Accepted

GeoServer: which library for boosting (raster) WMS output generation

The two you need are native JAI and libjpeg-turbo. Native ImageIO is useless once you have libjpeg-turbo, as it only provides a faster than JDK JPEG encoder, but libjpeg-turbo is even faster. JaiExt ...
Andrea Aime's user avatar
  • 17.7k
4 votes
Accepted

Finding longest line segment within polygon?

This option, from GME, the will allow you to: Determines the longest line that can be position within the bounds of a polygon, crossing no edges geom.polygonfetch (Calculate Fetch In Polygons) ...
whyzar's user avatar
  • 12.1k
4 votes

Automatically install third party Python library to QGIS while first install of custom plugin (Windows)

I had exactly the same problem. When you use pip.main, you should get a warning saying that you are using an old script that will be removed in future versions of pip, so I would not recommend using ...
ThomasJ's user avatar
  • 86
4 votes

Is there any open source library for reading OCAD files?

If you want to migrate from OCAD to some free & open-source software then, I highly recommend you useOpenOrienteering Mapper (OOMapper for short) - cartographic desktop publishing software for ...
User1's user avatar
  • 41
3 votes

How to force PostGIS to use a specific GDAL version?

GDAL is a compile time dependency for PostGIS. It you want to change the version you must build PostGIS by yourself https://postgis.net/docs/manual-2.2/postgis_installation.html --with-gdalconfig=...
user30184's user avatar
  • 69k
3 votes

Is there a reason I should use gdal's Python library instead of just using os.system(gdal command)?

You can read the rationale from the RFC https://trac.osgeo.org/gdal/wiki/rfc59.1_utilities_as_a_library and from the blog post https://erouault.blogspot.com/2015/10/gdal-and-ogr-utilities-as-library....
user30184's user avatar
  • 69k
3 votes

Does exist a Python library to generate polygons avoiding antimeridian issues?

I would suggest looking into Xarray here is a thread xarray slicing across the antimeridian that covers a use for perhaps what you are looking for. This thread isn't answered but provides another ...
whyzar's user avatar
  • 12.1k
2 votes
Accepted

Does exist a Python library to generate polygons avoiding antimeridian issues?

In a context of GeoJSON files (in which I was inserted) I've preferred to use a solution that uses gdal.VectorTranslate method, because it provides compliance to the RFC 7946 standard, that also ...
Ricardo Barros Lourenço's user avatar
2 votes

Plotting a hyperbola, or, solving spherical triangles

I see several options: have a look at the decca application of the dutch navy https://www.defensie.nl/downloads/applicaties/2018/04/25/decca-setup Check if your coordinates of the transmitters does ...
Hans Erren's user avatar
  • 1,170
2 votes

Getting a county name using a 5 digit FIPS code

The FCC provides an API that will return attributes of a FIPS unit. https://www.broadbandmap.gov/developer/api/census-api-by-fips-code Note however, the page says that it is no longer being updated ...
Jacob F's user avatar
  • 984
2 votes

How to force PostGIS to use a specific GDAL version?

My best advice is to install everything from ubuntugis unstable. For xenial, you currently get postgis 2.4.2 for postgresql 9.5 and GDAL 2.2.2. The versions you have installed are from the main ...
AndreJ's user avatar
  • 77.1k
2 votes

Automatically install third party Python library to QGIS while first install of custom plugin (Windows)

The suggested solutions here are Windows specific, as they use .bat files. What we've done is put some instructions in the metadata.txt for the plugin, in the about section, so the user sees it in ...
John Abraham's user avatar
1 vote

Automatically install third party Python library to QGIS while first install of custom plugin (Windows)

In the end I came up with a similar solution: I've created a .bat file @echo off set "input=C:\Program Files\QGIS 3.16" echo %input% @echo ON cd /d %~dp0 call py3-env.bat "%input%&...
Laura's user avatar
  • 47
1 vote

Missing optional dependency 'tables' in QGIS

I believe the problem is that the user profile python package directory (%USERPROFILE%\AppData\roaming\python\python39\site-packages) is not being added to the python search path for Qgis. I don't ...
matt wilkie's user avatar
  • 28.3k
1 vote
Accepted

Getting a county name using a 5 digit FIPS code

Note that the URL constructor may choke when fed a fips code lower than 10000. Try code 1001 (Autauga County) Hence my suggestion for the URLS constructor, using '{0:05d}'.format(fipsCD): import ...
Martien Lubberink's user avatar
1 vote

Visual C++ runtime error

This is caused also by a corrupted template in loading ArcMap. Please restore ArcMap normal template. Delete normal.mxt under c drive C:>User>roaming data>esri>template>normal.mxt and open ArcMap.
neogeomat's user avatar
  • 8,390
1 vote

Does exist a Python library to generate polygons avoiding antimeridian issues?

Splitting a polygon along the antimeridian can potentially much more involved than expected. In Python, we can use the Shapely library to accomplish this with the following steps Taking a given ...
pawarit28's user avatar
1 vote

Creating New Modules in Saga GIS

A better way to do it is to create a directory under the tools, for example. That is a separate section for your functions and name of the module. let's say it is "something". Under that ...
Ferhat Bingol's user avatar
1 vote

Is there any open source library for reading OCAD files?

I am working on a number of JavaScript modules to read and work with OCAD files: extract the geometries and other data, export data to various formats liked SVG, PNG, GeoJSON and QGIS. Styling can ...
Liedman's user avatar
  • 1,093
1 vote

Converting polygon in grid points for each grid of 100m*100m in PyQGIS?

If you want to get the centroid point of each polygon one option would be to the following: You'll first need to get the layer object, once you have that then loop through each feature using layer....
artwork21's user avatar
  • 35.2k
1 vote

Converting polygon in grid points for each grid of 100m*100m in PyQGIS?

In the QGIS documentation, Convert polygon/line vertices to points it provides this option to convert polygons to points Description Converts the line or polygon vertices into points. ...
whyzar's user avatar
  • 12.1k
1 vote
Accepted

CSV to GeoJSON in C++

Whenever you need to convert from one vector format to another you should check if GDAL/OGR is the answer (hint: unless you use Java it is). It provides a CSV driver to read in your data and GeoJSON ...
Ian Turton's user avatar
  • 83.2k
1 vote

How to convert debug.js to .js file after editing debug.js file

I think you can't convert debug.js to build.js directly. If you want some changes, you have to modify the code which exists in src folder and re-build.
Chase Choi's user avatar
  • 1,087
1 vote

Plotting a hyperbola, or, solving spherical triangles

A detailed math is given in this publication from Delft University Title Computation of the Decca pattern for the Netherlands Delta works Author van der Schaaf, H.P. Vetterli, P. Project ...
Hans Erren's user avatar
  • 1,170

Only top scored, non community-wiki answers of a minimum length are eligible