Is it possible, in QGIS, to create buffers with a set radius, but with individual values taken from the attribute table?

I am looking to create an output that consists of an 11KM buffer around a number of discrete points, where the buffer has a value defined by a column in the data sets attribute table. Is this possible? If so, is it possible to aggregate the buffer values that 'overlap'? The points represents the origin of each buffer, where the buffer has an 11Km radius. I would like to assign each circle (I have made the fill 95% transparent to simulate, visually, what I am looking for) a value equal to a column in the attribute table, and then aggregate the values wherever two or more buffers overlap/ So, for instance, the two buffers on the souther edge of the city would have an aggregate value equal to the sum of each of those buffers. The buffers in the middle of the city would have an aggregate value equal to the sum of all overlapping values. In essence, the darker the shade, the higher the value. Does this make sense? BTW, thanks @underdark for the suggestion of adding an image. ![Red dots represent the points around which the grey buffers \(at 11km each\) are created.  The underlying polygons are City of Edmonton neighbourhoods.](http://i.stack.imgur.com/X3eWb.png) I was able to add a buffer to the points (as described below) and then by joining the buffer values to the attribute table I was able to define a value for each buffer and visualize, as seen in the following image. Now, I am uncertain how to aggregate the values of each buffer with those that overlap it. I suspect that I need to create a raster of values, but am uncertain. Could anyone please suggest a method? ![Individual values assigned to each buffer - seen here as 'low', 'medium', and 'high'](http://i.stack.imgur.com/6Yhd5.png) Thank you!


Exploratory search for clusters in point data

This is a more conceptual than practical question and is about exploratory cluster identification. While there are very specific meanings in the geography canon as to what they are, in economics they seem to be somewhat loosely defined, often following Porter's lead: > Clusters are geographic concentrations of interconnected companies and > institutions in a particular field. Clusters encompass an array of linked > industries and other entities important to competition. Porter, M. E. > (1998). Clusters and the New Economics of Competition. Harvard Business > Review, (November-December 1998), 77–90. However, I am interested in specifics and formal definitions. I work in city plannning, and there is plenty of talk about cluster x or cluster y being in existence at place z, but I would like to pin it down more and have a data- driven, rather than policy-driven inventory of any and all clusters. Specifically, assuming a point data set representing business establishments, weighted by their employment, and I am interested in _exploring_ , rather than _confirming_ pre-conceived ideas of which clusters may or may not exist, which GIS approach is best suited for identifying which industries might exhibit clustering at a given scale? Is this a Ripley's K case where each industry grouping would be passed separately, or is there a more appropriate approach in the exploration stage when it is not 'known' which industry levels might cluster (depending on how one aggregates the classes, there could be several hundred distinct industries).


post instlacion ArcSde 10 "error creating Arcsde direct Connection (-9)

I installed SQL sever 2008'm doing the post installation used ArcSDE 10 these are the steps I am doing in post installation of ArcSDE 10   1. complete installation.    2. SDE Schema.    3. put the name of my server and I connect using windows authentication.    4. put a new password and name of the database "I get message that the database and the password was created successfully" give ok.    5. in the configuration file will leave the default I give next.    6. in the repository setup option I put the name of my instance name of the database you just created together with the password I set when I made the database.  then I get an error message > connection to "name my base" failed (0) esri server setup utility arcsde > date and time -------------------------------------------------- > ---------------- Error creating arcsde direct connection (-9) could someone tell me I'm doing wrong or that I need


Calculating rate of spread of tree species

I'm fairly new to GIS and using ArcGIS for a palaeoecology project at university. I have created a map with isolines (all in the same layer using the contour tool) which represent time of arrival of a tree species. I need to work out the rate of spread in km per year but have no idea how to do this! I presume I have to find out the average distance travelled and divide by the time taken but im not sure what/how to measure the distance as it has spread in more than one direction.. does anyone have any ideas I've spent the last 2weeks trying different tools and getting nowehere! Please help!!


Suggestions for vector format for contour map

I've been trying to create a contour map of a DEM and I've been running into some technical problems. I want to avoid artifacts, so I'm using a DEM of the entire area. This means the size is rather large, over 40 gb. I then run gdal_contour to get a shapefile. I think gdal started throwing out errors when the .shp file reached over 4gb. This is over the filesize limit of 2gb, so I did not get a finished map or valid shapefile. So I was wondering if anyone had experience working with large raster sets, and had suggestions for an appropriate file format. Other considerations: Space is a small consideration. I created a few contour maps of a small sample section, and noticed that the other formats were over two and a half times the size of the shapefile. Ram is an issue. I'd like to keep ram usage minimized. I only have 16gb of ram, and I saw gdal_contour go up to 12gb of ram used. My fear is that going to a more space intensive format will increase ram usage. I can go up to 32gb of ram, but I'm also wanting to create another contour map with a higher definition, which will increase ram usage.


How to add features to geometry collection using .ShapeCopy

I'm having an issue with trying to complete the loop of adding the selected geometry to my geometry collection. The goal is finding streets that intersect the given streetname (then locating the intersection, which is handled later in code). Here is how I'm currently handling it and maybe someone can suggest an easier alternative or provide some help with the issues I'm having in my 'TODO:' statements. Much thanks in advance.               // get the "Street" featureclass     IFeatureLayer pFeatureLayer = new ESRI.ArcGIS.Carto.FeatureLayer();     pFeatureLayer.FeatureClass = m_fcToQuery;          // query and get a feature cursor of selected streets     QueryFilter pQueryFilter = new ESRI.ArcGIS.Geodatabase.QueryFilter();     pQueryFilter.WhereClause = "TownCode = " + townCodeVal + " AND StreetName = '" + streetNameVal + "'";          // merge selected street segs into geometry collection 1                            IGeometryCollection pGeomColl1 = new PolylineClass();     IGeometry pGeometry1 = new ESRI.ArcGIS.Geometry.IGeometry();     pGeometry1 = pGeomColl1 as IGeometry;          IGeoDataset pGeodataset = new ESRI.ArcGIS.Geodatabase.IGeoDataset();     pGeodataset = pFeatureLayer.FeatureClass as IGeoDataset;     pGeometry1.SpatialReference = pGeodataset.SpatialReference;     IFeature pFeature = new ESRI.ArcGIS.Geodatabase.IFeature();     IFeatureCursor pFeatureCursor = new ESRI.ArcGIS.Geodatabase.IFeatureCursor();     pFeature = pFeatureCursor.NextFeature();     if (pFeature == null) {         return null;     }     while (!(pFeature == null)) {         // TODO: Fix this         pGeomColl1.AddGeometryCollection(pFeature.ShapeCopy); <--error         pFeature = pFeatureCursor.NextFeature();     }          // get a feature cursor of the int streets (3rd dropdownlist)     pQueryFilter.WhereClause = "TownCode = " + townCodeVal + " AND StreetName = '" + streetsInt + "'";     pFeatureCursor = pFeatureLayer.FeatureClass.Search(pQueryFilter, false);          //Merge the selected streets into the Second Geometry Collection     IGeometryCollection pGeomColl2 = new ESRI.ArcGIS.Geometry.PolylineClass();     IGeometry pGeometry2 = pGeomColl2 as IGeometry;     pGeometry2.SpatialReference = pGeodataset.SpatialReference;     pFeature = pFeatureCursor.NextFeature();     if (pFeature == null) {         return null;     }     while (!(pFeature == null)) {         // TODO: fix this         pGeomColl2.AddGeometryCollection(pFeature.ShapeCopy); <-- error         pFeature = pFeatureCursor.NextFeature();     }          //Find the Intersection of the Two Streets     ITopologicalOperator2 pTopoOp = pGeometry1 as ITopologicalOperator2;     Polygon pBuffer1 = pTopoOp.Buffer(0.1) as Polygon;     pTopoOp = pGeometry2 as ITopologicalOperator2;     Polygon pBuffer2 = pTopoOp.Buffer(0.1) as Polygon;     pTopoOp = pBuffer2 as ITopologicalOperator2;          // TODO: fix this     IGeometry pintersection = pTopoOp.Intersect(pBuffer1, 4) as IGeometry; <-- error          if (pintersection.IsEmpty) {         return null;     }


World map projection with United States in center

I am creating a map showing flight paths originating in the United States and traveling to Asia and Europe. I need a projection for the world that will focus the United States in the center of the map, with Asia showing up to the west and Europe to the east. Does anyone know where I might find a projection like this? Edit: I am working in ArcInfo 10.


In terms of development, what capabilities does Google Earth Plugin have over Google Earth?


Custom OSM tiles with Mapbox and/or CartoDB

For a newspaper, we would like to use CartoDB's editor to produce quick overview maps with small amounts of geometry and information such as tooltips etc. For this job, the CartoDB editor seems to be perfect, and suits our needs better than Mapbox' editor. However, we would also like to have a custom styled base map for our "corporate identity", just as ZEIT Online recently launched it: https://www.mapbox.com/blog/zeit-launches-custom-maps/ Hosting our own, custom styled OSM tiles is not really an option, especially because we would like to have a highly detailed map of the whole globe. Still a bit confused by the possibilities of both service providers, we don't know how to proceed: We want to use CartoDB so our journalists can produce quick and good looking maps, but we also want our custom styled OSM tiles - and CartoDB won't host these for us, right? So we would have to use Mapbox where we would upload our tiles and use their tiles in CartoDB (the editor allows to specify a Mapbox tileserver)? But then again, where do we get the OSM data from, that we would style in Tilemill? Do we really have to download the whole planet, and how is it possible to upload such huge data back to Mapbox? I am quite confused about the workflow that would be best used here. Coarse directions are appreciated, too.


Add layer from local arcgis server

I'm trying to add a layer from local arсgis server (http://arcgis.lotsman.net:6080/arcgis/rest/login?redirect=http%3A//arcgis.lotsman.net%3A6080/arcgis/rest/services/maps/scr01/MapServer) as shown in this example:               // create and add new layer     var dynamicLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer");     map.addLayer (dynamicLayer);      but my layer is protected by a password. Of course, I know the password. How do I connect a layer?


Raster data with no values (ArcGIS)

Used a DEM raster and then used the extract-by-mask feature to shrink it to the shp file I'm working with. However, when I try to get unique values, it gives me the following error message: "The number of unique values reached the default limitation (>65536). Note the number (65536) should be read from the setting." I ask because when I loaded up my masked raster (DEM_Mask), I am able to see min-max values of 1685.94-3463. I am trying to use query builder in the conditional tool to filter out areas between values of 2000-2500 (Value <=2000 AND Value >=2500), but see no "Value" field in the query builder. I'm not sure what went wrong or if there are other methods that I'm unaware of.


QGIS + python, Attribute index 0 out of bounds [0;0] when adding a feature to a PostGIS layer (view)

I have a plugin which adds features to a particular PostGIS vector layer using the code below               feat = QgsFeature()     feat.setGeometry(qgsgeometry)     layer.dataProvider().addFeatures([feat])      For one user (postgres user) this works flawlessly, entering a new feature into the dataset, but for another user (same permissions on all tables involved), it fails silenty ~~with this error in the QGIS log:               General error| Attribute index 0 out of bounds [0;0]      I can't find any useful information about that particular error except in the source, lines 190-200:               bool QgsFeature::setAttribute( int idx, const QVariant &value )     {       if ( idx < 0 || idx >= mAttributes.size() )       {         QgsMessageLog::logMessage( QObject::tr( "Attribute index %1 out of bounds [0;%2]" ).arg( idx ).arg( mAttributes.size() ), QString::null, QgsMessageLog::WARNING );         return false;       }            mAttributes[idx] = value;       return true;     }      ~~ I am not setting any attributes at any point, just creating a feature and setting a geometry from a custom mouse tool. Why would this error occur for one user and not the other (same permissions)? Why does it even happen at all?


ArcGIS Workflow Manager - Multiple steps active simultaneously

I'm using ArcGIS Workflow Manager 10.2. I would like to know if its possible to have multiple steps active simultaneously in a workflow. I have a few workflows that I'm modifying and as they are currently setup, only one step can be active at a time. That is to say, within a workflow, when step A is completed, the workflow goes to step B and when step B is completed, it goes to step C and so on. Is it possible to have multiple steps active simultaneously where after step A is completed, the workflow can go to step B AND step C so both B and C are active? To use the ArcGIS terminology. I would want more than one step as the "current step" at any given time in the workflow.


using DotSpatial plugins in my app

I am new with dotspatial and I want to enable and use plugins on my own. I have a custom button that I want to add, it's a click handle measure function and shows the results in a text label. Is there a way to use the measure plugin in this case? How can I use it ? I just need some hints and if it is possible a sample.


Can I listen to the ICommandBar or ICommand OnClick event?

I have an ArcMap extension and I'm listening to the IEditEvents. When the OnChangeFeature, OnCreateFeature or OnDeleteFeature event is called, I want to know if it came from the "merge(Editor_Merge)" button. Is there a way I can listen to the onClick event of the merge button? Thanks


Identifying Intersections of Geology using PostGIS

I'm having problems identifying intersections on a layer of linework, the lines are representative of contacts and faults (geological rock formations). I am trying to select where there are connected line segments of faults and contacts because it is geologically unlikely for a fault to end and a contact to begin immediately after it (thus might be an error in the layer). So I only need to select intersections where there are 2 lines intersecting. Here is the query I have so far I stole most of it from this thread: Identifying road intersections using PostGIS               CREATE TABLE contacts_st_touching_faults as          SELECT ST_Intersection(a.the_geom, b.the_geom),      Count(Distinct a.gid) = 2          FROM     intersect_linejoin_geolines as a,     intersect_linejoin_geolines as b          WHERE ST_Touches(a.the_geom, b.the_geom)          AND a.f_class = 'Contact'          AND b.f_class = 'Fault'          AND a.gid != b.gid          GROUP BY ST_Intersection(a.the_geom, b.the_geom)      When I run this and populate the geometry, I get coordinates with more than 2 intersections (T intersections), but I do only get intersections where contacts and faults are intersecting which is what I want. However, I only want it where **there is an intersection between two lines**. I'm pretty sure this means leaving Count = 2, I've tried Count = 1 and that didn't work either. Thanks for the help!!


GeoServer - GeoWebCache tile larger than others

GeoServer Version 2.2.4, GeoTools Version 8.6, GWC 1.3-RC5 I have an issue where a tile is sized incorrectly and misaligned when I provide a gutter for a layer's tile caching. The issue occurs in the top right corner of a large rectangular feature. The size of all tiles surrounding the bad one is 256x256 but Firefox tells me that the bad tile is 306px × 306px (scaled to 256px × 256px). Shouldn't GWC always return tiles of the same size even if a gutter is configured? My understanding is that the gutter should be stripped out. I see this when I view the tile preview from the geoserver admin page. The gutter is configured at 50px and the bad tile is 50px larger. Is this likely to be a bug or more likely a configuration issue? Since the one tile is larger, I am leaning toward a bug..


add an INDEX to an IFeatureClass with ARCGIS Java sdk

I want to add an index to a feature class. To do so, I used the very short and complete example given there: http://resources.esri.com/help/9.3/arcgisengine/java/doc/b22267cb-642c-11dc-9ca3-0b35f906bb2e.htm My modified code is below. When I use that code, I obtain an exception due to a **Cast** problem; It cannot cast from a **IFeatureClass** to a **ISchemaLock** : _Exception in thread "main" java.lang.ClassCastException: com.esri.arcgis.geodatabase.IFeatureClassProxy cannot be cast to com.esri.arcgis.geodatabase.ISchemaLock_ Are you able to run this code sucessfully without the error ? If you want to run this code, you have to change the 2 first string inputs in the code (the path and name of your shapefile) * * *               import java.io.IOException;     import com.esri.arcgis.system.AoInitialize;     import com.esri.arcgis.system.EngineInitializer;     import com.esri.arcgis.system.esriLicenseProductCode;     import com.esri.arcgis.system.esriLicenseStatus;     import com.esri.arcgis.datasourcesfile.ShapefileWorkspaceFactory;     import com.esri.arcgis.geodatabase.Fields;     import com.esri.arcgis.geodatabase.IFeatureClass;     import com.esri.arcgis.geodatabase.IFeatureWorkspace;     import com.esri.arcgis.geodatabase.IField;     import com.esri.arcgis.geodatabase.IFields;     import com.esri.arcgis.geodatabase.IFieldsEdit;     import com.esri.arcgis.geodatabase.IIndex;     import com.esri.arcgis.geodatabase.IIndexEdit;     import com.esri.arcgis.geodatabase.ISchemaLock;     import com.esri.arcgis.geodatabase.IWorkspace;     import com.esri.arcgis.geodatabase.IWorkspaceFactory;     import com.esri.arcgis.geodatabase.Index;     import com.esri.arcgis.geodatabase.esriSchemaLock;               public class classmain     {         public static void main(String[] args)         {                  try             {             // >>> Enter here the path and the name of your shapefile.             String folderPath = "D:\\ShapeFolder\\test";             String shapefileName = "myShape_022";                  // Step 1: Initialize the Java Component Object Model (COM) Interop.             EngineInitializer.initializeEngine();                  // Step 2: Initialize an ArcGIS license.             AoInitialize aoInit = new AoInitialize();             aoInit.initialize(esriLicenseProductCode.esriLicenseProductCodeAdvanced);                  // Load the  ShapeFile into "featureClass"             IWorkspaceFactory workspaceFactory = new ShapefileWorkspaceFactory();             IWorkspace workspace = workspaceFactory.openFromFile(folderPath, 0);             IFeatureWorkspace featureWorkspace = (IFeatureWorkspace)workspace;             IFeatureClass featureClass = featureWorkspace.openFeatureClass(shapefileName);                  // Find the field "FID" in featureClass that will be used as an index             int fieldIndex = featureClass.findField("FID");                  // Get the specified field from the feature class.             IFields featureClassFields = featureClass.getFields();             IField field = featureClassFields.getField(fieldIndex);                  // Create a new fields collection and add the specified field to it.             IFields fields = new Fields();             IFieldsEdit fieldsEdit = (IFieldsEdit)fields;             fieldsEdit.setFieldCount(1);             fieldsEdit.setFieldByRef(0, field);                  //Create a new index and cast to the IIndexEdit interface.             IIndex index = new Index();             IIndexEdit indexEdit = (IIndexEdit)index;                  // Set the index's properties, including the fields it will have associated with it.             indexEdit.setFieldsByRef(fields);             indexEdit.setIsAscending(false);             indexEdit.setIsUnique(false);             indexEdit.setName("IndexFID");                  //Attempt to acquire an exclusive schema lock on the feature class.             ISchemaLock schemaLock = (ISchemaLock)featureClass;             schemaLock.changeSchemaLock(esriSchemaLock.esriExclusiveSchemaLock);             featureClass.addIndex(index);             schemaLock.changeSchemaLock(esriSchemaLock.esriSharedSchemaLock);                  //  Disconnect licences              aoInit.shutdown();         }         catch (IOException ex)         {             System.out.println(ex.getMessage());             System.out.println("App failed.");         }     }      }


Does each road segment need to be digitized into a separate entry for a road network?

I am trying to understand this code in pgRouting for creating topology:               CREATE OR REPLACE VIEW road_ext AS        SELECT *, startpoint(the_geom), endpoint(the_geom)        FROM road;     CREATE TABLE node AS        SELECT row_number() OVER (ORDER BY foo.p)::integer AS id,            foo.p AS the_geom        FROM (                    SELECT DISTINCT road_ext.startpoint AS p FROM road_ext           UNION           SELECT DISTINCT road_ext.endpoint AS p FROM road_ext             ) foo        GROUP BY foo.p;          CREATE TABLE network AS        SELECT a.*, b.id as start_id, c.id as end_id        FROM road_ext AS a        JOIN node AS b ON a.startpoint = b.the_geom        JOIN node AS c ON a.endpoint = c.the_geom;      From this code, can anyone explain this code a bit please. I am confused and want to know if it generates entries of individual road segments in separate rows even if I digitize some road segments into a single road. Clearly, I want to know what way we need to digitise roads for creating a road network? Shall we need to split a long road into new segments at every connection to a small road or do the below code generates it automatically? Please help!! As the code only says startpoint and endpoint, I dont get how it can identify the intermediate nodes where there are connecting roads. For Example, in the below image ![enter image description here](http://i.stack.imgur.com/dkt4N.jpg) I digitised the long road in a single entry. Now if I run the above code, will it generates the individual line segments?


Why do no Labels appear on .pdf output from ArcPy when turned on in Layout?

Do labels needed to be coded into an arcpy script in order to be visible on an arcpy .pdf output? In ArcGIS the labels are visible for various features, but when I use the arcpy script (either in IDLE or in ArcGIS directly) only certain labels appear. I've checked the Label manager and verified the expressions (i.e. making sure they're visible at a large scale (1:1000) but everything looks ok). Interestingly, it's only the labels for the features that are run through the script that don't appear. Any thoughts would be much appreciated **Edit:** I've checked to make sure the layers are visible![label manager view](http://i.stack.imgur.com/juTRl.jpg) Two things that are additionally weird: 1) every time I run the code I get a slightly different result, i.e. some with label, some without, and 2) although the code is producing the right number of individual .pdfs, they are all for the same record, i.e. there are 17 .pdfs produced for 17 records, but each one is the same (I know this last part is likely considered a second question, but something tells me they're related). Here's the full code:               mxd = arcpy.mapping.MapDocument("C:\\temp\\Graffiti_DM3.mxd")     df = arcpy.mapping.ListDataFrames(mxd, "*")[0]     graffitilyr=arcpy.mapping.ListLayers(mxd, "*", df)[0]          newquery = '"Incident_Z" =' + "'10003'"     graffitilyr.definitionQuery=newquery     features = arcpy.SearchCursor(graffitilyr)     count = 1          print "let's get started"     for feature in features:             df.rotation = "0"             arcpy.SelectLayerByAttribute_management(graffitilyr, "NEW_SELECTION", "FID=" + str(count))             #df.extent = graffitilyr.getSelectedExtent(True)             df.zoomToSelectedFeatures()             df.scale = df.scale * .004             arcpy.RefreshActiveView()             df.panToExtent(graffitilyr.getSelectedExtent())             #df.scale = "1000"             outpdf="C:\\temp\\" + str(count) + ".pdf"             arcpy.mapping.ExportToPDF(mxd,outpdf)             count = count+1


