Tag Info

Hot answers tagged

41

In short, the distance can be in error up to roughly 22km or 0.3%, depending on the points in question. That is: The error can be expressed in several natural, useful ways, such as (i) (residual) error, equal to the difference between the two calculated distances (in kilometers), and (ii) relative error, equal to the difference divided by the "correct" ...


9

After trying around with everything I finally figured out how to solve the problem. It had indeed to do with the CRS. Right click "Set CRS" was not enough here. I had to perform (on the raster) Raster->Projections->Warp, then set the desired CRS again and save as Geotiff. The mask layer (vector layer) had to be saved again with the same CRS. After that the ...


7

I've explored this question recently. I think people want to know what spherical radius should I use? what is the resulting error? A reasonable metric for the quality of the approximation is the maximum absolute relative error in the great-circle distance err = |s_sphere - s_ellipsoid| / s_ellipsoid with the maximum evaluated over all possible pairs ...


7

Close all ESRI applications. Then only start the one where you will do the editing (eg. Arcmap). This will release all locks that are on your data from other applications, which are interfering with your data manipulation. If it still doesn't work, also try to restart your computer.


6

First thing to do is bring the top of your for loop outside the try statement. You want to get into your iteration before you give the try statement a chance to kill your operation. Next you'll want to add a few lines to open an error log and write filenames of corrupt files. import arcpy, os, sys, traceback, time oldpath = 'W:\\' newpath = 'W:\\GIS' ...


5

I have faced the same problem: "Internal Server Error with Ubuntu 12.04". Everything looked OK to me (I even run successfully a perl fcgi script to test FCGI in my apache server). I continually got an Internal Server Error when I run a get Capabilities request. The apache log file said "Premature end of script headers: qgis_mapserv.fcgi". The problem was ...


5

Your source coordinate system is most likely not defined in the CVS file that GDAL searches for proj4 strings. It looks like you might be able to pass the source EPSG as 3031 (from spatialreference.org) Note that it looks like your input is in a local projection. Is this clipped from a larger raster? To explicitly define the source you could just provide ...


5

The wildcard to use with LIKE depends on the data source. You are using square brackets as field name delimiters. So I suppose you are using a Personal Geodatabase. The wildcards you have to use to query a personal geodatabases are asterisk (*) for any number of characters and question mark (?) for one character. If you use SDE or file based geodatabase ...


4

Woohoo! Figured it out. This thread had the solution to change the CSS rather than the JS. .olImageLoadError { /* when OL encounters a 404, don't display the pink image */ display: none !important; } This help article was helpful too, but I have not idea how to tell TileMill/MapBox to generate blank tiles rather than missing tiles. I'll get there ...


4

I suppose that you are working with SDE. You should kill all connections using sdemon command-line tool. If there is an ArcSDE installed on PC where you a running the script then you can execute sdemon -o kill locally to kill all connections. Take a look at this help topic. I am not sure is it killing direct-connections on 10.0. I remember that it was a ...


4

I'm not an expert in the compilation of QGIS (so will bow to greater knowledge and please treat this answer as a suggestion and not gospel), but I can think of two possible reasons for this error: If you have a separate instalation of GDAL for a different version of Python (especially Python 3.x) you will get similar errors and GDAL will not work in QGIS ...


4

Make sure you have write permissions and ownership on the .qgis directory try running following commands: sudo chmod 755 ~/.qgis sudo chown -R <your username> ~/.qgis


4

