Iterate through each county in a shapefile, select the county and make a second selection by location - modelbuilder

The goal of my project is to create a table with two fields. The first field showing a county name and the second field listing every county that touches the boarder of the county listed in the first field. I am attempting to do this in ModelBuilder or Python. In ModelBuilder, I use the Iterate Feature Selection Iterator to select each county in the shapefile. This creates two outputs, Value and Selected Features. I then use the Selected Features output to make my Select by Location. Next, I use the model only tool Get Field Value. The hope is that this will get the field values of the NAME field in my attribute table for all of the selected features. Finally, I am using the Calculate Field tool to add the names of all the boundary counties. Problems:   1. The problem with using the Selected Features output is that it isn't actually just selecting a county it is creating a temporary feature layer of just that county. So when attempting to make a select by location there is nothing else to select from.    2. The problem with using the Get Field Value tool is that is only selected the first field value in the table, rather than selecting all the values in the NAME field.  Does anyone know how I can fix these issues? Is this process even possible in ModelBuilder? ![enter image description here](http://i.stack.imgur.com/NUcq0.jpg) Python Script: ![enter image description here](http://i.stack.imgur.com/x9jD9.jpg)


How to count the number of shapefiles that touch each polygon?

I am trying to assign a number value field to different habitat shapefile polygons that is the number of other habitat type shapefiles that overlap or share a boundary. For example, I have 5 different habitat type shapefiles. I want each habitat polygon within each habitat shapefile to have a value indicating the number of different habitats that it touches. So if a particular wetland polygon touches a forest polygon and a beach polygon, that wetland polygon would receive a score of 2. Thanks!


Missing pyexpat on QGIS 2.0.1: pyuic4 fails

I have encountered a problem when trying to develop a custom plugin for QGIS 2.0.1 (Python 2.7.5 with two additional Python installations on the same machine). When I try to compile the UI file generated by Plugin Builder, `pyuic4` fails with an error "Import error: No module named expat; use SimpleXMLTreeBuilder instead" produced in the `ElementTree` Python module. The findings from the interactive console suggest that `pyexpat` module is missing, but there is `pyexpat.pyd` file located in the usual location (`D:\qgis\apps\python27\DLLs`). My `PYTHONPATH` is `d:\qgis\apps\python27\lib;d:\qgis\apps\python27;d:\qgis\apps\qgis\python`. What is wrong? Is there a way to fix the missing module?


arcgis javascript api featureLayer not available immediately upon show click event

