Tag Info

Hot answers tagged

22

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


6

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


4

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 = r'W:\' newpath = r'W:\GIS' ...


4

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


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


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

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


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

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

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

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

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


3

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


3

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


3

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


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


3

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.


3

i'm not sure why your arcpy has been copied to c:\python27\lib. The standard install location is inside ArcGIS\desktop10.x or equivalent for other products. approach to fix #1 : dodge stray arcpy package. if there is a arcpy folder in the product install directory (eg. c:\Program Files (x86)\ArcGIS\Desktop10.x.) it could just be hitting this stray arcpy ...


3

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


2

The most important thing to do to report a bug is to have a repro case (which you've done, thank you). The official channel to report a is through support: http://support.esri.com/en/webform/support/customerId/5753/chat/false (you'll need to be logged into your Esri global account). That being said, looking at your jsfiddle, I see the same thing as ...


2

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


2

Since you can successfully load subsets, try checking if all geometries in the table are valid, e.g. using ST_IsValid(). Invalid features might upset QGIS. Another problem source I have encountered is specifying a wrong CRS for the geometry column. But that's probably not the case here since subsets work.


2

Not an answer I'm afraid, but as a test I've just used the Raster -> Extraction -> Clipper method to clip a raster image with no problems at all. The illustration shows the clipped part of the map image together with the polygon used for clipping. QGIS Master, Ubuntu 12.04 (64-bit). You're in Windows by the look of it, what version of QGIS are you using? ...


2

Since you don't want to do a clip by extend I assume you want to extract the raster cells that are inside each geometric figure of the vector file. One way to do this, is to add a field in the vector file with the value 1, export it to raster format with the same resolution as the raster you have. This will create you a raster with value 1 for the geometric ...


2

Are you sure that you want to create a table before querying it? Try just this: SELECT a.*, b.* FROM table_a a JOIN table_b b ON ST_Intersects (a.geom, b.the_geom) WHERE ST_IsValid (a.geom); Otherwise go to the postgres.log and see if there are any errors reported and update your question according the log file. Make sure that you select the proper ...


2

Based on the error you reported, I would start troubleshooting by updating your NVIDIA graphics driver. Find the "Device Manager" on your system Locate your NVIDIA device in the drop down lists Right click on the icon, select "Update Driver Software..." Just to be safe, do a Windows update Best of luck!


2

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


2

The key clue in the stack trace is that the error seems to be thrown in freemarker.core. FreeMarker is the templating language that GeoServer uses to create custom getFeatureInfo responses. Thus I expect that there is a missing template or that a template file got damaged in the copy process. Look in the DATA_DIR/workspaces/.... directory that matches your ...


2

In my experience with the Attribute Assistant, I found that you need to enter the actual field name not the alias in the FIELDNAME field of the DynamicValue table (e.g. ADDPTKEY instead of Address Point ID). Also, layer names in the TABLENAME field in the DynamicValue table should be the name of the feature class not what the layer is named in the table of ...


2

In general you should catch exceptions. Otherwise you won't really know where things go wrong and how to handle unexpected behavior. Something else: Note that if your workspace ends with a single \ python will interpret this as a escape which will result in a invalid path. To ensure you always have a valid workspace do: if inws[-1:] != '\\': inws += ...



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