Add the legend on map load, the onLayersAddResult is firing multiple times which means it is trying to create more than one legend of the same name. Connect to the onLoad event dojo.connect(map, 'onLoad', function (results) {


4

As the error says, you have problems with the network dataset itself not the Route layer or solving the model. I'd try several things: 1) Add a network dataset to ArcMap and when prompted do not add any source features. Does it draw correctly and has edges? If yes, then the network dataset has been built properly. Try running a simple test of routing ...


4

As suspected by many commenters, this was an issue with my install. Apparently, i was not paying close enough attention when installing GDAL and the Python Bindings. I installed GDAL Core and plugins (dll's) from gisinternals.com, but somehow I didn't think to install the Python Bindings from there as well. The Python Bindings I installed were from a ...


4

You have to distinguish between the project CRS and the layer CRS. Your data is in lat/lon degrees, so the layer CRS should be EPSG:4326, WGS84. Your project CRS can be anything else. In most cases a projected CRS, where units are metres or feet. On-the-fly projection should always be activated. Just to be sure: the coordinates should have decimal points ...


4

I think your syntax is off in your final line of code. Try the following: arcpy.TabulateIntersection_analysis(in_zone_features, 'distance', in_class_features, out_table, 'INFO') The curly brackets { and } in the Tabulate Intersection help page signify optional parameters. You don't need to put them in your code, however.


4

In Arcmap open the python a.k.a. command line window, under Geoprocessing in 10.1, type import os, and then os.__file__ to deduce the location of python.exe (recipe found here). Use the results of that to fine tune the PYTHONPATH environment variable in whatever command shell or IDE you're using. >>> import os >>> os.__file__ ...


4

mapping.py is running an assertion test to make sure that your report source is a MapDocument, TableView, or Layer. This is the first argument you provided. And it is not a MapDocument, TableView, or Layer, it is a string. That is what AssertionError: <type 'str'> means. Instead of giving the string '2013pp' you need a reference directly to 2013pp as ...


4

I also get the same error on Arcmap 10.1 SP1. I scratched my head and after playing around with it, I tried manually (without arcpy) and used a different table name. Well it's as simple as that: the software dislikes having a table called Table! Very frustrating.... arcpy.CreateFileGDB_management("C:","GeoDatabase") tbl = arcpy.CreateTable_management ...


4

How to access parameters in a script tool using arcpy.GetParameterAsText() is described here. The way that you tried, arcpy.SetParameterAsText(), is intended for setting output rather than input parameters


3

you can reintall the ftools plugin. after that, go to "plugin" menu, then select "Manage Plugin..." from the "QGIS Plugin Manager" dialog click the "clear all" then click "select all" to refresh all plugins intalled. then click "Ok" to close the dialog. then see what happen to your "Vector" menu (Data Management Tools)... i have also experienced same of your ...


3

This has nothing to do with your error on the corrupt MXDs, but since you are wanting to log, here is a little bare-bones nugget (pretty much straight from the Python docs) using the logging module (as suggested by @om_henners). @sgillies comment above looks excellent as well. import logging import datetime import os date_tag = ...


3

You may take a look at "pyModis", a Free and Open Source Python library to work with MODIS data. It can bulk-download, mosaik and reproject: http://gis.cri.fmach.it/pymodis/


3

In the past I've had this problem too. It seemed to come and go with different versions of QGIS and I never found a reason for this. You can work around the problem by making a virtual raster from your raster images. Raster -> Miscellaneous -> Build Virtual Raster (Catalog). This will build a *.vrt file that you can treat exactly as if it was a merged ...


3

I see two problems. First, the way it's indented won't iterate through the featureclasses and perform the process on each, it will just iterate through and print your print statement. Second, your expression should be built with quotes around it (at least that's the case for VB syntax) and called as a variable and not a string. Try the following: import ...


3

If this problem occurs for some raster files and others not, you might check the length of the name of the raster file. I remember also having that problem, but I don't remember if the magic name length was 8,11 or 13 characters. I know it sounds odd these days to have short names, but nevertheless might be worth to test.


3

In my opinion there is an issue with layer removal. To my understanding the function OpenLayers.Layer.destroy() will not remove the layer from map; according to the API docs, its mission is "to alleviate cyclic references which the Javascript garbage cleaner can not take care of on its own" (http://goo.gl/LvYxD). To remove a layer, after calling the ...


3

I'm not sure the QGIS portion of the problem, but I can see a couple of problems right away. First, if you are using geometry types (as opposed to geography types) then the unit of measurement for the distance is the unit of the coordinate system (i.e. degrees). Remember, geometry types work on planar geometries, not spheroids. In short, you're asking for ...


3

You can't use iif directly in field calculator expressions, you need to use the code block. There are some examples on the Field Calculator Examples help page. Python: Expression: Reclass(!WELL_YIELD!) Expression Type: PYTHON_9.3 Code Block: def Reclass(WellYield): if (WellYield >= 0 and WellYield <= 10): return 1 elif (WellYield ...



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