An object-oriented programming language

learn more… | top users | synonyms

1
vote
0answers
13 views

How to create a svg item onto Map Canvas in QGIS API?

I'm working on a project with QGIS-2.4.0 API using C++. I need to load some svg files to the application for displaying as symbols. QGIS API has a class named QgsMapCanvasItem, which is an abstract ...
0
votes
1answer
11 views

GDAL Application crashes when loading GDAL drivers

I'm developing on QT an application that uses GDAL library (which I compiled using MinGW 4.8). When I use the application on my windows 8 laptop, it works fine, but when I tried using it on several ...
1
vote
2answers
33 views

Error getting ESRI Shapefile driver OGR in C++

I am unable to create an OGR Layer using the C++ API. I have followed the documentation at this link exactly http://www.gdal.org/ogr_apitut.html I get an error trying to get the shapefile driver. Any ...
0
votes
1answer
29 views

going from hillshade to percent shaded (gdaldem)

I assumed hillshades output percent shaded (scaled to 255) at the given azimuth and altitude but this is incorrect. A flat raster at 80 degrees altitude has a maximum value of 251 instead of 255. How ...
2
votes
0answers
26 views

How do you clip a gnomonic or stereographic azimuthal projection?

I have polygons comprised of lat/lon coordinates and I want to project them onto a plane that's appropriate for polygon operations (such as checking for intersections). In some cases, the polygons ...
0
votes
0answers
9 views

How To Add a QgsSvgMarkerSymbolLayerV2 to VectorLayer in Qgis?

I'm using Qgis2.4.0 API to develop a C++ application. I want to add a svg symbol to a vector layer. Here is what I have already done: add vector, then add symbol. But I get stuck dong this. Here is my ...
1
vote
2answers
59 views

Does QGIS support dynamic display?

I'm a new developer of QGIS using C++. I am working on a project which needs to display dynamic maps/layers(just like GPS, but it is not GPS, however it should display data alike GPS data - dynamic ...
1
vote
0answers
18 views

Rendering a geotiff block with gdal and gdk-pixbuf - Some flaws in the result

I currently try to render a geotiff file with GTKmm\GDKmm (gdk-pixbuf). The file is a tiled geotiff with a block size of 256*256 and three rasterbands. The shortened gdalinfo output is: Driver: ...
1
vote
0answers
42 views

Correct way to extract pixel data using GDAL. Current method gives repeated but changing value.

I am trying to open a spectral file and move bands of data from GDAL to OpenCV's Mat data structures. As of now I am just trying to make sure that I can correctly access each band using GDAL and pull ...
0
votes
0answers
9 views

change symbology of an graduated renderer in qgis

In my plugin(c++) I add a vectorlayer to map, then I change the symbology of the QgsGraduatedSymbolRendererV2 of this layer. After this I refresh the map with ...
0
votes
0answers
17 views

Write to FGDB in C++ code?

Anyone know the correct syntax for this? I'm a C++ beginner but experienced in GIS.. I'm guessing ofstream won't do it and am not sure what else to try. Never written to any sort of database in C++.
0
votes
0answers
21 views

compile QGIS-plugin for Windows: problem with gdal_i.lib version

While compiling my plugin for QGIS 2.2 there are no errors, but it ist still not loading in QGIS because of an dll error. (function not found) I think the problem is at the gdal version. The ...
1
vote
2answers
43 views

Projection for polygon intersection confined into one hemisphere?