I am adding a feature layer as such in my index.html file.               featureLayer00 = new FeatureLayer("http://webadaptorserviceurl/MapServer/0",{               mode: FeatureLayer.MODE_ONDEMAND,           id: "0",               outFields: ["*"],               infoTemplate:template             });      I am then then toggle this layer with show/hide in a common.js file as follows: ...               if (visible.indexOf('0') > -1) {                 featureLayer00.show();             }             else {                 featureLayer00.hide();             }      filteronAttribute();      ... It works fine until I get to filteronAttribute(). In the common.js file my filteronAttribute() loops through the layer and shows/hides each stat layer piont as follows:               ...     statLayer = featureLayer00.graphics;     dojo.forEach(statLayer, function (g) {          if (sza.indexOf('all') > -1) {              g.show();          } else if (sza.indexOf('100') > -1 && g.attributes.hosp_beds < 100) {              g.show();     }); ...      If the layer is on and I filteronAttribute all works as expected. However, if the layer is off and I turn it on for some reason the statLayer in filteronAttribute is empty even though it was just set to show. Is there something that has to happen to the featureLayer after it is switched from hide to show before it is available in other functions? Everything works fine if the layer is visible and I filter however, if the filter is set and the Layer is switched from show to hide the statLayer in filteronAttribute is always empty even though it is called after the show method on the layer. Any ideas?


Breakline detection algorithms for LIDAR dataset

I'm searching for algorithms or open source tools I could use to detect breaklines from a LIDAR dataset; more specifically, from the terrain points of the dataset. At the moment the only thing I've found are some articles based on edge detection for buildings and roads. I suppose there are some algorithms based on point clouds, or maybe even for digital elevation models I could use. Any suggestion would be highly appreciated.


Complex Viewshed Analysis

I've noticed that by using Mapinfo vertical mapper complex view shed analyses can be performed which will basically "grade" the viewshed output to show how visible a target is depending upon it's location. Does anyone know if there is a way of performing this function in QGIS? I can perform a basic viewshed analysis but being able to do something more complex would be ideal, Cheers Mike


keeping the coordinate system of raster files in the resulting raster file after operation with numpy

I'm trying to read as array two raster files using ReadAsArray in GDAL/python, perform some map algebra operation on it using numpy and then write the resulting raster file in GTiff format using WriteArray in GDAL/Python. The spatial reference system of the input raster files are the same. I want to know the resulting GTiff file will have the same coordinate system or not?


Where can I find recent rainforest (change) land cover data?

I want to try to get a handle on what's becoming of the world's rainforests right now but not seeming to find recent (i.e. around 2010) data. The stuff here: http://www.glcf.umd.edu/data/ as far as I can tell goes up to about 2006, but no further. I am principally interested in the Amazon and Borneo rainforests.


QGIS Identify Feature tool by dragging a polygon over the datasets

When using arc, I often use the Identify features tool by clicking and dragging the tool over my data and identifying the features within it. Is there a way to do this in QGIS or is setting the search radius within the map tools options the best that can be achieved for searching across multiple datasets? Cheers


Change in ArcGIS locator service causing error

I have ran into an odd problem the last few days. I am using ArcGIS for Runtime and ArcGIS for Server (which is located on a remote machine), as well are ArcMap to publish my services. My services are publishing fine and look OK in my server manager, but when I use my C# application containing the URL for the feature layer I am receiving the message:               Locator service failed: System.Net.WebExceptions: The remote server returned an error: (403) Forbidden.      at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)      at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)      at System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result)      Here is an image of the error: ![Forbidden](http://i.stack.imgur.com/O3HlW.png) The odd thing about this problem is that the data is still loaded from the ArcGIS server and I still have all Feature Access capabilities. My URL also looks like this:               Url="http://**.*.*.***:6080/arcgis/rest/services/DicksonCounty/FeatureServer/0"      Any help would be appreciated. Please let me know if you need any more information. Thanks in advance! So I figured out that the issue was with ArcGIS changing their locator service. I have a ArcGIS online subscription and I can still not figure out what site I am supposed to be using now instead of the one that is listed in all of their documentation.               http://tasks.arcgisonline.com/ArcGIS/rest/services/Locators/TA_Streets_US/GeocodeServer      Has anyone else experienced this? How should I fix the issue. Code for locating:               Locator FindlocatorTask = new Locator("http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer");                     FindlocatorTask.AddressToLocationsCompleted += FindLocatorTask_AddressToLocationsCompleted;                     FindlocatorTask.Failed += FindLocatorTask_Failed;                     AddressToLocationsParameters addressParams = new AddressToLocationsParameters();                     Dictionary<string, string> address = addressParams.Address;                          if (!string.IsNullOrEmpty(Address.Text))                         address.Add("Street", Address.Text);                     if (!string.IsNullOrEmpty(City.Text))                         address.Add("City", City.Text);                     if (!string.IsNullOrEmpty(State.Text))                         address.Add("State", State.Text);                     if (!string.IsNullOrEmpty(Zip.Text))                         address.Add("ZIP", Zip.Text);                          FindlocatorTask.AddressToLocationsAsync(addressParams);                     PortalGrid.Visibility = Visibility.Visible;                     AddressGrid.Visibility = Visibility.Collapsed;


How can I use child window in ArcGIS Silverlight

Can i use child window control to show map legend or overview? I tried to use the child window control to show map legend but i couldn't make it work. Is there any way to use the child window control in ArcGIS Silverlight projects?


How do you distribute values evenly within zones when converting polygon to raster?

I'm trying to convert a (traffic analysis zone) TAZ polygon to raster so that the population values are evenly distributed within each zone. So far, when converting the TAZ polygon, the same population value is included in each of the hundreds of cells that make up a zone. I'm using ArcEditor/Spatial Analyst.


How to set up an OSM routing server

I would like to set up an OSM routing server on my LAMP stack. I am interested in doing a lot of of routing queries. I have a search function that is closely related to getting the driving distance between lat/long locations and will thus be handling a lot of routing queries, even in a development environment. I know how to use the Mapquest API but would like to set up an OSM routing server before I sign up for a business licence with a proprietary mapping service. Where would I start this project? I have looked at OSRM and osm4routing but am still a bit bewildered and can't find anything very well documented out there.


ArcGIS Server Java Edition - Deploy App to Embedded Tomcat

I am more experienced with the .NET side of the house, so please excuse me if this is a simple question. Can I deploy an non-ArcGIS/ESRI app to the embedded Tomcat instance shipped with ArcGIS Server 10 SP5? I have created a simple JAX-RS Jersey REST web service that pulls lookup values from MSSQL db to feed various widgets. As this is (currently) the only component outside of ArcGIS Server ecosphere - I am hoping that I can use the embedded tomcat instance vs installing a more standard Tomcat instance.


How to create themed layer based on a list of geometries and specific risk values in Sharpmap

I am now using SharpMap for creating a network-based tool. By using SharpMap, for constructing network, the current functions in SharpMap enables the tool to capture coordinate on background layer and then creates geometrical points and polylines. Following this step I could create either point-based, or polyline-based vector layers. Now I need to display each geometry into different colours on same vector layer based on their "risk index": a value to assess the gradient colours needed to use. From SharpMap discussion I understand we could not add data attribute to the layers in the 1.0 version, and only Data Column in vector layer can be used to render the colours of elements. My difficulty is: since I created the vector layer by myself and not imported from external data source, and therefore there is no attribute table attached to each layer, it means, no attribute table in the layer. Therefore, I am wondering are there any methods available that I can render my layers not based on attribute table?


subtypes vs domains

No luck on the Esri forums, so I thought I would try here. I was trying to determine the best way to standardize my attribute table. I thought first I would just use a coded value domain but I am unable to without creating a subtype first, I don't understand this but figured I would just create a blank subtype to create the coded value domain, trouble is subtypes require a Long integer field which when exported to a shapefile are meaningless, just a number in a field. So I decided to just create a new subtype properly. I attempted to delete the before mentioned domain and I get the error "Failed to delete a domain from the database. The domain is used by an attribute rule" Trouble is I removed that "attribute rule but it still wont delete. The idea of subtypes and domains are a great idea but this locking problem and the subtype field requirement of being an integer rather than String is an issue for me. Any help would be appreciated, for now I will just create the subtype and leave the domain.


GRASS: shift point locations in a random direction

I have a vector map that contains 100 points. For each point, I would like to shift it 250 units in a random location. It's easy enough to shift all points in a specified direction using               v.edit map=<mapname> type=point move=250,250      But what I need to do is to do this for each point and vary the direction randomly. The magnitude of the shift can be constant. (i.e. xshift can be -250 or 250). Is there a solution that doesn't require me to iterate over the set of points individually? Ideally, I'd like a solution that doesn't require me to use Python -- I'm trying to do all this with bash.


SRTM NASA hillshade grainy appearance

I'm trying to create a hillshade surface from SRTM files downloaded form Earth Explorer, but the appearance is not the expected. ![Hillshade](http://i.stack.imgur.com/a1yCT.jpg) It has a grainy surface that I would like eliminate to have a smoothest surface. I'm running GRASS 6.4.3. to create this. It happen mostly in coastal areas. I've tried to use r.denoise but the result is neither the expected, maybe isn't noise the cause of this. Any idea? If you need more info just ask.


How to write an SQL query to select recently edited features with Editor Tracking enabled?

Conditions: ArcGIS for Desktop 10.2 and ArcSDE 10.1 Is there a way to select recently edited features using the automatically populated fields that Editor Tracking uses? The new Editor Tracking feature allows geodatabase managers to track changes to features. There are four new fields that track the creation user/date and the last edit user/date. I'd like to use SQL to identify recently edited ones for other tasks. The psuedocode would be something like:               SELECT FROM [feature] WHERE [editor tracking field] LIKE [2013-11-04]


OpenLayers: Strange Tiling Issue (Checkered, white and grey) when panning around map

![OL Tiling Issue](http://i.stack.imgur.com/Y9a5C.jpg) So this strange tiling issue is only occuring when moving around the map. Some things to note: 1) You can see the markers, airplane icon, and flight paths. These are all overlays, where the actual world map is the base layer (TMS layer). 2) Before adding these vectors/markers, there was no checkered grey/white tiling issue. You could pan around and everything was super smooth. Edit: to see a larger version of the map, right click the image, copy image url, and paste it into a new browser window. Any ideas on why this may be? I understand the tiles (pngs) have to be essentially downloaded, but it seems strange when adding just vectors and markers would cause this to happen.


Issues using geographic and projected coordinate systems QGIS 2.0

I am having issues with QGIS 2.0.1 working between local projected coordinate systems (such as OSGB36, NAD83) and Geographic systems (such as WGS84). The stock answer I have been provided is ' _load the data and "save as"_ ' - this doesn't cut it, the files are always 50m out. The data requires a Helmert or NTV2 transformation but I cannot see how to appy this in QGIS 2.0 Unfortunately I have gone back to ArcGIS and QGIS 1.9 (using the transformation tool plugin), but I cannot be alone in my issues, so has anyone else had this issue and what is the work -around?


Geodesic distance between two polygons in ArcGIS

Does the IGeometryServer2 interface work in desktop applications? My solution is an Add-in for ArcGIS 10. I'm currently passing it two valid polygon features that are in a projected coordinate system. I call the GetDistanceGeodesic() method in the following manner but it always returns infinity.               IGeometryServer2 geomServer2 = new GeometryServerClass();     var PCS = distFeat.ShapeCopy.SpatialReference as IProjectedCoordinateSystem;         ILinearUnit unit = PCS.CoordinateUnit;         double _dTestDist = geomServer2.GetDistanceGeodesic(distFeat.ShapeCopy.SpatialReference, distFeat.Shape, distFeat2.Shape, unit);      All the inputs have the expected values while stepping through in debug mode. I also tried using WGS84 but the results were the same.


Is there a way to use ArcPy module in the python shell that is not with ArcGIS?

I have ArcGIS 10.2 installed on my machine. When ArcGIS was installed, python 2.7.3(32 bits) was also installed. I need python 2.7.5 64bits for some gdal functions. So I installed python 2.7.5 64bits stand alone. Now there are two python installed with two python shells. One (2.7.3 32bits) can be started from Start---->All Programs--->Python27--->IDLE(GUI). The other(2.7.5 64bits) is from Start---->All Programs--->ArcGIS--->Python27--->IDLE(GUI). Till now I have my work done in python2.7.5 64bits. Now I want to integrate a model I built in Modelbuilder ArcGIS 10.2. I export this model to python script so that I can see the code behind. I need to import ArcPy module to use ArcPy functions. I tried several ways but no good luck. Is there any way that I can import arcpy module in this python shell (2.7.5 64bits, not the one installed with ArcGIS)? Should I install arcpy package first, like what I did for other module? But I didn't see where to download it. Thank you! Solved：Thanks to all the folks here! Finally it is resolved. So I followed the link given by @PolyGeo and asked our IT staff to download the package and installed for me. Now my python (came with ArcGIS) is 2.7.5 64bit. I also uninstalled the stand alone python. Re-install all the modules.


FME Server for Linux and Excel reader/writer

I have an FME model with Excel reader and writer. In FME Desktop help it is stated: "the format is available only on Windows." So, as I understand it will not be possible to run this model on FME Server for linux? Or there is any possibility to do it? PS we have no FME Server yet. Right now we try to choose the right version FME Server for linux or for windows. Linux is prefered


exporting lat/long points from shp file gives crazy results

i downloaded a shape file from the dept of city planning of NYC I use shp2pgsql to create a table (nybb) I use http://prj2epsg.org/search to determine my srid is 2263. which i then set.               select updategeometrysrid(nybb, the_geom, 2263);      I then try to select all the lat long points using the following query               select st_astext(geom) from (select (st_dumppoints(the_geom)).* from nybb where borocode =1) foo;      but the results i get are waaay off for NYC                               st_astext                      ------------------------------------------      POINT(1007193.83859999 257820.786899999)      POINT(1007209.40620001 257829.435100004)      POINT(1007244.8654 257833.326199993)      POINT(1007283.3496 257839.812399998)      POINT(1007299.3502 257851.488900006)      POINT(1007320.1081 257869.218500003)      POINT(1007356.64669999 257891.055800006)      POINT(1007385.6197 257901.432999998)      POINT(1007421.94509999 257894.084000006)      POINT(1007516.85959999 257890.406100005)      POINT(1007582.59110001 257884.7861)      POINT(1007639.02150001 257877.217199996)      POINT(1007701.29170001 257872.893099993)      POINT(1007760.5337 257857.325499997)      POINT(1007854.3688 257830.947600007)      POINT(1007909.50319999 257819.490899995)      what am i missing?


Vehicle travel data for the USA

I'm looking for vehicle travel data in the USA - at any spatial resolution smaller than the unit of a state, and ideally at a city level. I'm interested in daily, or weekly data and also any information about whether the trip is to work or not. Two sources that I have previously found are the Texas Transportation Institute Urban Mobility Report, and vehicle miles traveled at a 250m gridcell for Massachusetts from the MAPC link (data is available, but site currently has a problem) I've looked at the Federal Highway Administration FHWA site which has a special GIS section, but I'm struggling to find data on the site outside of reports in the form of pdfs. Are there any other sources of data that are available that I have overlooked?


Geographic co-ordinate system displayed as projected

ArcGIS suite of software categorises coordinate systems as either geographic or projected. From what I understand about coordinate systems (and I may be wrong), geographic co-ordinate systems are used to display features on a globe and projected co-ordinate systems are used to display features on a 2D plane. How is it that when I use a GCS like WGS_1984 to display a layer of the entire earth, ArcMap shows it to me on a 2D plane? Doesn't that mean that the feature was projected.


Problem with Digital Certificates using OpenLayers

I'm developing a project using Javascript, PHP and OpenLayers. A lot of maps are loaded using and HTTPS connection against an external OGC server. When I try to load the map using HTTPS, they doesn't load (instead of, they show me an "Error loading the map, try again later"). I think that the problem is because of Digital Certificate. If I load directly from the server (using a WMS call) like this (look the last parameter): https://serverurl/ogc/wms?service=WMS&version=1.1.0&request=GetMap&layers=ms1:lp_anual_250&styles=&bbox=205125.0,3150125.0,234875.0,3199875.0&width=306&height=512&srs=EPSG:4326&format=application/openlayers The browser ask me for my authorization to see it. If i accept the Digital Certificate, I can see the map. After that, and because of my browser now accepts the certificate, I can see my own map from my own application. I'm creating the layer like this:               activeLayer = new OpenLayers.Layer.WMS(                    layername, layerurl,                    {                       width: varmap.size.w,                       srs: varmap.projection,                       layers: layername,                       height: varmap.size.h,                       styles: style,                       format: 'image/png'                    }                    );     varmap.addLayer(activeLayer);      So, the question is: Is there any way to ask for the Digital Certificate mannually when the user access to my web? Thanks in advance! PS: solutions using PHP are welcome too because I'm using CodeIgniter to load views


how to write Topology Graph Edges geometry to polyline feature class

i have created topologygraph of a polygon feature . and iwant individual ids of polylines i want to write Topology Graph Edges geometry to new polyline feature class any samples OR documentation about this task?


What is the use of Autocad Map 3D, if we have ArcGIS?

i am jaison. What is the actual use of autocad map 3d? It seems that arcgis has many tools for analysis. Is there any other advantage in using autocad map 3d? Waiting for your valuable suggestions. Thanks in Advance... :)


Tooltip overlay with cartodb createlayer

I enabled a tooltip on my viz using the code below.               cartodb.createVis('map', vizUrl, {         center_lat: 16.55,         center_lon: -106.5,         zoom: 6     })         .done(function (vis, layers) {                       spillLayer = layers[1];         layers[1].getSubLayer(1).setInteraction(true);             layers[1].getSubLayer(1).setInteractivity('v1');                  vis.addOverlay({                 layer: spillLayer,                 type: 'tooltip',                 template: '
{{v1}} gallons
'             });      }) I am now in a situation where I need to load the viz after a L.Map has already been created. How would I enable the tooltip in this situation? When I run the code below I get an error like ![enter image description here](http://i.stack.imgur.com/wsFps.jpg)               cartodb.createLayer(map, vizUrl)          .addTo(map)          .done(function (vis, layer) {                             spillLayer = layer[1];             layers[1].getSubLayer(1).setInteraction(true);             layers[1].getSubLayer(1).setInteractivity('v1');                            vis.addOverlay({                 layer: spillLayer,                 type: 'tooltip',                 template: '
{{v1}} gallons
'             });      )}


Lat Long to State Plane conversion

I am using the ESRI javascript API and I have a set of lat/long points I need to convert to a state plane coordinate system. My spatial reference is wkid 3418. I can easily use the GeometryService to project the state plane to lat/long, but need to go in the opposite direction. I was looking at the REST API for ArcGIS and saw a setting `transformFoward`. Is this the setting I need to go in that direction? (http://resources.arcgis.com/en/help/arcgis-rest- api/index.html#//02r3000000pv000000) What are ways I can do this conversion?


ArcGIS Raster Mosaic Dataset and GDAL VRT, when to use?

ArcGIS has a the Raster Mosaic Dataset, QGIS and friends have Virtual Raster Tables. A skim of the documentation reveals much similarity. They both create or enable an alternate representation of data that sits somewhere else without having to actually create a new image. Examples include creating a single seamless image from many tiles without actually creating that single image, or mix-and-matching channels or selectively removing value ranges from the result, and more. How far does that similarity extend? Does an RMD enable things that VRT can't? What are they? What can one do with VRTs that you can't with RMDs? In short, assuming one has equal access to and comfort using both tool chains, when should a person use Raster Mosaic Datasets and when are Virtual Raster Tables the order of the day?


Can't save custom CRS in QGIS 2.0.1

I am trying to enter a custom CRS in QGIS 2.0.1 but when I enter the proj4 parameters and hit okay they are changed. There is no save open in 2.0.1 which seemed to be the problem for many people earlier. I'm not sure how to properly add a new CRS now. Any help would be appreciated.


What map library does this census visualization use?

Link: http://projects.nytimes.com/census/2010/explorer How can I also render that specific kind of map? Does it come from some popular library? It doesn't look like Natural Earth or drawn with Mike Bostock's TopoJSONs. It says its from Google at the bottom right, but then why does it look different from maps.google.com?