Hot answers tagged osgeo
36
Quantum GIS
uDig
OpenJump
gvSIG
TerraView
Kosmos
WhiteBox
24
Based on comments from @mattwilkie, and testing myself, I am updating this to change the first few steps. You should be able to install QGIS Wroclaw 1.7.4, with ESRI File GDB support, using the OSGeo4W installer. Here is the process that worked for me. Please note that I am running a Window 7 64Bit computer. The File Geodatabase I am opening was created ...
23
I would look at OSGeo.org for this. They maintain a collection of Open Source GIS packages and utilities.
This includes:
GRASS
OSSIM
Quantum GIS
gvSIG
In addition, there are many useful tools and libraries, such as GDAL, OGR, OpenLayers, etc.
8
I believe the Assemble TIGER Polygons sample has what you're looking for:
# Open the datasource to operate on.
ds = ogr.Open( infile, update = 0 )
poly_layer = ds.GetLayerByName( 'Polygon' )
#############################################################################
# Create output file for the composed polygons.
nad83 = osr.SpatialReference()
...
7
There is not a best way to do it, no 'Add Remove Programs' method. But...
The simplest way is to delete C:\OSGeo4W. This will remove all the installed data. You can also uninstall stuff through the osgeo4w.exe installer.
(From the website:http://trac.osgeo.org/osgeo4w/wiki/FAQ)
Is there a way of uninstalling packages or all of OSGeo4W?
Individual ...
7
/*
** We do not want to interfere with warnings or debug messages since
** they won't be translated into exceptions.
*/
if (eclass == CE_Warning || eclass == CE_Debug ) {
pfnPreviousHandler(eclass, code, msg );
}
The UseExceptions handler doesn't listen to anything other than CE_Error, or CE_Fatal. What you're seeing is probably a CE_Warning or ...
6
you're going in the right direction.
Unfortunately in OGR and GDAL there are no "List all datasets" functions available. This can be a bit of a pain, but it's easy enough to implement given a couple of provisos:
ogr.Open and gdal.Open will try and open any dataset, and will return None if
it fails (note, this doesn't throw an exception)
Many datasets are
...
5
I suspect it's because the underlying GEOS library only work in Cartesian space rather than spherical, so you'll have to subtract 360 from any longitudinal coordinate greater than 180, which makes 359 == -1. Of course, you'll still have problems with features crossing the anti-meridian (i.e. +- 180 degrees longitude), but you can easily detect that and not ...
4
I've had better luck with pyinstaller than py2exe. It pretty much works out of the box for me with o4w python (you may need to install the optional python-win32 package). Follow the install instructions, and run the Build step. I didn't need to get into manually altering the spec file or even using options (other than --onefile for end user simplicity). Just ...
4
SAGA GIS, System for Automated Geoscientic Analysis, is often under represented in floss GIS lists. SAGA developed from raster processing roots, and is thus very strong there, and grew into vector handling and analysis later. It is a mature tool.
4
I've had some luck reading from and writing to layers. Specifically, I have code that will read a shapefile layer containing polylines and output the geometry of each feature to text files (used as input for an old model).
name = layer.name()
provider = layer.dataProvider()
feat = QgsFeature()
# Now we can loop through all the defined features
...
4
Is it possible to add a field to an existing shapefile using Python OGR..
from osgeo import ogr
driver = ogr.GetDriverByName('ESRI Shapefile')
dataSource = driver.Open(“c:/test/Test2.shp”, 1) #1 is read/write
#define floating point field named DistFld and 16-character string field named Name:
fldDef = ogr.FieldDefn('DistFld', ogr.OFTReal)
fldDef2 = ...
3
I was able to get py2exe to work using a suggestion from wildintellect on IRC. After installing py2exe on the system python, I checked the install log (c:\Python27\py2exe-wininst.log) and copied the files into the o4w python installation (c:\OSGeo4W\apps\python27\lib). Basically, that meant the following files and directories:
...
3
It turns out that I forgot to type sh before the shell script in the osgeo4w. I also had an extra pair of quotes after hillshade in script. Once I removed the quotes and typed "sh hillshade.sh" into the osgeo4w shell everything worked like a charm. See below for the updated and correct script. Man this is going to save me a ton of time!
for f in *.tif
do
...
3
Besides the OSGeo Live distribution, as already mentioned here, see also
Enterprise Linux GIS
Enterprise Linux (EL) and derivatives (that is, Red Hat Enterprise Linux, CentOS and Scientific Linux) is a popular and robust platform for servers and computing-heavy workstations, and is therefore a good fit for GIS specific requirements.
It works also ...
3
What about using the OSGeo Live distribution?
OSGeo-Live is a self-contained bootable DVD, USB thumb drive or
Virtual Machine based on Xubuntu, that allows you to try a wide
variety of open source geospatial software without installing
anything. It is composed entirely of free software, allowing it to be
freely distributed, duplicated and passed ...
3
Going with OGR and GDAL as you did is probably the right way. You've got a solution that works.
Concerning the original question «Is it possible to have the python shell from either qgis or argis to load (import) both qgis.core and arcpy?», the answer is not that simple :
Technically Yes, you can
Legally, you can't (mostly)
QGIS is GPL for its C++ core ...
2
It should be possible as long as both modules are visible to the Python shell you'd use. You might need to add one or both modules to the PYTHONPATH variable.
However if all you want is to read tab files without converting, you're better off using gdal/ogr. It should be able to open the tab files and get the metadata you want.
I hope this works.
import ...
2
I've been using GDAL/OGR library with Python 2.5 for quite a while. I downloaded Windows installation binary from http://download.osgeo.org/gdal/win32/1.6/ and installed it. After that, you need to set up the Environment variable (path) under Windows. This way, it should be available to you enywhere outside QGIS.
...
2
Open Aerial Map's wiki (http://openaerialmap.org/Processing) suggests
Grass (per Micha's suggestion)
OSSIM http://trac.osgeo.org/ossim/ - probably best bet.
http://www.digilab.uni-hannover.de/index.html - looks like it would require some development work to be useful
http://www.orfeo-toolbox.org/otb/ - very active development, but perhaps more suited to ...
2
If you want an simple IDE like "idle" to write Pythonscripts, you could use Pythonwin under %OSGEO4W_ROOT%\apps\python27\lib\site-packages\pythonwin\Pythonwin.exe where %OSGEO4W_ROOT% usually points to C:\OSGeo4W
Here is a batch-File I'vh put on my desktop to start it:
@echo on
SET OSGEO4W_ROOT=C:\OSGeo4W
call %OSGEO4W_ROOT%\bin\o4w_env.bat
SET ...
2
If you go with the default install of osgeo4w it will create a folder on the c drive for all the osgeo projects. this will also have a launcher for the osgeo4w commandline environment which is nicely self-contained. (it usually places a shortcut to the desktop as well)
You just have to remember to launch that and not cmd if you want to use the osgeo python ...
2
one option would be to add the osgeo python to your windows registry:
http://effbot.org/zone/python-register.htm
this site also contains information on how to remove it from the registry if you so desire.
I am pretty sure this will help you as long as you have admin rights to the registry.
2
You need the GDAL-GRASS plugin to be additionally installed.
For OSGeo4W, see the package info at
http://download.osgeo.org/osgeo4w/release/grass/gdal-grass/
2
The latest versions of MapServer (6.0+) support server-side clustering - http://mapserver.org/mapfile/cluster.html
Since version 6.0, MapServer has the ability to combine multiple
features from a point layer into single (aggregated) features based on
their relative positions. Only POINT layers are supported. This
feature was added through MS RFC ...
2
OK so a second attempt to answer your question with a pure GDAL solution.
Firstly, GDAL (Geospatial Data Abstraction Library) was originally just a library for
working with raster geo-spatial data, while the separate OGR library was intended to
work with vector data. However, the two libraries are now partially merged, and are
generally downloaded and ...
2
Maps and WMS Info are stored in your user profile, or the registry.
I have QGIS Lisboa standalone and OSGEO4W Master installed in parallel, and both can open the same projects (unless some new or deprecated plugins are installed).
I would not encourage you to relay only on Master, as it gets broken from time to time.
1
PostGIS can do what you're talking about. I have it set up on a laptop for personal use, but if I wanted to expand it out simply dumping the data and loading it onto a more traditional server would be sufficient.
You can use Postgres's roles to define admin and read only accounts.
To back up the data you can set up a cron job that runs pg_dump and ...
1
For software installation, since Linux distributions usually make use of software repositories rather than downloaded installation files, such as OSgeo4W_setup.exe for Windows, you'd want to research you're particular Linux versions available repositories containing GIS application packages. Windows Users: Repositories for Linux are like Software Stores, or ...
1
I think my best guess would be that you should clip one raster using the other, and save the results as a .vrt to save time.
use this vrt in your previous gdal_calc calculation. that should work.
side-note: The answer is actually in the Error message. I dug a bit deeper and looked at the code here ( ...
Only top voted, non community-wiki answers of a minimum length are eligible