I have polygons where each vertex is a (lon,lat) geographic coordinate. I want to find out if they intersect or contain each other. The polygons are guaranteed to never exceed a hemisphere (so they'll ...
0
votes
0answers
8 views

How to debug a QGis C++ plugin with Visual Studio 2008 [duplicate]

I have a plugin for QGIS 2.2 in C++ (legacy). I dont find how debugging this plugin, with Visual Studio 2008 (for evolution, etc.) Sorry for my bad english. Thanks you ! Paho
0
votes
0answers
12 views

Parsing OGC Filters with C++

Google Translation I am developing an application in C + + you need to parse OGC filter. Anyone know any way to parse an OGC filter with C + +? Estoy desarrollando una aplicación en C++ que ...
0
votes
1answer
53 views

Calculate tree cover over certain area from raster data

Last year Hansen et al. published Global Forest Change map as set of raster data available in TIFF format. Basically those are 30-meters resolution satellite images with pixel values ranging from 0 ...
0
votes
0answers
44 views

gdal read whole geotif band into vector

i have another c++ GDAL question. I try to read alle elevation data out of an GeoTiff file into a c++ vector so that i can get elevation at x,y like this: vector[x][y]. I also like to use this data to ...
0
votes
1answer
35 views

gdal_contour transparent contour as png

I started using the GDAL Library in a c++ project. It is a great library, but I am a bit stuck right now with different aspects of it. What is the best way to use gdal_contour in my c++ programm? ...
1
vote
0answers
19 views

C++ parser for OGC Filter Encoding 1.0

I'm developing a C++ application and I have to parse a OGC Filter in order to implement querying functionality on a metadata repository. Does anyone know any C++ library to parse OGC Filters? Thanks. ...
1
vote
0answers
38 views

How to rasterize a vector data with style

I want to make a utility in c++ which can rasterize vector data with some specified style. I know about gdal_rasterize. But the problem with it is, we cannot specify the style details. Do we have a ...
1
vote
0answers
66 views

GDAL C/C++ API and filtered pyramid tile generation

I have been tasked with adding functionality to an existing C++ developed toolset whereby a source dataset (typically a single GeoTIFF) needs to be split into tiles at various resolutions ('zoom' ...
3
votes
2answers
118 views

Fastest Way to Intersect Envelope with Multiple Feature Classes ArcObjects

I have the situation where I am doing a large number of intersections and I need to do them fast. The situation is I have a iMap with 1 or more layers and a series of envelopes, lots of envelopes. I ...
0
votes
0answers
13 views

ArcObjects: how do I resize an IComboBox when the contents changes?

In ArcScene: I have implemented an IComboBox where the content changes: void MyComboBox::updateComboBox() { std::vector<CComBSTR> comboBoxItems; getComboBoxItems(comboBoxItems); long ...
0
votes
0answers
48 views

ArcObjects: How to remove a custom layer?

How is a custom layer supposed to be destructed? I have a custom layer that implements drawing by overriding IActiveViewEvents::AfterDraw. The problem is that sometimes when the custom layer is ...
2
votes
1answer
92 views

Rearranging labels in screen to avoid overlapping

I have a map, with some icon over it. Every icon has a label next to it. When icons overlaps, labels are overlapped too. In this case, I want to move labels so they don't overlap anymore, with a line ...
0
votes
1answer
125 views

QGIS 2.0 Howto copy raster data from a QgsRasterDataProvider to an OpenCV matrix

I'm hacking the half day arround a problem and that I' thought it was simple one. I'm using C++ (QtCreator) QGIS 2.0 und openCV2 on an 64 bit Workstation runnig Debian Wheezy. The Application I try to ...
0
votes
0answers
17 views

How to define own icon for qgsvertexmarker?

I want to use a small image instead of predefined icons of vertex marker in qgis. how to do this? QgsVertexMarker * marker = new QgsVertexMarker(mPlugin->iface()->mapCanvas()); ...
2
votes
1answer
610 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 ...
2
votes
1answer
111 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 ...
1
vote
1answer
68 views

how to transfer from traditional GIS software developing to internet area

I am a GIS developer, formerly doing some secondary development with GIS software. I now want to obtain some internet-based GIS area in my career. Somebody advised me to first read some ...
1
vote
2answers
241 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 ...
0
votes
0answers
80 views

Using GDAL to link to a TMS

I currently have a C++ application that will consume a WFS using gdal. It determines if the WFS layer is points or polygons then adds stores them in an appropriate object that is later used to ...
1
vote
2answers
96 views

Difference between OGRGeometry and Geometry in C++ and python

According to the documentation, there is a python version of OGRGeometry's C++ class (http://www.gdal.org/ogr/classOGRGeometry.html) which is http://gdal.org/python/osgeo.ogr.Geometry-class.html ...
0
votes
0answers
66 views

Unable to view a wms layer in QGIS cpp aplication

I am a newbie in QGIS c++ programming, and I am trying to load a raster file from a WMS and display it. The image I want to display can be obtained from this url ...
0
votes
1answer
131 views

Free border data and C++ code to display state/region borders with user-defined-colour areas?

Situation: What I really need cannot be shortly described in the title. We have a commercial application where geographical maps (borders only) are used or for selecting areas (input) or for colouring ...
-1
votes
1answer
151 views

How to find nearest Lat/Lon to the given Lat/Lon from set of Lat/Lon values?

I have a set of lat/lon values and gps lat/lon value. I want to find nearest lat/lon value to the gps point from that lat/lon set. Is there any some formula or some other way so that i could ...
1
vote
0answers
53 views

Icon missing when adding custom combobox command to Toolbar

I have a custom command: class ATL_NO_VTABLE CSliceSelector : public CComObjectRootEx<CComSingleThreadModel>, public CComCoClass<CSliceSelector, &CLSID_SliceSelector>, ...
0
votes
0answers
50 views

How to calculate GPS coordinates of one location relative another location? [duplicate]

In location “A” I know longitude (lonA) and latitude (latA) (Altitude is 50m). Relative to location A I know the horizontal (p) and vertical (q) distances to location “B” (B’s Altitude is 0m). I want ...
2
votes
2answers
182 views

how can i set place mark with text in QGIS?

I want to mark a point in map and place text near it. I used QgsVertexMarker to mark point .As far as now i am using tool-tip to show text. but i need clean code to show my text on map. Following ...
1
vote
1answer
66 views

OGRFeature::DestroyFeature fails

I am using OGR to read features from a shape file; when the feature is destroyed I am getting an error 0xC0000005: Access violation reading location 0xffffffffffffffff. This secton of the code looks ...
3
votes
3answers
194 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, ...
2
votes
1answer
144 views

how to remove and change qgsvertexmarker in QGIS using c++ code?

In QGIS following code is used to set marker at point A. QgsVertexMarker * marker = new QgsVertexMarker(mPlugin->iface()->mapCanvas()); marker->setColor(Qt::black); ...
0
votes
1answer
408 views

GDAL RasterIO grabbing memory

I have written an application in c++ to read LiDAR files and convert to various rasters using GDAL; this worked very well on small scale tests (47 LAS files) however, when used on a live task the ...
1
vote
2answers
224 views

Shapefile point coordinates to lonlat

I'm currently trying to parse a shapefile (http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf) with c++. While I have no problems parsing all the data I need, there is a problem with the ...
1
vote
4answers
419 views

Offline Python or C++ library for plotting locations on map?

I'd like to plot locations using longitude and latitude coordinates using Python or C++, is there a good library for such a task? I know that matplotlib is an option, I'm wondering if there are any ...
1
vote
0answers
40 views

start gdalbuildvrt from c++ plugin

I want to create a vrt from my plugin via gdal-tool. From OSGEO4W-Shell the command works. In my code i tried this: QString program = "gdalbuildvrt"; QStringList arguments; ...
0
votes
1answer
45 views

Install plugins for qgis in centos

I followed the instructions here: How to install QGIS on Centos 6? If I run: QgsVectorLayer * vpoly = new QgsVectorLayer("Polygon", "pointbuffer", "memory"); QgsVectorDataProvider * provider = ...
0
votes
0answers
171 views

QGis 2.0.1 cpp-plugin for Windows

my plugin, developed in VS2008 for Windows runs in my testenvironment, the startimage of QGIS shows the developermeeting in Essen with the version number 2.1 alpha. On a other system I have installed ...
1
vote
2answers
156 views

will ogr get coordinates in geographic coordinate system or projected coordinate system when using getPoint(int,OGRPoint*)

Consider the code that I have written in the stackoverflow question How to extract vertexes of geometries in ESRI shapefiles using ogr library with c++, I have used the code to show shapefiles on an ...
0
votes
0answers
71 views

How to use projection of a shapefile in order to have a better view in OpenGL

As you see here, this is the code that I have used to extract vertices of ESRI shapefiles in order to show them with OpenGL. I have also uploaded my project here, if you want to give it a try and see ...