Is it possible to create a python script to rec/post versions?

I’m trying to set up a python script so that I can schedule our rec/post to run on a server. I’ve created a model with the Reconcile Version tool, with the option to Post checked on. I then export this to a Python script. I run the script, and it finishes without any errors, but I do not see that my edits are posted to the default version. Is it not possible to script this tool, or is there a switch that I’m missing? Any help is much appreciated. I’m using ArcSDE 9.3.1.


Is there any way to create elevation mesh plot in arcmap 10.1

I am using arcmap 10.1. I have data with elevation value.Now i want to create mesh plot (as created in golden software surfer). How to do this Thanks in advance


GeoExt: Excluding some of the layers from the legend

Openlayers and GeoExt for producing a web map. The map has a legend panel generated by GeoExt. By default, GeoExt grabs the details of every layers from the map and create a legend for all the layers. However, I would like to exclude some of the layers to be displayed from the legend, what should I do to achieve this?                   legendPanel = new GeoExt.LegendPanel({         map: map,         title: 'Legend Panel',         renderTo:'description',         border: false,         autoScroll: true,         defaults: {             style: 'padding:5px',                        baseParams: {                 FORMAT: 'image/png',                 LEGEND_OPTIONS: 'forceLabels:on;fontName=Verdana;fontSize:11'                 }             }         });      Thanks!


