Skip to main content

Questions tagged [c++]

An object-oriented programming language

Filter by
Sorted by
Tagged with
34 votes
10 answers
17k views

How do I develop my GIS programming skills?

I would like to develop my GIS programming skills, where do I start? People say learn C++ or Python but where can I learn this in a geographic context? Tutorials or anything would be very helpful, as ...
Will's user avatar
  • 481
15 votes
2 answers
18k views

Creating sectors for telecom towers

I work in the Mobile networks industry and i took up a task to create a plugin for QGIS using c++/python that does the following: step 1: Create points corresponding to each mobile tower based on Lat/...
Bavin's user avatar
  • 159
14 votes
2 answers
15k views

Characteristics of different methods to convert ECEF to LLA

I'm trying to convert ECEF (Earth Centered, Earth Fixed) coordinates, which are defined in X,Y,Z, centered at (0,0,0) to LLA (Latitude, Longitude, Altitude). There are a couple of methods I found on ...
Pris's user avatar
  • 1,251
14 votes
1 answer
383 views

Reading raster backward using GDAL

I am currently working on two-scan raster algorithms (euclidean distance transformations, cost surface analysis, etc.). Those algorithms require a line-wise forward raster scan (from top left to ...
root676's user avatar
  • 2,385
13 votes
5 answers
18k views

Converting latitude, longitude (EPSG:4326) into EPSG:3857?

I'm looking to study the math involved to see how a given latitude and longitude in decimal degrees can be converted to EPSG:3857. Can anybody point to a good reference or a possible Ppython/C/C++/...
user50614's user avatar
  • 131
13 votes
1 answer
1k views

Open QGIS project files in exclusive mode / alert if project file already in use

I have QGIS-Project-Files saved to a network drive and was wondering if it is possible to warn users that a project file is already opened by an other user to prevent concurrent editing of the same ...
Thomas B's user avatar
  • 8,846
11 votes
2 answers
4k views

How to implement viewshed calculation?

I'm looking for a way to implement visibility (aka viewshed). I found a previous GIS SE question that suggested a few GIS applications (not what I need - I'm trying to embed the calculations), and ...
BradHards's user avatar
  • 12.9k
10 votes
0 answers
479 views

Executing bidirectional Dijkstra on TIFF image? [closed]

Can anyone indicate an example of how to do this? Link, tutorial etc... I started a discussion here about how to load a TIFF image like a graph nicely answered by @sehe. But, in this post the image is ...
Ailton Filho's user avatar
8 votes
3 answers
13k views

How to subset raster image using gdal?

I have read pixel values of an raster image using GDAL libraries in visual studio 2010(vc++). Now I have to crop the image (subset) according to the grid given in shape file. I have got a code for ...
Hardik's user avatar
  • 199
8 votes
1 answer
2k views

Slow FileGDB Performance in GDAL

I am attempting to write many ASPRS LAS point files into an ESRI File Geodatabase using my compilation of GDAL 1.9.2. The FileGDB driver for GDAL/OGR appears to be incredibly slow when writing large ...
Phlucious's user avatar
  • 233
8 votes
2 answers
5k views

Where can I find documentation on QGIS C++ Plugin Development?

Is external C++ plug-in support available for QGIS? I'm having a really hard time getting started here. I followed the doc here: http://download.osgeo.org/qgis/doc/manual/qgis-1.1.0_coding-...
Jmoney38's user avatar
  • 628
8 votes
1 answer
5k views

Setting up an application in QT Creator that uses QGIS API

I am a 15 year veteran of Java making my first entry in to C++ applications. I have a specific need to develop a desktop application that produces graphics type output as well as displaying embedded ...
user1078284's user avatar
8 votes
0 answers
1k views

Fuller/Dymaxion in proj4/gdal/qgis?

I know this question has been asked a million times already, but I can't find many detailed responses on exactly what I want to do. As far as I can tell, the full C code for the fuller projection is ...
Alex McVittie's user avatar
8 votes
0 answers
2k views

GDAL RasterIO performance in C++ vs ReadAsArray in python/numpy

I'm currently writing optimisations for a raster viewer program which uses gdal as it's base. It's currently written purely in python, and has some major speed issues which cause problems when we are ...
gjones's user avatar
  • 213
7 votes
2 answers
479 views

Plotting a hyperbola, or, solving spherical triangles

I am trying to create a GeoJSON path containing lines of hyperbola, in order to recreate Decca Navigator charts in QGIS, something like this: The chart has nine lines of hyperbola plotted between ...
Jack Deeth's user avatar
7 votes
2 answers
3k views

Extracting values from raster under line using GDAL?

How can I find the cells which lie on a straight line between two points? I.e. how can I find the indices of the cells (in grey) which are intersected by the line defined by the two points (in blue): ...
James's user avatar
  • 2,268
7 votes
2 answers
9k views

combine raster with another raster mask file - gdal

I have 2 rasters in GeoTiff format. One has all of the land and water and the other is a mask file that shows either 0 for water or 1 for land. I basically want my output to just have the land values ...
Perez's user avatar
  • 71
