Hot answers tagged

23

Telecom cell site plan and optimization using QGIS Create Points or Site Locations: Create database in CSV (make sure antenna sizes are sorted in descending order: highest first to lowest last, such that masking through overlay of cells could be avoided) 2. Import to QGIS using "Add Delimited Text Layer" Choose X and Y fields and pick Datum Create ...


10

You can compare the two. In most applications I suspect the second (direct) method will be the one to choose. Accuracy of the first (iterative) method depends on the accuracy with which you do the computations and when you decide to stop iterating. It therefore can be made as accurate as the second method for all inputs where both are valid (the first ...


9

FGDB_BULK_LOAD is not a compilation setting, it is a configuration option for the command line tools (can also be done programmatically). ogr2ogr --config FGDB_BULK_LOAD YES -f "FileGDB" MyFileGDB.gdb myKML.kml Would create a filegdb and load the KML vector data to it. Let me know if your performance still sucks. By the way, what platform are you on? ...


9

Foreword : I think you mean «proprietary» and not «commercial». Any opensource product can be a commercial product, even GPL ones. You can write plugins for QGIS in C++ or Python, the latter being advised, as it simplifies plugins distribution and deployment. QGIS is licenced as GPL, and the Python bindings are GPL too. So is PyQT, which is used in QGIS ...


8

As you would have seen from the referenced GIS SE question, there doesn't appear to be much in the way of viewshed stand-alone packages at least in the Open Source market beyond SAGA and GRASS GIS. Apart from writing a wrapper around the code for these algorthims you may end up implementing viewshed yourself unfortunately. (Though I would love to be ...


8

Unprojected: gdal_translate -srcwin xstart ystart xstop ystop input.raster output.raster Projected: gdal_translate -projwin ulx uly lrx lry input.raster output.raster If you are using gdal on your system, gdal_translate is installed.


7

Use CPLSetConfigOption. See the Config Options docs.


7

For OpenSource GIS tech investigate the offereings available via OsGeo. This is not the only source of FOSS4G but is a comprehensive stable of solutions that work well together and, in some cases, are the test bed for certain GIS standards. QGIS is an excellent solution for your needs as it has both desktop and server solutions but also comes bundled with ...


7

Here's just the nuts-and-bolts from some working code: #include "gdal_priv.h" #include "gdal_alg.h" // in main()... GDALAllRegister(); // register all drivers // open your raster - format doesn't matter as all the drivers are registered GDALDataset* SourceRasterDS = (GDALDataset*) GDALOpen(Raster,GA_ReadOnly); double GeoTransform[6]; ...


7

I've just released a prototype program Arc Raster Rescue which extracts raster data from the ArcGIS File Geodatabase format.


6

Esri shapefile fields are limited to 10 characters, no matter how they are created.


6

There's no inefficiency here. They are only c++ pointers to the same layer instance -- it's not two instances in separate memory of the same map layer.


5

Ok, got this working - and feel like putting the long answer here, as it has a lot of useful GEOS example bits in it. Here we go. Warnings I haven't compiled this - I stripped out a load of project specific stuff and replaced it with a simple Point class which probably needs a copy/assignment operator. But it worked before I did that. I'm not sure this ...


5

Google Static map api requires centre,lat/lng and pixel size as well as zoom level This is a non-JavaScript version (but python) for working out the pixel dimensions. You will need to modify to suit your needs but the key point is that it contains CalculateBoundsZoomLevel Which take a cluster of points and calculate the zoom level and centre of the map ...


5

I had your same problem. I solved it updating the code in order to match the QGis 2 major changes: int main(int argc, char *argv[]) { QgsApplication app(argc, argv, true); QString myPluginsDir = "/usr/lib64/qgis"; QString myLayerPath = "pathtoashapefile"; QString myLayerBaseName = "italy"; QString myProviderName = "ogr"; // ...


5

That solved my problem. Further information and a tutorial can be found here http://gdal.org/1.11/ogr/ogr_apitut.html A C++ version for GDAL 1.11: #include <GDAL/ogrsf_frmts.h> int main() { OGRRegisterAll(); OGRDataSource *poDS; poDS = OGRSFDriverRegistrar::Open( "data.shp", FALSE); }


5

Is there a different mechanism for vector files? Yes. Although the vector and raster drivers were merged in GDAL 2x, you still need to know which methods apply to rasters and which are for vectors. Confusingly, vector datasources now expose methods that only apply to rasters... The GetProjectionRef method you are using applies to raster datasources and ...


4

Addins are based on managed code (or Java), so you can develop them in managed C++/CLI, not in pure C++.


4

You need to build the plugin with the 1.7.4 libraries.


4

Here are pretty recent examples for QGis C++ plugin development. QGis C++ plugin examples


4

There is a freeware package called RadioMobile which is designed for radio communication studies that generates a view shed. The output is based on a DEM input and can be either a vector (point file) or Raster. I have been able to use the vector point file to create polygons through some scripting which I will be happy to share with you. Since you can set a ...


4

ogrinfo as nothing to do with Visual Studio. It is a command line tool (Windows, Linux, Mac OS X) So you use it in the Windows console or in the Linux and Mac OS X shell in the same way. ogrinfo yourshape.shp with a lot of options: (ogrinfo) And, there are many, many tutorials in Gis.StackExchange : search ogrinfo and on the Web....


4

Mapnik is a c++ toolkit for making maps and has python bindings – http://mapnik.org


4

If you're looking for something that's really easy to use and your lat/long data come from a shapefile, you could check out the Python Geographic Visualizer (GeoVis) module. It has no dependencies, requires no installation, and is very easy to use. In the newest version you can also zoom in on specific areas and symbolize based on attribute classification: ...


4

Using QgsMapCanvasItem is the way to go here as you will not have to refresh the canvas. You just have to make sure your implementation is correct. Here is a basic example (taken from https://github.com/DMS-Aus/Roam/blob/master/src/roam/gps_action.py) class GPSMarker(QgsMapCanvasItem): def __init__(self, canvas): QgsMapCanvasItem....


4

Here is a good paper which has a C++ focus. It seems very detailed, 147 pages.Automated Label Placement In Theory and Practice


4

You're trying to use an OGR (vector) driver with GDAL (raster) tools. Here's a few lines of my working code that may help: char* BasePath = new char[FullPathMax]; // this does have a value before it's used OGRRegisterAll(); OGRDataSource *hDS = NULL; OGRSFDriver *Driver = NULL; hDS = OGRSFDriverRegistrar::Open(BasePath,FALSE,&Driver); As you can see ...


4

If you want to write a lasfile with SRS information, you must create your liblas::Writer using a liblas::Header that has a defined SRS. Change your code to this: ofstream ofs; liblas::Header header; liblas::SpatialReference srs; srs.SetFromUserInput("EPSG:4326"); header.SetSRS(srs); header.SetPointRecordsCount(1); ofs.open("test.las", ios::out | ios::binary)...


4

Data Provider vs Vector Layer A vector layer has a data provider which (normally [1]) is used to store data persistently. If you edit something on the layer with a normal edit session, your changes will be saved in the vector layer until you commit them, then they will be sent to the data provider. Edit Sessions In your example you start an edit session ...


4

In QGIS styling is layer based, so it is generally not possible to set different styles or different symbols for individual features. I think this is because features are handled by the data source, while styling is organized by QGIS's layer. Nevertheless you can get individual styling based on the feature attributes. This is called a "Data defined override"...


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