Hot answers tagged

18

There is one blog post from Michalis Avraam that explains essential skills to succeed in GIS career which I think is well written. You will probably find lot of good advices there.


13

I like Chris Garrard's Python for Geoprocessing course materials. http://www.gis.usu.edu/~chrisg/python/2009/ Personally, I find programmatic manipulation of OGR/GDAL to be indispensable. With respect to finding the best fit for you, consider the software or geostack you wish to be most expert in (like ArcGIS, QGIS, PostGIS-GeoServer-OpenLayers), and then ...


10

Don't start with C++ and GIS without learning software development first. It's just too much. Python is a good place to start regardless of what GIS platform you go with later. There are a lot of books, websites and training materials available and a lot of colleges use python as an introduction before going on to the heavy duty programming languages, like ...


8

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 ...


7

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 ...


7

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? ...


7

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

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 ...


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 ...


6

I was able to learn Python by sitting down with a copy of Learning Python by Lutz & Ascher (O'Reilly Press). My office uses ESRI products, so to get the connection with ArcGIS, I created several models using ESRI's Model Builder and exported them to Python. Then it was just a matter of looking at the exported python scripts, digging through the book ...


6

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


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

Use CPLSetConfigOption. See the Config Options docs.


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

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]; ...


4

You need to build the plugin with the 1.7.4 libraries.


4

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


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

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 ...


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

GeoTransform is an array that contains six numbers: X origin Pixel width Angle (with vertical axis) Y origin Pixel height Angle (with horizontal axis) X and Y are coordinates of the top left corner of your raster image. Each pixel has size, width and height and it is a value in meters or degrees (depends on your CRS) - this value is constant, not ...


3

Try to look at Proj.4 library. You can reproject you points to common coordinate system and then perform the comparison. Try to create some wrapper class that will perform automate reprojection to common CS and then compare coordinates.


3

For converting from GeoTiff to BMP you can use GDAL library. It has C++ API and well-documented. I have found GDAL convertion example for C#. I hope it will help you to start from. For BMP you will need to create "world file" to store GeoReferencing information. I think GDAL will create it by default.


3

The "bounding box" can have several interpretations. The two most natural are (a) the sides are meridians and the top and bottom are circles of constant latitude and (b) the sides are still meridians, but now the top and bottom are geodesics (which therefore do not necessarily have constant latitude). Fortunately, the solution method is the same in both ...


3

There are very few colleges/universities which offer programming courses related to GIS. I would recommend the Elmhurst College GIS Certificate Program which has two (2) of these courses as part of their GIS Cert. Program, both programming related: ISG 100 GIS Programming with ArcObjects ISG 200 Implementing Geodatabases http://public.elmhurst.edu/adult/...


3

To find which feature the coordinate is near, you first need to build an R-Tree index of bounding boxes or envelope of each feature. A popular library for this is libspatialindex. Secondly, you would then need to know for each of the matched features from your R-tree, which ones match. GDAL/OGR does have some operations based on GEOS to see if the geometry "...


3

You might want to try using GEOS, a C++ port of the Java Topology Suite: http://trac.osgeo.org/geos/ You were on the right lines with a bounding-box check, but the even smarter way is build a spatial index which means you can do better than O(n) for that first pass. GEOS can build spatial indexes for you. I'm wondering what mobile platform you're ...


3

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



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