6 votes
1 answer
2k views

Seeking open source solution to access rasters in File Geodatabase?

I'm looking for a way to access raster layers in an Esri File-GeoDatabase without using ArcObjects or ArcPy, specifically I would like to access the raster layers with GDAL. I understand that the GDAL ...
khafen's user avatar
  • 480
6 votes
1 answer
3k views

Set Metadata domain with GDAL (python bindings)

I'm trying to set geolocation metadata in a gdal vrt with python bindings. ds = gdal.Open('foo') ds.SetMetadata ({'X_BAND' : '1'}) gdal.BuildVRT('bar', ds) Results in a vrt with the following ...
bbuzz31's user avatar
  • 429
6 votes
2 answers
8k views

GDAL in C++: Reading a ShapeFile

I am trying to use the GDAL Lib to read a ShapeFile (.shp). I followed the instructions of http://www.gdal.org/ogr_apitut.html - But it doesn't work! #include <gdal_priv.h> #include <...
Peter A. Kolski's user avatar
6 votes
2 answers
3k views

Looking for QGIS 2.4 C++ Hello World example?

In the project I'm working on (C/C++/Qt application), we are trying to integrate QGIS (latest version desirable, 2.4 for the moment). But there is very little information in the web on how to use QGIS ...
Kalitine's user avatar
  • 291
6 votes
1 answer
2k views

How to use GEOS/C++ to efficiently find all point pairs closer than a threshold?

Can anyone tell me how to use GEOS/C++ to efficiently find all point pairs in a dataset closer than a threshold distance d? I suspect this might involve quadtrees or rtrees but not quite sure how ...
Sideshow Bob's user avatar
  • 2,343
6 votes
2 answers
2k views

How to filter the MouseWheel event in a QGIS C++ plugin?

I’m developing a C++ plugin for QGIS and I want to filter/override the mouse-wheel event. I created a “maptool” to select a polygon feature on a vector layer, the feature has two attributes : an id &...
QgisTn's user avatar
  • 378
6 votes
2 answers
3k views

How to get latitude, longitude and altitude database from a GeoTIFF file?

I am developing an AR iOS application. When the iPhone gets the current location, it has to calculate locally the visible point. I want to read the tiff files in my application, and then get the ...
Emese Fabian's user avatar
6 votes
2 answers
6k views

How to store raster data in spatialite?

I want to cache my raster data(large geotiff files) on local database. I thought to use spatialite. I found librasterlite which provide functionality to do that. Can anybody point to some tutorial on ...
user8119's user avatar
  • 337
6 votes
1 answer
583 views

Memory Leak when deleting a layer

I am working on a project based on QGIS API c++ 2.8.2 and qt4.8. I have two methods in a class, the first create a layer and add a point Here is the code for the creating: LibCartoError CMyQgsS57::...
ainardi's user avatar
  • 843
6 votes
1 answer
1k views

C++ Code Examples in Quantum GIS 1.8

I am trying to utilize the C++ code examples from blog.qgis.org, specifically Tutorial 4, Adding Rasters to QGIS Map Canvas. I am successfully able to run the example loading a GeoTIFF with QGIS 1....
Brent K's user avatar
  • 61
6 votes
1 answer
692 views

What's a robust strategy for displaying 3D map data for navigation?

3D map data, specifically the kind you see on GPS units, or more recently on smart phones, almost always features a 'HUD' like view, which I'm trying to implement in an application of mine. I have ...
Pris's user avatar
  • 1,251
6 votes
1 answer
207 views

Match housenumbers on buildings (special case of point-in-polygon-test)

Task with example I'm working with geodata (country-size) from openstreetmap. Buildings are often polygons without housenumbers and a single point with the housenumber is placed within the polygon of ...
user2033412's user avatar
6 votes
0 answers
355 views

What is the structure of Standard Interchange Format (SIF) used by spatial data providers?

What is the structure of Standard Interchange Format(SIF) used by navteq and other spatial data providers? Any documentation/sample files? Is there a SIF parser available in C/C++/Java/PHP ?
Anuraj Ennai's user avatar
5 votes
1 answer
3k views

QGis Plugin Licence

I would like to create a plugin using commercial software. Does the QGis licence permit this? Are there any restrictions on the licence I can choose to apply to my plugin?
Damian Dixon's user avatar
5 votes
2 answers
6k views

How to get coordinate system info from shapefile using GDAL/OGR?

GDAL version 2.1.1 If I open a geospatial raster file, such as a GeoTIFF or DTED file, with GDAL, then I can get the coordinate system info for that file, as a string in OpenGIS WKT format. For ...
Mike Finch's user avatar
5 votes
1 answer
943 views

Seeking code behind Fix Geometries tool in QGIS

I used the "Fix Geometries" tool in the Processing Toolbox of QGIS 3.6 to repair a vector layer that was giving me trouble. The tool in QGIS worked just fine, but I was hoping to find out ...
krishnab's user avatar
  • 919