Map Identify tool in ArcGIS Server 10.1

I tried this http://tereshenkov.wordpress.com/2010/08/16/map-identify-tool-in- arcgis-server/ but it doesn't work on ArcGIS Server 10.1 (.NET Web ADF) :-( Application doesn’t use file MapIdentify.js. How to force the application to use this file and not default method from WebControls?


GeoServer OpenLayers.Protocol.WFS available options?

> **Possible Duplicate:**   >  Understanding OpenLayers documentation I'm trying to use OpenLayers as part of OpenGeo to display WFS data. My data isn't displaying and I am having trouble finding out what options are available to the OpenLayers.Protocol.WFS class. The help just says > Parameters: > > options {Object} Optional object whose properties will be set on the > instance. ...and doesn't give any information as to what options are available. Google just came up with the same quote. This is really hard to debug as I'm not getting any errors - even if I type in stuff that I know is wrong - the data is just not showing.


Rotating a vector layer in QGIS with qgsAffine (or other method)?

I would like to rotate a set of vector points in QGIS an arbitrary number of degrees around a central point (or arbitrary point). This is similar to a recent question about creating a regular grid; it was suggested there to use the "Affine Transformation" tool (which I assume meant the plugin) to rotate or shift a grid of points an arbitrary angle or distance. I suspect I'm not understanding how it works, and haven't been able to get it to work. I create a regular grid of points in QGIS, and ensure that the UTM zone is set correctly for both layer and project, enable editing for the layer, then open the plugin dialog (qgsAffine): ![Affine Transformation dialog](http://i.stack.imgur.com/JU2Zd.png) I select 'whole layer' and then, wanting to rotate the entire field of points by 15°, put 15 in both 'rotation' boxes (which may be where things are going wrong). The operation results in rotating the points somewhere off-planet! Is this the right tool for the job? I would like to rotate a set of points about their common centre, ideally. **Update** : qgsAffine is just a thought; if we can do this in _any_ QGIS tool I'll be happy! **Update 2** : qgsAffine is usable IF you know the right numbers to plug in (see answer below, thanks Mike!). Spreadsheet / calculator works fine, or here's the R function to get the numbers directly:               ## Compute correct affine numbers for qgsAffine plugin     affine <- function(originX, originY, rotAngle) {       A <- rotAngle * pi / 180       scaleX <- scaleY <- cos(A)       rotX <- sin(A)       rotY <- -sin(A)       transX <- originX - cos(A) * originX + sin(A) * originY       transY <- originY - sin(A) * originX - cos(A) * originY       aff <- data.frame(scaleX, scaleY, rotX, rotY, transX, transY)       return(aff)     }      So, to rotate a grid of points in northern Uganda (UTM 36N), `affine(578988, 419210, 30)` gives:                    scaleX    scaleY rotX rotY   transX    transY     1 0.8660254 0.8660254  0.5 -0.5 287174.7 -233330.5      ... which, entered into the qgsAffine dialog, correctly rotates the points.


Why aren't my CartoDB map layers loading?

We have built our own instance of CartoDB on our servers, setup production environtment successfully. We can upload shape files, table and map view works great. When we trying to create visualization with two different data and publish, CartoDB generates a short url. But when we try to access the visualization (sharing) through that short url none of the layer gets displayed on map. The basemap loads fine, but the layers don't appear. I could see the following error message on console.               Failed to load resource: the server responded with a status of 404 (Not Found)  http://cartodb.com/noneuser.html      I really don't know what's wrong, could someone can help me on this? Thanks in advance.


Leaflet - How to display all stacked marker information on a single mouse click

I am using leaflet to view layers from GeoServer. There is a WMS basemap layer and WFS feature layer returning GeoJSON data. When I click on a Marker I use jQuery as the popup. If I click on a stacked set of Markers I would like to display the information from all Markers in my popup somewhat similar to what I would get if I were using a WMS layer and doing a getfeatureinfo query to GeoServer. Right now this code only displays the top most marker.


toggle clustering with map controls

I've made a map with openlayers and have the vector features clustered with a clustering strategy. Now I want my users to be able to toggle this behaviour with a control similar to the layerswitcher. I know the cluster strategy has activate() and deactivate() methods. But how can I combine those with a custom control? here's a jsFiddle with a working clustering example http://jsfiddle.net/BzcAD/5/ many thanks **EDIT:** I tried the sollution proposed below, but somehow adding more strategies to the vector layer forces OL to look for a protocol. I've got no idea how to fix that or to work around. Still looking for a better suggestion. Take a look at: http://jsfiddle.net/BzcAD/6/ If you look at http://www.openlayers.org/dev/examples/strategy-cluster- extended.html there they just throw away everthing and build the complete layer again. I don't like that. The only work around I can think of is setting the clustering threshold one above the number of features on the layer. I'de like to have a layerswitcher style folding menu calles 'options' with a selectbox toggling this clustering behaviour.


Python script to implement a batch import of CAD files into Geodatabase

Please does anyone know where I can get a python script that can do a batch import of CAD files into a Geodatabase. I have one I wrote here, but it is only able to import one CAD file at a time. It imports the CAD files and splits it into feature classes and stores it in the geodatabase via the feature dataset. It works perfectly well but I need to loop the script to search through a given folder for all the cardfiles in it and import them under different feature datasets and put all the datasets into one geodatabase.               # Name: CadtoGeodatabase.py     # Description: Create a feature dataset     # Author: Irene     # Import system modules     import arcpy     from arcpy import env          # Set workspace     env.workspace = "C:/data1"          # Set local variables     input_cad_dataset = C:\Users\iegbulefu\Documents\info\91036c01.dwg" output_gdb_path = "c:/data/cadfile.gdb"     output_dataset_name = "cadresults"     reference_scale = "1500"     spatial_reference = "Nad_1983_10TM"          # Create a FileGDB for the fds     arcpy.CreateFileGDB_management("C:/data1", "cadfile.gdb")          # Execute CreateFeaturedataset      arcpy.CreateFileGDB_management("C:/data", "cadfile.gdb")     arcpy.CADToGeodatabase_conversion(input_cad_dataset, output_gdb_path, output_dataset_name, reference_scale)


arcpy overwrite files in a geodatabase file

I'm writing a python script, I've got an mxd and its workspace is a geodatabase file with all the files I need into. The problem I'm encountering in testing and writing code is that, despite of the command:               arcpy.env.overwriteOutput=True      all the files contained in geodatabase fail to overwrite. There's a way to work around this? many thanks, Annalisa


[R]Function to calculate mean for missing or NA values in a dataframe

I am trying to develop a function that will calculate a mean lat/long for my missing or zeros location (lat/long) data in my dataset. I have locations for many SETS within the same TRIP, which tends to be close in space. However, in many cases, I am missing the location information for some of my SETS. I would like to replace these NAs or Zeros values with the mean lat/long calculated from the remaining SETS within that TRIP.               > head(newdata[,c(3,12,26:27)])#This is my data             TRIP_ID SET_NO SH_LATITUDE SH_LONGITUDE     13365 100020848      3    41.88983    -66.29183     13373 100020848      6    41.93317    -66.29767     13430 100020848     11    42.01200    -66.45217     13442 100020848      7    41.92383    -66.29733     23207 100020848      4    41.94817    -66.29750     24669 100020848      9    41.88300    -66.30567      So for example, SH_LONGITUDE has 17239 SET_NO with missing values from different TRIP_ID.               > look<-newdata[newdata$SH_LONGITUDE==0,]     > dim(look)     [1] 17239   130     > head(table(look$TRIP_ID))          100020997 100021109 100021204 100021306 100021337 100021340              1         2         1         1         2         1       I am a newbie with user-defined functions, but this is what I would like to be able to call for.               replacebymean<-function(dat, x...?) {         if dat[dat$x==0, ] or dat[is.na(dat$x), ]          then "find these NAs/zeros associated TRIP_ID" and                calculate the mean lat/long for each TRIP_ID as                    mean(dat$x[dat$TRIP_ID=="e.g.,100022478"], na.rm=T) and                replace these NAs/zeros by this mean value.     }


How to do a spatial join if QGIS 1.8 keeps crashing?

I am trying to perform a simple spatial join (adding polygon data to points) in QGIS 1.8:   * target vector: points   * join vector: polygons    * take attributes of first located feature   * keep all records When I click on OK, the progress bar goes up to 15%, then about 30 seconds later I get the **(Not Responding)** notice on the dialog box. I found a report of this on the QGIS bug reporting list, but never saw any mention of a resolution. Also, I have run the geometry validation tool on my shapefiles, and all seems fine. Any ideas on what could be doing this, and more importantly, a fix or workaround? Thanks also for all of your great posts... System info:   * Windows 7 64-bit   * Intel i7 quad core   * The data are US Census Bureau TIGER files for counties, and a centroid point layer created for US cities. I just want to append the county data to the centroid layer.


Is it possible to access older Bing imagery in ArcGIS 10

I've been using the Bing basemaps in ArcGIS 10. I'm studying bird ecology and have been overlaying bird GPS locations on to Bing imagery to see where the birds go and what habitats they chose. The Bing imagery has been super clear, however, Bing has just recently updated the imagery for my study location in New Zealand and now the imagery is very dark and almost unusable. I was wondering if there is a way to access previous Bing imagery? I previously downloaded the Bing aerial layer but this has automatically updated to the newer images too. Regards Jim Watts


How to see original versions of imported features with archiving enabled

I recently imported several feature classes into an ArcSDE Oracle database, registered them as versioned, and then enabled archiving. I was under the impression that I would be able to see a historical version of the data as it was when I first turned on archiving. But if I view the historical version as of a minute or two after I enabled archiving, the feature class appears empty. Only once I've made edits to features do they show up in historical versions (and the archive class). How do I view the "original" versions of every feature as it was at the time when I enabled archiving, before any edits. I really thought I would see a "before" and "after" of each feature I edited on the historical version and archive class, not just the "after." Is that only true for features that are created after archiving is enabled? Is there any way to "force" the preexisting features into the archive class?


FeatureClassNameClass.Open() Error, any ideas?

This code works fine on my Windows 7 64 bit machine, but fails on the target machine, Windows Server Standard SP2 64 bit.                public List<string> GetShapeFileFieldNames(string shapeFileDirectory, string shapeFileName)         {             shapeFileName = shapeFileName.ToUpper().Replace(".LYR", ".SHP");                   IWorkspaceName pInShpWorkspaceName = new WorkspaceNameClass() as IWorkspaceName;             pInShpWorkspaceName.PathName = shapeFileDirectory;             pInShpWorkspaceName.WorkspaceFactoryProgID = "esriCore.ShapefileWorkspaceFactory";             IFeatureClassName pFCName = new FeatureClassNameClass() as IFeatureClassName;             IDatasetName pShpDatasetName = pFCName as IDatasetName;             pShpDatasetName.Name = shapeFileName;//this is your input file              pShpDatasetName.WorkspaceName = pInShpWorkspaceName;                  IName sourceName = (IName)pFCName;             IFeatureClass sourceFeatureClass = (IFeatureClass)sourceName.Open(); //HERE IS THE ERROR             IFields sourceFields = sourceFeatureClass.Fields;             return GetFieldNames(sourceFields);         }      Exception from HRESULT 0x80040351 at ESRI.ArcGIS.Geodatabase.FeatureClassNameClass.Open() I converted the HRESULT into decimal, 2147746641, and ran it through Google   * 2147746641 ESRI    * 2147746641 Constants No results.


ArcGIS Server SOC Cannot Connect To Data

I've been successfully publishing services to AGS. SOC is set up to view all the data that is used in published services. All of a sudden, I can no longer publish a service and have recieved the following error. > Possible cause of connection failure: the soc cannot resolve the path to the > data, or the soc account has not been granted read permissions of the data. > In the case of ArcSDE, direct connect may not be configured properly, or the > soc account may not have permission to access the database. These are some things I have noticed:   1. If I drag and drop data into a new map document from an existing successfully published map, it works. If I add that same dataset, but from Catalog, it does not work.   2. All the data from a successfully published map is referenced via a UNC Path and show up as medium warnings when analyzed through the publishing tool. If I add a dataset from Catalog (or Add Data tool) and analyze the map, it indicates that it is not referenced via a UNC path.    3. If I create a map document that contains a dataset (again, dragged and dropped from a successuflly published map) that is UNC referenced and a dataset add through Catalog/Add Data Tool, it will publish but will leave out the dataset that is not UNCed. From the image below, the three layers come from the same GDB. The top layer was dragged and dropped from another map document and will show up in the published service. The bottom layer is the same dataset except it is add to the map through the Add Data tool. This is where the above error is coming from. ![enter image description here](http://i.stack.imgur.com/luAfm.png) All data that is brought in from Catalog/Add Datat tool is no longer UNC referenced. Looks like something broke, any thoughts? Maybe reboot AGS?


Apply polygon's layer style to point layer with a common attribute

I have a polygon layer that is symbolized on a large (200+) number of unique values in a column, and a number of point layers that have values from that column assigned to them. The objective is to visualize points that have a different value in this field than the polygon in which they are observed. I would like to use the same coloring scheme for the points as the polygons without having to manually replicate the style. For extra, bonus difficulty, only an ArcEditor license is available for this particular project.


Does Avenue equivalent of pointPosition exist in ArcGIS 10.2?

There were a couple of awesome methods in Avenue for ArcView:               point=polyline.Along(percentage)     percentage=polyLine.pointPosition(point)      Don't laugh, but one of the reasons I updated to 10 from 9, was new method for Geometry               point=polyline.positionAlongLine (value,{use_percentage})      that is equivalent of 1st Avenue method (wrong name in my opinion anyway). Does equivalent of the 2nd Avenue method exist in 10.2?


combine several polygon objects in one polygon object with geotools (is it possible)?

I have several polygon objects and I need to "merge (or combine or dissolve)" them toghether into one polygon object. With a GIS tool like Quantum GIS, I do this with Geoprocessing option **"Combine selected spatial objects"** and the result is what I expect. But doing programmatically with Java and Geotools library, I'm not able to get this behaviour. To give you an idea, I have two polygons in one layer like this: ![enter image description here](http://i.stack.imgur.com/UcSJs.jpg) Each square is an independent polygon in my shapefile (an independent object with its attributes). Now I want to transform them into one object. I tried with **"union" method of Geometry class** in this way:                   //polygon1 and polygon2 are Polygon objects (the squares in the above image)         Geometry combine = polygon1.union(polygon2);      And this is the result when I visualize the union in the GIS: ![enter image description here](http://i.stack.imgur.com/MOV02.jpg) As you can see, **a line is added between the two figures** (although the union is made succesfully and I have only one entity as I wish). But I want this without the line connecting them!! The polygons are well formed because doing with Quantum GIS the operation is made right so... Anyone know if is it possible? I'm looking for some time and I'm concluding that maybe my approach to achieve this is bad... Bellow is the union achieved with Quantum geoprocessing option "Dissolve": Thank you in advance,


Which topics are essential for a crash course in QGIS?

What topics do you think are essential in a 25-hour "crash course" introduction for Quantum GIS? What topics do you think are nice extras to be included in such a course? Target audience: Zero or rudimentary knowledge in mapping and geospatial software.


Install Qgis-Server on Centos6

I'm trying to install qgis-server on centos6. I followed the instructions on http://hub.qgis.org/projects/quantum-gis/wiki/QGIS_Server_Tutorial, but when I try to 'yum install qgis*' I get 'No package qgis* available'. If I list everything in the elgis-rpm, no qgis-stuff is showing. Can someone please help me! thanks.


Save as Image geotiff from OpenLayers plugin

Now i'm working with the new version of Qgis 2.0 but I have a problem with the OpenLayers plugin. I take a geotiff screenshot of an area in EPSG:3857 and then I load the image.I'd check out the CRS of the image and it is set on EPSG:3857, like the CRS of the project. Then, I reproject it in WGS 84 UTM33 and works so good whit GDAL WARP. After, I had classic "traceback" error (like this one OpenLayers Plugin 'traceback' error) whith python and now, when I take a screenshot, the CRS of the image is set on EPSG:4326 and the GDAL WARP doesn't work anymore. Anyone can tell me how I can resolve this problem? I work on windows XP Riccardo


Is there something like SQLselect from MapInfo in QGIS?

I am a user of MapInfo that will need to adapt increasingly to QGIS. Is there something like "SQL select" in MapInfo which allows me to easily query between two tables or spatial queries? MapInfo SQL Window allows you to link easily and efficiently the data in two tables.


Understand and use user provided file structure

I have at my disposal a folder with data provided to me by a person that knows nothing about GIS. I have the impression that its file structure was generated by some esri desktop product. I have only ArcEngine license, so no desktop product for me to check the data. The folder structure goes like this:               ROOTFOLDER     --DTED1     ----file1.img     ----file1.rrd     --DTED2     --info     ----arc.dir     ----arc0000.dat     ----arc0000.nit     ----arc0001.dat     ----<many other files>     --RASTER_DATA     ----GEOTIFF     ------file2.aux     ------file2.rrd     ------file2.tfw     ------file2.tiff      Is this a form of geodatabase? What programm understands this folder structure? How to use it? Should convert this _programmatically_ to some form of other geodatabase (file or personal) and how? Thanx in advance


Prepare OSM file for PGROUTING use

Well I am new in the GIS World :p well I have a webGIS to realise and I want use OpenStreetMap. well the region I need wasn't vectorised so I modified it with JOSM ( Added Roads and buildings) and now I want use PGROUTING on that space but I don't know how, I have my .OSM file but I don't know what to do next. thank you for helping me.


Correct SQL statement in FME?

I am trying to write SQL statement in WHERE Clause FME in Navigator but it does not work. WHERE Clause:               NAME IN SELECT CONCAT(''$(',SELECT REPLACE ('Roman Ann Jack',' ',','),')'')      This sql code suppose to be NAME IN '$(NAME)' but NAME is actually list of names derived from published parameter defined as Multi Choice Value. I think I have to replace EMPTY CHARACTER between names to comma character and that should be recognizable as list for FME SQL?! I asked this question before, and got answers that this suppose to work in FME2012 or by writing python script. But at the moment I am curious about this sql statement and if it is syntax and logic ok?! Can anyone check if whole or just part               SELECT CONCAT(''$(',SELECT REPLACE ('Roman Ann Jack',' ',','),')'')      is working? Thank you very much


How draw a route in Google Maps as i goes on clicking on Google map

I wanted to get route in google map as i click on ROADMAP of google. I mean by click, I can click one place then other and so on, but route to each click must be generated from previous click. Route must be shortest route from one point to other. I must be able to drag that click point when required and then new route must be generated for last two click. Can any one suggest how i should do this. Note: No marker required. Hope could have express my problem effectively.


export styles to ArcPad 10

i cannot export or add styles to Axf files, to style the Axf file in mobile device. Using the ArcPad Check out Tool from Python, i can save an AXF file without styles because i reference the feature classes from the geodatabase, but i would like to add symbology style to this AXF file, i tried exporting Stylesheet file .Aps , i've added it to an Applet (copy and past Xml text) but it didn't work, when i use the tool "ArcPad Check out" from ArcMap it exports with style inside every layer definition, i would like to know also if there's a manner to set Document (mxd) as Context in ArcPy. Any help plz


How to create a routable road network from Ordnance Survey data?

I've been following the "Beginners Guide to pgRouting" in an attempt to create an in-house application that provides drive-time isochrones. I have a server, postgreSQL and PostGIS and pgRouting - no problem. I have drivers to I can talk to the database from ASP.Net pages - easy again. I've got the data from OS too - imported shapefiles into the database - all easy. Now I've run the bits of code in that article and the first two are easy again (and quick) so I've got my Node table and the road_ext view OK. However the third statement that creates the "Network" table is killing me, or more specifically the server. I have been trying with just the OS Grid tile "SO" which is not the most remote part of the UK by any means but still not going to have anything like as many roads as the London / Birmingham / Manchester area tiles surely. I'm running it on a quad-core box with a decent chunk of RAM, it's been running for 15 hours and not done yet. Box is not doing anything else, it's dedicated to the task. Even a little tile like the tip of Scotland (John O'Groats) took about 3 hours. At this rate I'm looking at over a week to build a network which is ridiculous. Am I doing anything obviously wrong here or is it just going to take that long and I have to deal with it. Ultimately I want to produce these polygons and overlay them on Bing Maps. If I have gone off-course above, could anyone please suggest an alternate dataset like OSM or something that's ready made I can use? Thanks, Michael


How to calculate the UTM-Latitude-band?

I have to convert a coordinate from UTM to MGRS. I think I have the most of it covered, but I have some difficulties to calculate the correct Latitude-band. How can I decide which band the coordinate has?


geoserver sde plugin selected raster catalog generates no statistics error or transformation error

I am using GeoServer 2.3.5 with the ArcSDE plugin (gt-arcsde-9.5.jar). When I select a raster **catalog** from the SDE server, with some catalogs I get: > Could not list layers for this store, an error occurred retrieving them: > ILRISDE.DBO.A_AREA_GRID has no statistics generated (or not all it's rasters > have). Please use sderaster -o stats to create them before use. With other catalogs I also get: > Could not list layers for this store, an error occurred retrieving them: No > transformation available from system "EngineeringCRS[Cartesian 2D]" to > "GeographicCRS[WGS84(DD)]". I have been searching for an answer but I haven't found any. Do anyone knows how to fix these two problems? Many thanks, Carlos.


Geoserver printProvider don't show comment/mapTitle with hebrew fonts

I have a printProvider running on my site.                printProvider = Ext.create('GeoExt.data.MapfishPrintProvider', {             method: "POST",              url: "http://xxxxx/geoserver/pdf",             capabilities: printCapabilities,              customParams: {                 mapTitle: "הדגמה",                 comment: "This is a map printed from GeoExt."             }         });      When I try to print , the comment appears on the PDF but the mapTitle doesn't (hebrew fonts). I there a way to fix it ?


Rename Relationship Class labels

Is there a way to rename relationship class labels (forward and Backward labels) after I've created them ? or I have to delete them and create them again ?


Overlapping transparent polygons won't darken

A client of ours wanted a map showing the 5-mile and 10-mile radius around business locations today and specifically requested that the overlapping transparent buffer radii grow darker with each other buffer they overlap. However, after using the buffer wizard and a buffer creator with the business analyst module, the overlapping buffers simply merge together into one shape (similar to performing a Dissolve on them) or, if an outline for them is created, they simply appear to "stack" on top of each other. This problem did not always occur, does anyone know of a way to cause overlapping transparent polygons to grow more opaque as they overlap? The software is ArcGIS 10.2. I believe the problem, after really thinking about it some more, is getting overlapping buffers from point data created by, for example, Buffer Wizard (which creates several buffers as one single layer), to darken as they overlap each other on a map. If you create each layer individually, then they overlap and darken just fine, but this method is not as reliable.


How to easily remove loose/isolated edges from pgRouting network?

I wondered if there's an easy way to 'clean up' a pgRouting network by removing those edges that do not connect with the global network. Otherwise you risk to end up with cost values of `-1`, meaning there exists no path between the given source and target (pgr_kdijkstra). ![enter image description here](http://i.stack.imgur.com/3FV5R.png) I handled the osm.pbf file with osm2po (v4.8.8) and imported the network into a spatial database with the generated SQL script. * * * Getting back to my question, I found it lacked a bit of context :-) So... I had generated a set of points as the centroids of a polygon layer. Eventually I want to use these centroids as start/end nodes to calculate shortest paths. As these points do not belong to a network, I cannot use them directly for routing. Therefore I searched for the nodes that are closest to the set of centroids by means of `Vector > Analysis Tools > Distance matrix` in QGIS. The problem, however, is that it is possible these 'corresponding' nodes are unreachable from the global network. When calculating shortest paths, they are indicated with a cost of `-1`. As @Carsten noted, commenting out the following line in the config file of **osm2po**               postp.1.class = de.cm.osm2po.plugins.PgVertexWriter      will detect all dead ends or 'dangles'. As such you are able to filter them out from the whole set of nodes. But then, the problem indeed is that if an isolated mini-network consists of more than 1 segment, the vertices in the middle are not filtered out as these vertices are no dead ends. The figure from above represents the 'ideal' situation of an isolated mini-network of 1 segment and thus 2 dead ends. Eliminating those nodes results in eliminating the whole mini-network, which is nice. So in fact, my question should have been _'How to eliminate (or detect) nodes and segments that are not connected to the global network'?_ That requires a little more (post)processing, as it is not incorporated as a preprocessing step which @Carsten also mentions in a related question.


Why orthographic projection has been used in this NatGeo map

I'm wondering why this maps uses orthographic projection, and result is 3 maps to view the whole world, what were the requirments or the reasons to choose this projection (why not mercator ) ? this map maps the plastic distrubution in the oceans ![enter image description here](http://i.stack.imgur.com/NwMr5.jpg)


Issues calculating range with QGIS 2.0 raster calculator

I would like to calculate a simple range using the QGIS 2.0 Raster Calculator, but am getting strange results. I believe I am not using the correct syntax. To get all values between .003-.5, I entered the following: ![enter image description here](http://i.stack.imgur.com/isS2L.png) This resulted in the following raster: ![enter image description here](http://i.stack.imgur.com/tM4xb.png) As I found this result very strange, I decided to check all values above .003: ![enter image description here](http://i.stack.imgur.com/ayfbK.png) This resulted in the following raster, which I believed to make sense. It is simply the inverse of the first without any overlap, meaning I am unable to target all values within my needed range: ![enter image description here](http://i.stack.imgur.com/KxKLq.png) When attempting with AND logic, I got a completely black raster image: ![enter image description here](http://i.stack.imgur.com/FIpl4.png) Now, I've tried to fix the issue by separating the categories completely. The raster is still black. ![enter image description here](http://i.stack.imgur.com/eT9Mt.png) Elevation greater than 5: ![enter image description here](http://i.stack.imgur.com/U16Jz.png) Elevation greater than .03. Note, that I happened to test .03 instead of .003 in this case as opposed to previous screen captures: ![enter image description here](http://i.stack.imgur.com/0oh4d.png) I'm just looking to have the elevation between these two values.


Dealing with custom projections (from prj file) in PostGIS (also GeoServer and OpenLayers)

Basically I want to perform spatial queries like distance calculations in PostGIS using data from shapefiles with different projections, some of which have no SRID code that I can find and also which the python osr package can't seem to handle. What do I do? I have little understanding of projections and how to deal with them. Full story: I'm creating a system using OpenLayers, GeoServer, and PostGIS. My data is from shapefiles that I loaded into PostGIS using shp2psql. Most of the shapefiles didn't have a .prj file associated with them and seem to just be long/lat / EPSG:4326. However for some of the files the coordinates have numbers in the millions which are clearly not degrees (fortunately there were .prj files here). In PostGIS the data appears as a geometry column, not geography. Until now I've been mostly concerned with displaying the data in OpenLayers, so I took care of projection in GeoServer by specifying an EPSG code when I added a new layer. Usually this was 4326, once it was a standard code I found using http://www.prj2epsg.org/search, and once I created a custom projection by adding the WKT to the epsg.properties files in the data directory. Everything seems to display fine in OpenLayers then; it's hard to be sure since I don't know the data personally but it looks like it all lines up. I haven't had to write any code on the client side (OpenLayers) relating to projections, everything is in terms of longitude and latitude and very easy. Now, suppose I specify in the client (e.g. by clicking on the OpenLayers map) the coordinates of a point using longitude and latitude, and a distance such as 100 km, and I want to display all the features from a certain layer that are within said distance from said point. So, in PostGIS I'd like to say something like:               SELECT gid, geom     FROM layer     WHERE ST_Distance(geom, ST_GeomFromText('POINT(24 -30)')) < 100000;      Right now this returns everything (for most layers) since the geom column is a geometry type instead of geography. As far as I can see, I need to turn everything into a geography type, transforming into the EPSG:4326 where necessary. Then I should just be able to declare everything in GeoServer as EPSG:4326 and no longer worry about anything there, and ST_Distance should return results in metres calculated on the spheroid. But for some of my data I can't see how to do this. For example, here is the text from the .prj file for one of the layers:               PROJCS["SA Albers Equal Area",GEOGCS["GCS_Hartebeesthoek_1994",DATUM["D_Hartebeesthoek_1994",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Albers"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",24.0],PARAMETER["Standard_Parallel_1",-24.0],PARAMETER["Standard_Parallel_2",-33.0],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]      This is a projection for South Africa, and none of the results from http://www.prj2epsg.org/search look relevant. So I want to define it as a custom projection in PostGIS. As far as I understand I can't use WKT for this and need the parameters to be expressed in proj4. I tried running it through this python script seen around here:               #!/usr/bin/env python          import osr     import sys          def main(prj_file):         prj_text = open(prj_file, 'r').read()         srs = osr.SpatialReference()         if srs.ImportFromWkt(prj_text):             raise ValueError("Error importing PRJ information from: %s" % prj_file)         print srs.ExportToProj4()         #print srs.ExportToWkt()          if __name__=="__main__":         main(sys.argv[1])      and I got the following:               ERROR 6: No translation for Albers to PROJ.4 format is known.      Now I don't know how to proceed. I'd also like confirmation that my reasoning about everything else I've mentioned is sensible.


Paleoclimatology Data

I have been looking for paleoclimatology data. I have found some with NOAA ( http://www.ncdc.noaa.gov/paleo/data.html ) but all the data is stored as a KMZ and a series of linking text and html files. Does anyone know of vendors or sites that have this type of data in a better spatial format? I am most interested in data around the Great Lakes. Thanks...


Splitting existing polygons with existing polylines(roads) with GME tool "split polygon by lines"

After reading through many of these articles i believe the GME tool "split polygon by lines" should be useful to my problem. I have a polygon that needs to be split by a road layer. When i run this tool i there isnt a split. All there is an extra field saying "ID" but not split. I did manually create a polyline and this polyline did split the polygon. Not all of the polygons will be split when i run the tool. I have a limited ArcGIS 10 license and QGIS 2.4 as well but i thought that this tool was good for what i was after. ![polyline overlapping polygon](http://i.stack.imgur.com/jVI2j.jpg)


How can i use MapServer service using arcgis api for silverlight?

Is it possible to use a service published from MapServer using ArcGis api for Silverlight ? for exemple :               <esri:FeatureLayer ID="Schools Without Attendance Areas"                                     MouseEnter="FeatureLayer_MouseEnter"                                    MouseLeave="FeatureLayer_MouseLeave"                                    Visible="False"                                    Url="http://webaddress"                                    OutFields="SCHNAME, ADDRESS, PHONE, URL"/>


arcgis flex widget close a window and open another window with datagrid

I uses Arcgis api for flex 3.6 and adobe flash builder 4.6. I want to develop a widget use a window (say window 1) to allow user to input searching criteria, after click "Ok", window 1 should close and another window (say window 2) should open, in window 2 display the searching results (based on window 1 user input searching criteria) in a datagrid. I wonder whether this possible to be?


Automatic Lineament Extraction from satellite images using ENVI?

Can you tell me the steps of automatic lineament extraction from satellite images? Can ENVI perform edge detection and the lineament extraction?


Estimate forest stand height from Landsat imagery?

Is it possible to estimate the height of forest stands using optical (preferably Landsat) imagery? I came across this article while researching this, but it's over 20 years old and there doesn't appear to be much in the way of more recent literature. Can spectral responses be used for deriving forest structural characteristics, or is this asking too much of the data? There is some information on combining LIDAR data and optical imagery, which makes sense, but I'm looking for an approach that can be applied at a broader scale without a huge cost.


Radius of Curvature Python/Arc, how access x,y coordinates

I have a polyline in ArcMap 10 and I am able to script the length of the line in Python using this bit of code:               #Calculate Radius of Curvature     #try:     # Import system modules     import sys, string, os, arcpy, math, shutil          #Set Environment Workspace     arcpy.env.workspace = "C:\data\ColRiver\ColRiver.gdb"          # Create search cursor     rows = arcpy.SearchCursor("c:\data\ColRiver\Colriver.gdb\ColumbiaRiverPolygon")          # Calculate the total length along the flowline     length = 0          shapeName = arcpy.Describe("ColumbiaRiverPolygon").shapeFieldName          for row in rows:         # Create the geometry object         feat = row.getValue(shapeName)         length = length + feat.length          # Print the total length of flowline     print length      Now, I know that to get the radius of curvature for the line I will have to divide the total length by the straight line distance of the start point and end point. I understand that the way to get distance would be:               ((x2-x1)^2 + (y2-y1)^2)^0.5      What I am unsure of is how to automate getting the start point and end point coordinates of x1, y1 and x2, y2 in order to get this straight line or euclidean distance. I plan to implement part of the code in a tool/script for ArcMap and don't want to have to type in the coordinates every single time. Any suggestions for a Python newbie?


Bottom half of javascript web map application missing

![enter image description here](http://i.stack.imgur.com/ycFzK.jpg)Having an issue where the bottom half of a javascript web application is missing. I have checked the ArcGIS map services and they are functioning properly. I'm not a JS developer and am not sure what the issue could be. Any suggestion on what the cause could be? I've attached a screenshot of the application where you can see the bottom half missing.


What is the cause of 'tearing' of polygons (artifacts) using R, ggplot and geom_polygon?

Thanks to the answer given in this question I have been able to subset and draw a map of electoral divisions in part of the UK, in this case Pembrokeshire. The resulting data frame is large and contains Ordnance Survey data so it would be difficult to post here, but the data frame looks like this:               > str(bar)     'data.frame':   134609 obs. of  7 variables:      $ long : num  214206 214203 214202 214198 214187 ...      $ lat  : num  207320 207333 207339 207347 207357 ...      $ order: int  1 2 3 4 5 6 7 8 9 10 ...      $ hole : logi  FALSE FALSE FALSE FALSE FALSE FALSE ...      $ piece: Factor w/ 12 levels "1","2","3","4",..: 1 1 1 1 1 1 1 1 1 1 ...      $ group: Factor w/ 82 levels "Amroth ED.1",..: 1 1 1 1 1 1 1 1 1 1 ...      $ id   : chr  "Amroth ED" "Amroth ED" "Amroth ED" "Amroth ED" ...      I fed the resulting data frame to `ggplot` using the following code:               ggplot(bar, aes(x = long, y = lat, group = group)) +       geom_polygon(colour = "black", fill = "grey50")      This generates the following image, which looks nice and clean. ![map of electoral divisions](http://i.stack.imgur.com/kvF5G.png) Then I combined this with a data frame containing population data, which looks like this:               > str(mydf)     'data.frame':   60 obs. of  22 variables:      $ ward.code  : chr  "00NSPH" "00NSPJ" "00NSPK" "00NSPL" ...      $ id         : chr  "Amroth ED" "Burton ED" "Camrose ED" "Carew ED" ...      $ la         : chr  "Pembrokeshire" "Pembrokeshire" "Pembrokeshire" "Pembrokeshire" ...      $ total      : num  1237 1737 2458 1570 1976 ...      $ age.0.4    : num  34 86 81 92 107 76 131 77 90 95 ...      $ age.5.9    : num  45 93 83 80 138 82 111 85 132 75 ...      $ age.10.14  : num  65 116 123 103 111 79 151 80 135 83 ...      $ age.15.19  : num  69 90 161 126 117 93 150 87 139 103 ...      $ age.20.24  : num  42 63 116 58 81 63 120 58 114 79 ...      $ age.25.29  : num  46 63 73 60 86 56 90 51 108 67 ...      $ age.30.34  : num  38 60 87 72 99 54 115 62 76 42 ...      $ age.35.39  : num  53 105 104 82 110 81 91 76 121 82 ...      $ age.40.44  : num  70 142 128 107 116 88 161 89 151 92 ...      $ age.45.49  : num  71 138 172 122 128 109 192 116 190 104 ...      $ age.50.54  : num  93 136 204 108 133 119 168 125 174 99 ...      $ age.55.59  : num  126 129 235 125 149 108 179 137 175 106 ...      $ age.60.64  : num  139 162 248 170 194 129 236 183 199 136 ...      $ age.65.69  : num  110 110 205 95 129 143 172 128 167 130 ...      $ age.70.74  : num  81 85 174 52 100 75 110 88 113 128 ...      $ age.75.79  : num  78 54 130 58 74 70 72 68 119 114 ...      $ age.80.84  : num  38 50 84 33 56 43 63 42 94 62 ...      $ age.85.plus: num  39 55 50 27 48 42 36 55 85 84 ...      ...using the following code:               foo <- merge(mydf, bar)      and plotted the result like this:               ggplot(foo, aes(x = long, y = lat, group = group)) +         geom_polygon(colour = "black", fill = "grey50")      The problem is that the resulting plot has artifacts as shown in the image below: ![map with artifacts](http://i.stack.imgur.com/qVG5w.png) So, the original data frame subset from the shapefile is fine, but the merged data file has 'issues'. Q. What might be the cause of this kind of artifact? I understand that without the full code and data this is guesswork and I apologise in advance for this but the object is very large and there may also be redistribution issues. Any hints, pointers, suggestions as to where to start looking would be appreciated.


Unable to render layers in MapCanvas using PyQGIS/PyQt4

I am trying to get some layers into a MapCanvas and style them. I am following the PyQgis Cookbook info here but my code is just not working. I've been spinning my wheels on this for over a week now and there's no one in my office familiar enough with python/qgis. What am I missing???               QgsMapLayerRegistry.instance().addMapLayer(layer1)     canvas1.setExtent(layer1.extent())     canvas1.setLayerSet( [QgsMapCanvasLayer(layer1)] )     Traceback (most recent call last):     File "<input>", line 1, in <module>     NameError: name 'QgsMapCanvasLayer' is not defined      In R you just do this:               library(rgdal)     nta <- readOGR("my/path", "mylayer")     spplot(nta)     library(sp)     spplot(nta, zcol="symbolAttributes")      Please, any guidance is much appreciated.


GDAL polygonize only certain raster values

I want to polygonize a raster file with GDAL. I only want to rasterize cells with a value of 0. Is it possible to specify that within the polygonize function or do I have to modify my raster before hand?


Using Python Add-In to delete/remove ArcMap layers that are turned off?

I have made a python addin button which removes layers that are turned off in an MXD. The strange thing is that I get different results depending on whether I run the python commands in the python window vs my actual addin button. In my addin class, the code looks like this:               def onClick(self):             mxd = arcpy.mapping.MapDocument("CURRENT")             layerList = arcpy.mapping.ListLayers(mxd)             for layer in layerList:                 if layer.visible == False:                     arcpy.Delete_management(layer)             arcpy.RefreshTOC()      So, this works fine in the python window but doesn't do anything in the button. I assume because it's trying to delete a layer object instead of the name. I have made a workaround which changes the following line:               arcpy.Delete_management(layer.name)      Now this actually works. But there is a caveat, if I have multiple layers with the same name but different visibility settings, it may delete the one that is visible. My second workaround is to change the layer name before I delete it. My final code looks like this:               def onClick(self):             mxd = arcpy.mapping.MapDocument("CURRENT")             layerList = arcpy.mapping.ListLayers(mxd)             for layer in layerList:                 if layer.visible == False:                     layer.name += '_'                     arcpy.Delete_management(layer.name)             arcpy.RefreshTOC()       By changing the name of the layer, I'm ensuring that I only delete invisible layers. But I'm wondering if this is the best way to go about doing this. My question is, is there a better way to remove layers that are not visible from an MXD? Especially when they have the same name?


What coordinate system is this?

I just found a dataset of trees in San Francisco, but I'm unable to determine the system used for the coordinates. Here are some samples:               5998894.045593,2119007.035323     6018697.2048701001,2097076.1109207      Does this look familiar to anyone?


Batch clip feature class to preserve area field

I have a large land cover map in a geodatabase, that I want to batch clip by defined catchments (about 63 polygons). The output files are named based on a field in the "clipper" (sys.argv[2]) called Watershed (currently a hard coded portion of my script). The script below works if I run it on a shapefile, and point the outputs to an empty folder.   Ideally, I want to run this on a feature class, and point the outputs to a geodatabase using ArcMap9.3, however, I get the following error code: 000210: Cannot create output . Does anyone have any suggestions? I have full permissions on my machine, and path directories are correct, so I'm not sure why I'm getting this particular error.               # Parameter list for ArcToolbox     #                                   Parameter Properties     #           Display Name            Data type           Type        Direction   MultiValue     #   argv[1] Output workspace        Workspace           Required    Input       No     #   argv[2] Layer used to Clip      Feature Class       Required    Input       No     #   argv[3] Layer to be clipped     Feature Class       Required    Input       No     #   argv[4] prefix for file name    String          Required    Input       No     #-----------------------------------------------------------------------------          #Import system modules     import sys     import string     import os     import arcgisscripting          # Create the Geoprocessor object     gp = arcgisscripting.create(9.3)          # Load required toolboxes...     gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Analysis Tools.tbx")          # Designate a workspace for cliped vector data     gp.workspace = sys.argv[1]          # Assign variables to be processed...     clipper = sys.argv[2] # feature used to clip vector data     vector = sys.argv[3] # vector data to be clipped and then rasterized     suffix = sys.argv[4] # file naming convention prefix          # Search cursor sequence...     rows = gp.SearchCursor(clipper)     row = rows.Next()     feat = row.Shape # used as the clip_features in the Clip_analysis (clipper input must have a field called "Index_Key", which is used as the file name of each output)     while row:         n = str(row.Watershed) # assign a variable for the processing message based on a field         print "clipping to: " +n # tells you what grid was clipped         # Clip_analysis <in_features> <clip_features> <out_feature_class> {cluster_tolerance}         gp.Clip_analysis(vector, feat, str(row.Watershed)+"_"+str(suffix)+".shp", "") #update str if necessary         row=rows.next()          # reset the array...     del rows     del gp


How to make same installation on multiple machines?

What is the easy way to make the "same" Qgis installation (same menu, same plugins, same prefs...) on multi-PCs, 10 or 12 laptops ?   thanks for your help.


ArcGIS standalone application deployment

I'm trying to build a deployment for a ArcGIS standalone application. I'm using ArcGIS 10 Engine controls in a WPF application with desktop and spatial analysis license. I'm using classes that only belong to desktop (IGxDialog, ...) and also engine controls (AxTOCControl, AxMapControl, ...) I followed the example of ESRI for creating deployment for engine applications The problem is installing runtime is not enough, but if i install the application on a pc that include an installation of ArcGIS desktop it works fine. Now I need to build a complete installation that includes both desktop and engine DLLs without installing ArcGIS desktop, and I don't know how that can be accomplished any suggestions???


Geoserver proxying custom tiles through a WMS

I have a set of tiles that I was given via disk (So no way to recreate them, they are already generated/cached). There is a clear pattern/style to the naming of the tiles (zoomLevel-x-y.gif). The bounds are actually configured the same way that "Google" organizes their tiles(from top left, not bottom- left. ugh). More information on this specific format and how I request them in OpenLayers can be found http://trac.osgeo.org/openlayers/wiki/UsingCustomTiles My question comes into play as I want to provide these tiles via Geoserver. I have a client who is only able to access data and layers via wms calls (don't ask). The file system fetching that openlayers uses won't work for him (as well as being able to use a top-left origin instead of bottom-right). So, from my limited knowledge of geoserver, it seems like it should be able to front these tiles to the users via a WMS server, where it takes the request, translates it to a file path/url, and goes from there. Sort of a proxy functionality. Am I completly off base here? And if not, how can I even start to go about this? **edited for clarity, and a bit more background information** Thanks!


Read GeoTIFF file with php or javascript

Sorry, I am newbie with GeoTIFF files. I want to create a project that a person upload a GeoTIFF file and the web application save the long and lat of the picture in to database, the server side programming based on php and the database is MySQL. is there any library or way to read and extract information of a GeoTIFF picture with php or javascript? Thank you so much for your attention.


problem in raster data with arcmap 10

I have a problem when trying to load raster data (a TIF) in ArcMap. ArcMap 10 instantly shuts down and the well known window appears "ArcGis Desktop has encountered a serious application error and is unable to continue.Does anyone know why? What is the solution? i have windows 7 32 bit,1giga video card . Thank you,


How to calculate zones in multipart polygon feature

I was wondering how you can give each zone a value based on how many overlaps there are from a multipart polygon feature. See the picture. If the circles don't overlap I would like the area to have an attribute of, eg P1, and if there are two circles that overlap I would like it to have the attribute P2 and so on... ![http://postimage.org/image/dt6pmvtdx/](http://i.stack.imgur.com/nAqtO.jpg)


Find pseudo nodes in free GIS software

Software gvSIG OA Digital Edition 2010 have tools topology for finding pseudo nodes in linear geometry. I set cluster tolerance 0.00002 and maximum number of errors -10000 for 20000 link count linear geometry. But unsuccessful result. Are there any solutions that find pseudo nodes in free GIS software? I need to layer pseudo nodes (one solution to this problem - to use tools topology of ArcInfo, but priority for me is to use free software). Linear geometry created several users in QGIS 1.8.0 in PostGIS (v. 2.0.1) database. Add new image: 12 linear features with three pseudo nodes in A (line 4/5), B (line 6/7), C (line 9/10). Pseudo nodes should be points instead - two linear features with intersection in one point (node) should be one linear feature (line 4/5 - line 4, ...). Thanks for the help. Is it possible to make a request in PostGIS, which will result in a layer of pseudo nodes? Add new image of examples pseudo nodes: if I receive for linear layer point layer pseudo nodes (blue rects) I corrected following errors in linear layer: A - add missing geometry, B - snapped line in intersection, C - remove pseudo node. Thanks! ![enter image description here](http://i.stack.imgur.com/U4y4g.jpg) ![enter image description here](http://i.stack.imgur.com/oXSl7.jpg) ![enter image description here](http://i.stack.imgur.com/6A0Po.jpg) **Updated 07.12.2012** Q: Is it possible to make a request in PostGIS, which will result in a layer of pseudo nodes? A: see answer from _Peter Krauss_ **Updated 26.07.2013** Added answer about Topology Checker plugin for QGIS 1.9.0 (2.0)


Setting toolbar server control currenttool to none with ArcObjects and ArcGIS Server?

I am only using the map control and two toolbars on a custom webadf application. One toolbar contains the standard map navigation controls. The other toolbar is only one toolitem which references a class in app_code: Here is the markup:                <div>                     <esri:Toolbar ID="tbSelectParcelToolBar" runat="server" Height="36px" Width="155px" BuddyControlType="Map" Group="tbSelectParcelToolBar_Group" ToolbarItemDefaultStyle-BackColor="White" ToolbarItemDefaultStyle-Font-Names="Verdana" ToolbarItemDisabledStyle-BackColor="White" ToolbarItemDisabledStyle-Font-Names="Verdana" ToolbarItemDisabledStyle-ForeColor="Gray" ToolbarItemHoverStyle-BackColor="White" ToolbarItemHoverStyle-Font-Bold="True" ToolbarItemHoverStyle-Font-Italic="False" ToolbarItemHoverStyle-Font-Names="Verdana" ToolbarItemSelectedStyle-BackColor="White" ToolbarItemSelectedStyle-Font-Bold="True" ToolbarItemSelectedStyle-Font-Names="Verdana" WebResourceLocation="/aspnet_client/ESRI/WebADF/" TextPosition="Right" CssClass="tbSelectParcelToolBar" ToolbarItemDefaultStyle-CssClass="tbSelectParcelToolBar" ToolbarItemDefaultStyle-Font-Overline="False" ToolbarItemHoverStyle-CssClass="tbSelectParcelToolBar" ToolbarItemSelectedStyle-CssClass="tbSelectParcelToolBar" ToolbarItemDefaultStyle-Font-Bold="True" Alignment="Left" ToolbarItemDefaultStyle-Font-Size="10pt" ToolbarItemDisabledStyle-Font-Size="10pt" ToolbarItemHoverStyle-Font-Size="10pt" ToolbarItemSelectedStyle-Font-Size="10pt">                         <ToolbarItems>                             <esri:Tool ClientAction="Point" DefaultImage="~/images/SelectParcel_ButtonDefault.gif" JavaScriptFile="" Name="SelectParcel" ServerActionAssembly="App_Code" ServerActionClass="SelectParcel" Text="Select Parcel"/>                         </ToolbarItems>                         <BuddyControls>                             <esri:BuddyControl Name="CCSDemoltionTrackerEditMap" />                         </BuddyControls>                     </esri:Toolbar>      After I use my tool once I want to set the current tool back to "MapPan" The code below does select the Pan tool but on the client my select tool is still the cursor and the current active tool. What am I missing here??                          ESRI.ArcGIS.ADF.Web.UI.WebControls.Map adfMap = CCSDemoltionTrackerEditMap;                  string newCurrentTool = "MapPan";             adfToolbar.Focus();             adfToolbar.CurrentTool = newCurrentTool;                  ESRI.ArcGIS.ADF.Web.UI.WebControls.ToolbarItem toolbarItem;              toolbarItem = adfToolbar.ToolbarItems.Find(adfToolbar.CurrentTool);                  ESRI.ArcGIS.ADF.Web.UI.WebControls.Tool currentTool;             currentTool = toolbarItem as ESRI.ArcGIS.ADF.Web.UI.WebControls.Tool;                  // Set Map Current tool - server             ESRI.ArcGIS.ADF.Web.UI.WebControls.MapToolItem mapToolItem;             mapToolItem = adfMap.ToolItems.Find(adfToolbar.CurrentTool) as ESRI.ArcGIS.ADF.Web.UI.WebControls.MapToolItem;                  adfMap.CurrentToolItem = mapToolItem;                  // Set current tool on the client (sync toolbar and map controls in browser)                  string setActiveToolScript = string.Format(@"          // Set toolbar current tool - client          var toolbar = Toolbars['{0}'];          var currentToolField = $get(toolbar.currentToolField);          currentToolField.value = '{1}';          toolbar.selectTool();          toolbar.refreshGroup();                    // Set map current tool - server          var clientAction = toolbar.items['{1}'].clientAction;          var clientFunction = clientAction + ""('{2}', '{1}', {3}, '{4}')"";              eval(clientFunction);          ",                       adfToolbar.ClientID,                  currentTool.Name,                  adfMap.ClientID,                  currentTool.ShowLoading.ToString().ToLower(),                  currentTool.Cursor);                  ESRI.ArcGIS.ADF.Web.UI.WebControls.CallbackResult cr;             cr = ESRI.ArcGIS.ADF.Web.UI.WebControls.CallbackResult.CreateJavaScript(setActiveToolScript);


create relationship class with stand alone python script

I have created a relationship class in arc catalog using the same arguments I'm using below, however if I try and create it using the script below I get: > arcgisscripting.ExecuteError: ERROR 000622: Failed to execute (Create > Relationship Class). Parameters are not valid. ERROR 000628: Cannot set > input into parameter attributed. Following is the script I'm using:               import arcpy     from arcpy import env          env.workspace = "C:\a.gdb"          origin_table = "a.gdb\Trail_meta"     destination_table = "a.gdb\trails_mfg"     out_relationship_class = "a.gdb\t3meta"     relationship_type = "SIMPLE"     forward_label = "Attributes from meta"     backward_label = "Attributes from trail"     message_direction = "NONE"     cardinality = "ONE_TO_MANY"     attributed = "NONE"     origin_primary_key = "OBJECTID"     origin_foreign_key = "TRAIL_NAME"          arcpy.CreateRelationshipClass_management(origin_table,destination_table,out_relationship_class,forward_label,backward_label,message_direction,cardinality,attributed,origin_primary_key,origin_foreign_key)


Exporting a Featureclass to Shapefile with field names changed.

I have some annotation feature classes stored in a Pgdb.I want to export them to a shape file.Some field name need too be changed in that shape file.I am using vb .net to do this.Any help is appreciated.


The field cannot be deleted because it is being used as a relationship key.

I want to delete some fields of `featureclasses`, but when I run the code `FeatureClass.DeleteField(Field)` it works well for some `featureclasses` but after some time it gives an error such as: > **The field cannot be deleted because it is being used as a relationship > key.** Please give me any help or advice.


CSV rows to Polyline with OGR

I'm not sure if I can complete this operation in one step - but someone might be able to help me. My input file is a csv file with **PointID** , **x** , **y** , **z** and **LineID** columns. I'm looking to combine all rows with the same LineID into Polyline25D using OGR2OGR with a virtual datasource (VRT file). I can get a MultiPoint output, but can't work out how to combine multiple rows (if it's at all possible). Alternatively, could someone help me with a python script to combine the **x** , **y** , **z** fields into WKT? Cheers Input Example : pointid y x z lineid   1 320589.01 1815258.73 423.78 1   2 320573.49 1815256.71 425.04 1   3 320557.42 1815252.40 425.86 1   4 320541.64 1815248.71 426.19 1   5 320529.37 1815247.01 427.18 1   1 320588.78 1815259.35 423.43 2   2 320573.06 1815257.09 424.66 2   3 320557.00 1815253.09 425.06 2   4 320541.79 1815249.54 425.78 2   5 320529.14 1815247.74 426.22 2   6 320516.78 1815245.02 426.84 2   1 320588.62 1815260.10 423.44 3   2 320572.59 1815258.42 424.65 3   3 320556.21 1815255.29 425.13 3   4 320540.73 1815252.19 425.80 3   5 320529.02 1815248.37 426.20 3


How to convert the file with projections in meters to Lat-Long in QGIS ar Erdas Imagine?

I have file in Lambert Conformal comic formate for the data of Australia, Its cordinates are in meters. I want to convert it into the Lat-Long system. Which Projection, Spheroid and Datum I should be using if I want to convert the projections in QGIS or Erdas Imagine? The current Specification of the file is as follow: Projection: Lambert Conformal Conic Spheroid: GRS 1980 Datum: GDA94-ICSM Map Units: Meters Many Thanks in Advance for the Answer.


Setup of development environment of QGIS on windows with qt creator

Can anyone help me in setting up environment for working on QGIS on windows using qt-creator? I am using qt creator version 1.3.1,qt version 4.6 and QGIS version 1.8. Thanks.


How to limit a specific area in order to have a topographic 3D map using MatLab?

I am using `MatLab`, I want to build a topographic 3D map, I am following this guide, I have been doing the steps listed on the section **Draping Geoid Heights over Topography** , and I do not have any trouble getting the expected result, it looks like this.                                ![I have this](http://i.stack.imgur.com/pQeQN.gif) Now, my trouble is that I want to have a specific area, just a country not the whole world... How can I limit a specific area using coordinates in order to have a topographic 3D map that looks like this one.                                ![expected result](http://i.stack.imgur.com/FbgoG.gif) * * *


About Interpolation Method using GIS10?

I have attached my stream network where the green dots shows the location with discharge gage now I want to create a raster all along the stream network to have a discharge data all along the river. Which Interpolation will be better. I have tried with IDW method but it's not working well. Please provide me some suggestion. ![enter image description here](http://i.stack.imgur.com/Bmlsu.jpg)


Printing to PDF in Arcmap

When clicking Print > Adobe PDF the filesize is nice and small but the legend gets messed up. Does anyone know how to fix this. Note: I am aware of the Export > PDF and of the reduce DPI and Re-sampling sizes.


Feature Access ArcGIS 10.1 Registered Database Publishing Error

I created a feature class from an XY table in ArcCatalog, and I am trying to publish a feature access enabled map to my server. When I try, I keep getting a 00090 error which is "feature service requires a registered database". I registered my database using server manager by creating a .sde file with a python script, and the table and shapefile are in my enterprise geodatabase (created and enabled with the tool in ArcGIS). The database validates on the server manager page. I have an ArcGIS server (10.1 SP1) running on a Microsoft 2012 Datacenter Edition Server. I am using MSSQL 2012 enterprise editionand trying to publish with ArcMap 10.1. I am very new to ArcGIS, so I may be forgetting/overlooking something silly, but any help would be greatly appreciated. I tried ArcGIS Server Error: "Feature service requires a registered database".


Zip + 4 Centroids

I have a data set with ZIP +4 codes, and ideally, I'd like to map them (their centroids) as points. I'm not interested in their boundaries (since they're not really geographies anyway). Does anyone know of a resource that has point data for ZIP + 4s? Or might there be a better way to go about mapping this type of data? Thanks in advance!


Using GDAL to connect to a WFS

I'm trying to connect to a wfs using GDAL, from reading some of the (fairly sparse) documentation on this i have found that this is possible if GDAL is compiled with the correct drivers (Curl, Xerces). I have compiled GDAL against both of these and have a working WFS Service to connect to. From reading the documentation it says this is how the connection should be opened.               GDALDataset  *poDataset;          GDALAllRegister();          poDataset = (GDALDataset *) GDALOpen( pszFilename, GA_ReadOnly );      I have done this and replaced pszFilename with a URL to my WFS which didnt work and gave the error (and i have no idea what file.dat is referring to as all im doing here is entering a URL that should return some XML):               ERROR 4: `/vsimem/http_1/file.dat' not recognised as a supported file format.     ERROR 4: Failed to create temporary file:/tmp/file.dat        alternatively it says that you could use an XML File that contains the URL like this:               <OGRWFSDataSource>         <URL>http://path/to/WFS/service[?OPTIONAL_PARAMETER1=VALUE[&OPTIONNAL_PARAMETER2=VALUE]]</URL>     </OGRWFSDataSource>      I have made this XML file and put in my URL for the WFS im trying to connect to and i get this error even though the documentation says that reading the url from XML is supported:               ERROR 4: `:/Resources/WFS.xml' does not exist in the file system,     and is not recognised as a supported dataset name.      Im wondering if anyone knows how to connect to a WFS using GDAL because as far as documentation goes this is about all its says in the way of how to connect and goes into no detail about supported file formats or how to connect to any of these. Any help would be appreciated (oh and btw my WFS is working because if i type the URL into my web browser i get the XML (or is it GML?) in the web browser for the request i send (a GetCapabilities one))


Using Regression Trees in ArcGIS

Hi I have a follow up question to this post: Statistical analyses for survey against raster? I have a very similar problem as the initial poster David. I am creating a multivariate model from raster data in order to predict a response variable. In my case I am using soil and climatic data to predict crop yields. I independently came to a very similar conclusion as the answer posted by Aaron, to use zonal stats, export to R, and create a Random Forest model. However, I am now stuck because I want to create a raster in ArcGIS of my predicted yields based on the input rasters but I can't figure out how to translate the output from R to Arc. In R I used this code:               library(randomForest)     fit <- randomForest(Yield ~ .,   data=data)     print(fit) # view results      importance(fit) # importance of each predictor     plot(predict(fit))      The output a plot that reasonably predicts yield. What I want to do is take the Random Forest model and use rasters of my predictor variables (e.g. slope) from a new location, and predict the yields for the new location. I understand how this works with simple linear regression but I can't wrap my head around how to do this with Random Forests. What equation does RF use to make the prediction plot? How can I get that equation and its coefficients from R to make a new map in Arc? Thanks for any help in advance.


How to edit (particularly flip direction of) polyline obtained through UpdateCursor?

I want to flip the direction of a polyline feature obtained as a result of an Update query; e.g.               lines= arcpy.UpdateCursor(myFeatureClass,myQuery)     dsc= arcpy.Describe(myFeatureClass)     try:         for ln in lines:             # ? Check number of parts             # ? Flip direction of each, or some of the parts             lines.updateRow(ln)     except:         print "Error:", sys.exc_info()[0]     finally:         # releasing locks         if lines: del lines         if ln: del ln      BTW, any better way to know how many rows are returned than counting them?


How many polygons under a point (ArcGIS solution preferred)

Opposite of Point in Poly. How many polygons underneath a point. I have a point layer with many points. I have a polygon layer with many polygons. I need to add an attribute to the points that states how many of the polygons it is in That is something like Point 1 18 polygons Point 2 10 polygons.


Continuous Polyline Network between two cities

I'm a relatively new user using ArcGIS 10.1 (ArcMap). I wish to construct all the rail lines between New York and San Francisco. I have all the rail lines as poly-lines that span the entire country, and the co-ordinates of the two cities. And I wish to only select those polylines that will give me a continuous network between NY and SFO. For example, if the line goes from NY to Detroit, and another from Detroit to Chicago and another from Chicago to SFO, then I wish to select that route. But if it goes from New Orleans to Austin, then I don't want it. I can't really use the "Select by Attributes" option since the attributes table doesn't have any information other than the ID and Shape. Thanks for your help!


Feature Tolerances and Loading Data

Keeping data consistent and spatially accurate is obviously important. My task on hand would be converting my current data into the Local Government Information Model (LGIM). However, upper management and myself have the concern that feature tolerances may be an issue when loading data from one feature class within a geodatabase to a new feature class within that file geodatabase. My workflow would look something like this:   1. Import empty LGIM Feature classes into current file geodatabase.   2. Load into corresponding empty LGIM feature classes data from current feature classes. Pretty simple? However, I am working with utilities data. A current feature class contains every point feature (manholes, points of connection, pump stations etc). LGIM separates these different types of point features. So the new workflow would look like this:   1. Separate current feature classes within the geodatabase.   2. Import empty LGIM Feature classes into current file geodatabase.   3. Load into corresponding empty LGIM feature classes data from current feature classes. How will my data be affected in terms of spatial accuracy and how does feature tolerance play a role in any of the workflow steps? If I end up continuing with this workflow, will my topology get messed up?


Does the NED use geocentric or geodetic latitude?

What kind of latitude does the National Elevation Dataset (NED) use? Geocentric or geodetic or something else? I can't find the information anywhere on their site (http://ned.usgs.gov/index.html) or in the documentation that comes with the data I downloaded. I'm new to GIS. If latitude type is unspecified, is there a standard default assumption?


Where should I create my network dataset in ArcGIS?

I want to create a new network dataset from a street layer. Should I create it in a normal file or in a personal geodatabase?