5 votes
1 answer
16k views

Calculate bearing between two decimal GPS coordinates (Arduino / C++)

I am trying to calculate the bearing just like in this example: Calculate bearing between two decimal GPS coordinates , but my environment is Arduino. I got the code translated (please see below), ...
carlosbvz's user avatar
5 votes
1 answer
6k views

Is it possible to query via bounding box in the Google Maps Static API?

We have a Qt program written in C++ to request wms tiles and display them. This works fine. Now we want to display imaginery from Google Maps and due to some restrictions in our program, we can't use ...
Kio Marv's user avatar
  • 151
5 votes
1 answer
607 views

How to refresh layers independently?

I'm writing a C++ application using QGIS API and I would like to improve the performance. I want to render 5 layers: one raster layer using gdal to load Bing/Google Map tiles 4 custom QgsMapLayer (...
atonda's user avatar
  • 78
5 votes
1 answer
4k views

Cannot find proj.db in QGIS 3.10.3

I would like to program a standalone application using C++. In version 3.4 LTR, my program ran fine and I did not receive any notification when running it. However, when I compiled using the qgis ...
Bach Nguyen's user avatar
5 votes
3 answers
2k views

A linestring merger algorithm

I'd like to merge linestrings which touch, but do not cross. The linestrings share the same SRID and come from a PostgreSQL 9.2/PostGIS 1.5 database. Within the table I query are several line strings, ...
Technaton's user avatar
  • 193
5 votes
1 answer
6k views

PROJ4 C++ API: Amersfoort RD New to WGS84

I try to convert between dutch RD New (EPSG:28992) and WGS84 (EPSG:4326) via PROJ4 C++ API. On the console this works with: cs2cs +proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0....
t1mg's user avatar
  • 53
5 votes
1 answer
236 views

Is it possible show the feature attributes dialog when I add a feature in code?

I want to know if it is possible to make the feature attributes dialog in Qgis show up when I add a feature by code using: QgsVectorLayer::addFeature( tFeature ) This is available when I add ...
QgisTn's user avatar
  • 378
5 votes
2 answers
388 views

Why am I getting two different outputs from Python and C++ using GDAL?

I am trying to gather information from a *.tif file using the GDAL libraries. When I open the *.tif file using both the Python API, and C++ API, I encouter two completely different answers. Here are ...
Dylan Hicks's user avatar
5 votes
0 answers
845 views

ATDI free map read with software

I am interested in working with the freely available ATDI MAPS. The maps are provided for their proprietary software ICS manager or ICS telecom. I am involved in a project to develop a software in c++ ...
rowman's user avatar
  • 101
4 votes
2 answers
492 views

Is there a GIS-Tool that fit my needs? [closed]

I´m working on a GIS-Project in the Defense & Intelligence sector. The goal was to develop/create a GIS-Service that: stores and manage GIS-Data (Map data, Height data.. ) has a repository for ...
Niko's user avatar
  • 57
4 votes
1 answer
2k views

Using the C++ GDAL API how do I set the GDAL_DATA path?

If I want to change the directory of the GDAL_DATA path or point to a different version of a csv file for EPSG numbers how do I do that using the C++ API?
David's user avatar
  • 183
4 votes
2 answers
1k views

Get a list of all supported EPSG code from OGR

I need get a a list of all supported EPSG code from OGR/GDAL. I need this becaouse i'm developing a C++ application map, and I need this information to put it in a user form. I read the OGR ...
Zharios's user avatar
  • 77
4 votes
2 answers
11k views

How to get long, lat and altitude info from geotiff file using GDAL and C++

I need to get longitude, latitude and altitude info for each pixel in GeoTiff image. I have installed GDAL in my system. Since I am new to GDAL I don't know how to proceed further. How can I get the ...
SUD2193's user avatar
  • 139
4 votes
4 answers
8k views

Using GDAL/C++ to calculate distance in meters

I'm using GDAL in C++, with WGS84. I want to calculate distance between two points in meters. The code snippet below tries to find the distance between 25N/75E and 25N/76E. The code, as is, returns 1....
Rex's user avatar
  • 51
4 votes
1 answer
281 views

QGIS CPP multi-platform plugin deployment

We're starting to look at porting some of our plugins over from ArcMap to QGIS and we're pretty excited about it. Currently everything we have is written in C++ so it would be nice to use that on ...
Raychaser's user avatar
  • 613
4 votes
1 answer
301 views

Faster way to find nearest neighbors with LASlib?

I'm using LASlib to find the nearest neighbors of a subset of points in a point cloud. I'm using brute force to find nearest neighbors, which is extremely slow (my code below). Is there a better way,...
Barbarossa's user avatar
  • 5,807
4 votes
1 answer
9k views

QT C++ application using QGIS API

I'm trying to develop a QT C++ application that uses QGIS API and I can't manage Qt Creator to compile the code. I've read several topicts at gis.stackexchange and from other sources. The information ...
Diego Sartori's user avatar

1
2 3 4 5
9