title: ArcGIS for Javascript : Locate Widget Activate Popup for Layers X > Z?

text: Using ArcGIS for Javascript I have a map with a **City Council District** feature layer. I would like for the user to enter their address in the 'Address Finder' / Locate Widget (that's what it's called in Flex) and when the dot appears on the map I want the City Council District Layer popups to be triggered. The popup currently says, **"You are in [Councilor]'s district, number [Distr#]."** So if they type in their address, **"1234 Sesame Street"** and that is in **district #3** which is Councilor Smith, what I want to happen is to see the address finder drop the dot on the map where the address is and have a popup say, **"You are in Smith's district, number 3."** Is this possible and if so, how? Update: 08APR14 I am including my working code as I progress. When I get this working I will post it as an answer. The following code will drop a pop-up window that is empty onto the screen. Now I am trying to figure out how to programmatically "click" on the screen at the center of the GeoCoder's search results.               require         (             [                 "esri/map",                 "esri/dijit/Popup",                 "esri/layers/FeatureLayer",                 "dojo/dom-class",                 "dojo/dom-construct",                 "dojo/on",                 "dojox/charting/themes/Dollar",                 "esri/dijit/Geocoder",                 "esri/geometry/Extent",                 "esri/SpatialReference",                 "dojo/domReady!"             ],             function( Map, Popup, FeatureLayer, domClass, domConstruct, on, theme, Geocoder, Extent, SpatialReference )             {                 var popup = Popup( { titleInBody: false }, domConstruct.create("div") );                      var locatorURL = "http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer";                      var map = new Map("map", { basemap: "gray", center: [-95.989658, 36.155520], zoom: 13, infoWindow: popup });                      domClass.add( map.infoWindow.domNode, "myTheme" );                      var featureLayer = new FeatureLayer                 (                     "http://maps.cityoftulsa.org/gis/rest/services/StarterMaps/extCouncilDistricts/MapServer/0",                     { mode: FeatureLayer.MODE_ONDEMAND, opacity: 0.4, outFields: ["*"]  }                 );                      map.addLayer(featureLayer);                      // XMin: -10779302.92 YMin: 4210801.07 XMax: -10504129.62 YMax: 4394249.94                 // Taken from: http://developers.arcgis.com/javascript/sandbox/sandbox.html?sample=map_currentextent                 var extCityOfTulsa = new Extent                 (                     -10779302.92,                     4210801.07,                     -10504129.62,                     4394249.94,                     new SpatialReference                     (                         { wkid:3857 }                     )                 );                      var myGeocoder = [ { url: locatorURL, name: "Address Locator", singleLineFieldName: "Single Line Input", searchExtent: extCityOfTulsa } ];                      var geocoder = new Geocoder                 (                     {                         map: map,                         geocoderMenu: true,                         value: "175 East 2nd Street",                         maxLocations: 10,                         autoNavigate: false,                         autoComplete: true,                         arcgisGeocoder: true,                         geocoder: myGeocoder                     },                     "search"                 );                      geocoder.startup();                      function popThatCouncil(results)                 {                     var resGeom, resFeat;                          for (var i = 0; i < results.results.results.length; i++)                     {                         console.debug(results.results.results[i], " at index ", i);                         resGeom = results.results.results[0].feature.geometry;                         resFeat = results.results.results[0].feature;                     }                          map.centerAndZoom(resGeom, 20);                     map.infoWindow.setFeatures(resFeat);                     map.infoWindow.show(resGeom);                     geocoder.inputNode.blur();                 }                      geocoder.on( "find-results", popThatCouncil );             }         );


title: Update raster value to reflect total number of points within cell- python

text: I have what should be a fairly simple task, but I can't seem to figure out how to do it. I have to do it in python/arcpy/gdal/whatever because I'm trying to automate this process for a hundred or so different raster/shapefile combos. This is what I need to do: Basically, I have an empty raster and a shapefile with thousands of points. I would like to update the value of each cell/pixel in the raster to reflect the number of times a unique point lands within that cell. At first I was thinking something like this:               for cell in raster:         for point in shapefile:              if point intersects with (/is contained in) cell: cell_value + = 1      However, I don't know how to implement this because I don't see how to intersect a raster and a polygon. Converting the raster into polygons is out of the question because the rasters are very large with a lot of cells. I'm not married to the idea of looping through both the individual cells and points because I feel like it's unnecessary, so if there is an Arc tool(s) that I could manipulate, and/or another method in python I could use to reach my goal, I'm more than happy to try that out. If you have any suggestions as to where to go from here, please let me know. Anything would be greatly appreciated. Thank you.


title: Direct browser to log in to GeoServer

text: I am embedding GeoServer's web UI in an IFrame and want to automatically log the user in. Is it possible to include the login credentials in a query like this `http//:host:port/geoserver/login?username=usr&password=pass`?


title: Using polygons with libspatialindex

text: I am investigating using some C/C++ libraries for point-in-polygon lookups and `libspatialindex` seems popular. I've written some code that seems to do what I want but I'm not entirely sure if what I doing is correct. I have a requirement that the polygons have an arbitrary number of dimensions, they generally range from 5 to sometimes 16. My problem is that when creating the `RTree` I have to specify the number of dimensions and so if I try to insert a polygon that has a higher number the insertion fails. Also I'm not quite sure if `SpatialIndex::Region` is the correct object to use to represent polygons, it seems to actually be a rectangle rather that what I'd call a Region as it only allows 2 dimensions. A quick fix would be to create individual `Region`s for each pair of points in the polygon but that is quite inaccurate. I've scoured the internet for sample code but I can't find anything worthwhile. If anyone can shed light on whether or not I'm doing something wrong or if there's a better open source library out there it'd be greatly appreciated.


title: How to get the regional maximum or minimum of raster data by using PostGIS?

text: If I have Mean sea surface pressure data in raster format, is it possible for PostGIS to look for regional maximum or minimum? So that I can locate the L or H as the chart shown below? (image source: NOAA) ![enter image description here](http://i.stack.imgur.com/VdVNl.gif)


title: R: overlay a line on a raster stack/brick, and get profile of cell values along the line

text: I've combed through R's raster functions and vignettes and can't seem to get this working. I want to specify a line/vector across a raster stack (a DEM and possibly related variables), and get a profile of values for the cells which the line intersects. I've been able to do something similar using `mask` with a polygon. EDIT: Thanks to scw, I have developed the following solution.               # I have a stack of environmental rasters in this format     new_r <- raster(ncol=615, nrow=626, xmn=-156.2, xmx=-154.8, ymn=18.89, ymx=20.30)     res(new_r) <- 0.00225     projection(new_r) <- "+proj=longlat +ellps=GRS80 +datum=NAD83 +no_defs +towgs84=0,0,0"     values(new_r) <- outer(seq_len(nrow(new_r)), seq_len(ncol(new_r)), "+")     stackdata <- stack(new_r, sqrt(new_r))          # I designate two transect lines by long/lat     cds1 <- rbind(c(-156, 19), c(-155.5, 20.2))     cds2 <- rbind(c(-155, 20.2), c(-155, 19.2))     transects <- SpatialLines(list(Lines(list(Line(cds1)), ID = "one"),                                     Lines(list(Line(cds2)), ID = "two")))          # plot the lines to confirm placement     plot(new_r)     plot(transects, add = TRUE)          # and return a list whose length is equal to the number of line segments,     # and each list element is a matrix with a column for each raster layer     e <- extract(stackdata, transects)


title: Can you get the individual segment length from OpenLayers measure class?

text: OpenLayers has a OpenLayers.Control.Measure class to implement a measure tool. There is a measure and measure-partial event, both which are passed a variable containing the total distance. Is it possible to get the last segment length? Thanks, CLARIFY: When I say last segment length ... you see how you can draw 2 or 3 lines in one go and it will give you the total distance drawn across all lines? That's great. What I'm after is the length of the last line the user drew only.


title: Trying to fill polygon fills the entire map

text: I have been given some shp files to be displayed using Mapserver. Until now I was able to find the correct projections, display the map, and show labels. However, I have problems with polygon colors. When I set COLOR to any value, the entire map is filled with that color. Is it a problem with the shp file, or what am I doing wrong? For example:               LAYER         NAME mylayer         TYPE POLYGON             DATA "mylayer.shp"         STATUS DEFAULT         CLASS           NAME mylayer                STYLE             COLOR 255 0 0             OUTLINECOLOR 0 0 0           END         END       END       This will fill the entire map with red color, polygons have black outline. Help! :)


title: GRASS v.generalize method=douglas not working as expected

text: I'm frustrated with v.generalize trying to simplify polygons. Those polygons stem from ArcGIS's raster to vector function (imported into GRASS from Shapefile), so they are pretty zigzag like this: ![Zigzaged](http://i.stack.imgur.com/JoIHi.png) Trying to simplify them with               v.generalize input=polygons -c method=douglas threshold=0.1 layer=-1 output=polygons_dp      leads to a weird result like this: ![simplified](http://i.stack.imgur.com/CLZPF.png) Some isles and even partially borders remain untouched. Tried v.clean, v.build.polylines before simplifying, but same result. Thanks in advance for any hints!


title: Looking for ZIP+4 boundaries

text: I know where to find 5-digit ZIP code boundaries. Do 9-digit ZIP code boundaries exist? If so, where might I find them?


title: Navigation/Routing in 3D View On Android

text: I need to build a navigation/routing application in 3D view like sygic, what are the available options if any? Are there any existing open source or proprietary 3D mapping/libraries. I have checked MapQuest, CloudMade and Openlayers2, but they don't seem to have this option. Any help would be greatly appreciated. Thanks in advance.


title: Importing multiple shapefiles into single PostGIS table

text: I have a folder full of shapefiles that I want to import into a single PostGIS table. This table should have the following columns:               id, filename, multipolygon      I can bulk import all shapefiles using the SPIT plugin for QGIS, but each shapefile has different attributes, thus they are placed in different tables and I cannot append them into just one. I don't really want any of the attributes, I just want each polygon to be associated with the file from which it came. I've tried two basic strategies, and neither looks very promising to me:   * Import all files normally and use SQL queries to extract the information I want from each table. My SQLfu is not strong enough to do this yet. In particular, how do I get the name of the file associated with the corresponding rows?   * Programmatically generate .dbf files with the associated filename as an attribute. Then import all files normally and append to a single table. Seems quite hacky. I realize very similar questions have been posted before, but none of them seem to address this issue. I'm just starting with GIS tools so any help is greatly appreciated!


title: Does anyone know how to get the Bing Search Toolbar to work again in ArcGIS 10 Business Analyst after the SP2 install?

text: I just updated my ArcGIS Business Analyst with the Server Pack 2 upgrade and now the Bing Search Toolbar does not work. Is anyone else having this problem and if so do you know of a way to fix it? Note: I would and I am sure anyone else with this problem would prefer a solution that does not require uninstalling SP2.


title: Can you use nested properties to style features in CartoCSS

text: I've imported a GeoJSON layer into TileMill and am having trouble styling based on the properties in the features. The features' `properties` objects have objects nested within them, and I haven't found any examples of using nested properties in selectors. I have tried something like the following:               #geojsonlayer[submission_sets.comments.length=1] {       marker-width:2;       marker-fill:#f45;       marker-line-color:#f45;       marker-allow-overlap:true;       marker-ignore-placement:true;     }      But I get a "missing closing ] of filter" error. Is this construction valid? Is there some other valid construction that allows me to do something similar? **Edit:** For reference, here's a sample feature that I'm trying to style:               {        "type":"Feature",        "id":166995,        "geometry":{           "coordinates":[-75.1694440842,39.9707152354],           "type":"Point"        },        "properties":{           "description":"...",           "updated_datetime":"2014-03-28T01:31:29.492896+00:00",           "visible":true,           "created_datetime":"2014-03-07T17:10:00+00:00",           "attachments":[],           "url":"http://data.shareabouts.org/api/v2/mjumbewu/datasets/philly-bike-share/places/166995",           "_imported_id":1402,           "id":166995,           "submission_sets":{              "comments":{                 "length":1              }           },           "name":"20th and Ogden Street",           "dataset":223        }     }      (from http://data.shareabouts.org/api/v2/mjumbewu/datasets/philly-bike- share/places?format=json&page=5)


title: Creating buffers that will not overlap in QGIS

text: I am dealing with a .shp with a number of points in it. The distances between points range from ~300m to 5km. I wish to create a 1 km buffer around each point with as little overlap as possible. Each buffer should have an ID. Where 1km buffers overlap with each other, I would like to give that buffer a different ID. So lets say I have 50 points, and I create a 1 km buffer around every point. Owing to the short distances between my points in the Shapefile, overlapping between buffers are inevitable. Where there is overlap, I would like to give one of those buffers a particular ID. I would like to replicate this throughout my entire dataset until there are no buffers of the same ID overlapping. I am sure this is possible in QGIS with a combination of the vector manipulation tools, I am just struggling on the best approach. Any advice would be greatly appreciated. edit: `2.0.1 Dufour` ![My problem is exhibited on the left image. The resolution is on the right image. Not how the ID of the buffer has changed to prevent overlapping of the same ID](http://i.stack.imgur.com/KfWMm.png)


title: How do I get the value of the pixel under the cursor?

text: Is there a tool or something that will give me the value of the pixel under the cursor? What I've got in mind in something like the eyedropper tool in graphics programs that allows you to interactively sample points in a raster image.


title: Projection to use with satellite image from Google Maps / Earth

text: I'm very new to anything concerning GIS so please forgive me if this question has been asked before, but I assure you, I've been trying to find an answer for quite some time now. Of course it is possible, that the question itself is dumb or that I've overlooked the answer because of my lack of expertise in this field. I built a programme for a 3D Engine that reads latitude and longitude values from an openstreetmap (osm) file and projects these onto a x/y plane. With the projected corner points of buildings I then create rudimentary 3D buildings by just extruding their ground areas. I used two projections so far, the Mercator and the UTM projection. Now I'd like to "download" satellite images (or rather make screenshots from Google Maps / Earth) and use the as an underlay, so that the constructed buildings sit on top of the image in the right places and the right scale. I'd like to be able to align the buildings with the buildings on the satellite image by doing no more than the following three actions (since I have to do it manually):   * Moving the image in the x/y plane   * Rotating it around the z axis   * Scaling it (maybe independently) in x and y I cannot, however, distort the image in any other way. I know that with each projection you have a tradeoff, as there is no projection that is equidistant, isogonal and where the area proportions are correct all at the same time. With the two projections I've used so far it wasn't possible to align the image with the buildings, since as soon as I made it fit in one place it didn't fit in other places any more. So my question is, which projection I should use and which properties the projections needs for my purpose. As I see it, a satellite image (if what you get from Google Maps / Earth even is from a satellite) is a projection itself, so is there are projection that is similar to what a satellite sees when orbiting the earth?! Are there any others sources for satellite images that would work better? Thanks in advance! P.S. The area covered by the osm file is rather small (around 3km x 5km).


title: Graph.traverse() maximum targetIds?

text: First of all, huge thanks to Carsten for writing this amazing tool. I love it. I am using the function traverse(Graph graph, int sourceId, int[] targetIds, float maxCost, java.util.Properties params) and I found out that if I feed more than 144 targetIds it will throw an ArrayOutOfBounds exception, anything below 144 works fine. Is this an intrinsic limitation of the function or am I doing something wrong? Thanks!


title: Search keyword from GeoServer

text: I want to search some keyword from GeoServer, like "E11" or "停車場" (Chinese), My request is below: EX: Search "E11" :                   <wfs:GetFeature service="WFS" version="1.1.0"          outputFormat="JSON"          xmlns:topp="http://www.openplans.org/topp"           xmlns:wfs="http://www.opengis.net/wfs"           xmlns:ogc="http://www.opengis.net/ogc"           xmlns:gml="http://www.opengis.net/gml"           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"           xsi:schemaLocation="http://www.opengis.net/wfs         http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">         <wfs:Query typeName="osm_lh:planet_osm_polygon">         <ogc:Filter>         <ogc:PropertyIsLike wildCard="*" singleChar="#" escapeChar="!">         <ogc:PropertyName>name</ogc:PropertyName>         <ogc:Literal>*E11*</ogc:Literal>         </ogc:PropertyIsLike>         </ogc:Filter>         </wfs:Query>         </wfs:GetFeature>      Then I found what I want. When I use Chinese words to search, it always return Nothing !! EX: Search "停車場" :                   <wfs:GetFeature service="WFS" version="1.1.0"          outputFormat="JSON"          xmlns:topp="http://www.openplans.org/topp"           xmlns:wfs="http://www.opengis.net/wfs"           xmlns:ogc="http://www.opengis.net/ogc"           xmlns:gml="http://www.opengis.net/gml"           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"           xsi:schemaLocation="http://www.opengis.net/wfs         http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">         <wfs:Query typeName="osm_lh:planet_osm_polygon">         <ogc:Filter>         <ogc:PropertyIsLike wildCard="*" singleChar="#" escapeChar="!">         <ogc:PropertyName>name</ogc:PropertyName>         <ogc:Literal>*停車場*</ogc:Literal>         </ogc:PropertyIsLike>         </ogc:Filter>         </wfs:Query>         </wfs:GetFeature>      Return: {"type":"FeatureCollection","totalFeatures":0,"features":[]} I found the GeoServer log message:                   Request: getFeature             service = WFS             version = 1.1.0             baseUrl = http://127.0.0.1:8090/geoserver/             query[0]:                 filter = [ name is like *??????* ]  <==== HERE                 typeName[0] = {osm_lh}planet_osm_polygon             outputFormat = JSON             resultType = results         2014-01-27 13:01:00,232 INFO [wfs.json] - about to encode JSON      So what happen to this ?? Please help ! Thanks ! Tai


title: How do I split a shapefile efficiently into mutually exclusive sets?

text: I have a shapefile containing about 240,000 features. I want to split this into five files with no overlaps. My current approach is to write a non- trivial expression that defines the first subfile, save the selection, then delete the selected features. I then repeat this process. The problem is that deleting the records is taking 10-15 minutes for each step. In principle I could skip the deletion at each step, and then select the final subset as the negation of the OR of the earlier queries, but the likelihood of writing that query correctly seems quite low. I suppose I could create a new field corresponding to each subset and set the value to 1 or 0 by expression, then set the last field as the negation of the OR of the fields. But I'm nearly done, so I'm not sure I'll be trying this. For future reference, is there a better way to do this?


title: How to select part of the polygon

text: I have a shapefile of the country. I need to select only percentage of that polygon for demonstration purposes. As an example, how to select 60% of polygon? I am using ArcGIS 9.3.


title: How to assign no value to pixels with (255,255,255)

text: I have Imagery where I want to replace white edges (255,255,255) with no value. I have used gdal translate within QGIS and put in no value 255 but this give no value to other pixels eg 255,240,200. I only want no value for 255,255,255. OK this is probably a stupid question, seems like there will be a simple solution. I have about 80 tiles to do this on.


title: Extract specific amenity Osmosis with Java api

text: I need to extract restaurants from a planet.osm.pbf file. I assume the best way to do this is with Osmosis, however I need to save this data in my own database format. (Not something standard like Postgres or something else with existing plugins). Therefore, I need to write a Java application to do this, yet the Osmosis documentation seems very confusing to me. What I need to do is this: Pseudocode:               while(file.hasNext("amenity=restaurant"))     {          Amenity restaurant = this.amenity;          String street = restaurant.street;          String city = restaurant.city;          String region = restaurant.region;          String name = restaurant.name;          String cuisine = restaurant.cuisine;          // I do my own thing with this information here...     }      I can read the file in with FileInputStream, etc... I just don't understand how to parse and extract data specifically. This information would be extremely valuable, allowing people to extract this type of data with ease, so they don't have to scour the internet as I did.


title: Does software exist to create Flow Maps (for migration of people) on Mac?

text: Does anybody know a good, and easy to use, software to create flow maps? I want to create flow maps for showing the flow of people between places (migration). The software has to be compatible with Mac computers. I have tried the plugin for QGIS, but it was designed for Windows.


title: Where can I find human migration data?

text: I am looking for data to create a flow map. I need data showing the migration of people either within a country, or internationally.


title: Using Well-Known Text and geocoding on Load

text: So, I have tested adding columns with the WKT format into Carto, and it has always worked great (I tried 1 row, then 1000 random rows from our data). I geocoded it on load by naming the column with the WKT the_geom. When I uploaded all the data, some of the data was corrupted (random numbers and letters, no format). After testing, I have found the following: The csv being used is normal and fine. When the data is mixed (some the_geom values are blank, some are in WKT format), less than 40,000 rows can be added (40K doesn't work, 39.5K does) The data that is corrupted is the first 24,000-25,000 rows (it varies) that have a value in the_geom column (only those first ones, no matter whether its 40K rows or 1.1 million). If I upload 39K rows, the same rows that were corrupted before are now fine and geocoded. I can load as many rows as I want, as long as the_geom is in WKT format OR blank, but not mixed. All of this to say, I found a work around (upload 2 separate tables [one with the_geom WKT format, the other blank], then using sql union to combine them). Unfortunately, I cannot make a table out of these 2 because I have reached the size limits for our account (Xentity). Any ideas what is causing this? If not, is there any way we could do a one time extension of the DB size, in order to combine the tables (then delete the 2 halves)?


title: CreateFeatureClass failure in vb.net

text: I'm using ArcGIS 9.3.1 and trying to get the code to create a new feature class in an existing personal geodabase to work but I am having no luck. When running in debug mode from within vb.net it will fail with the standard "LoaderLock" error where it tells you to not run managed code inside a DllMain. I'm sure this is a simple problem that I'm just not seeing, but I've been searching the forums for a couple of days not with no luck. If anyone has insight after looking at the code below I would be very thankful. Dan Dim pGeomDef As IGeometryDef = New GeometryDef Dim pGeomDefEdit As IGeometryDefEdit = CType(pGeomDef, IGeometryDefEdit) With pGeomDefEdit               .GeometryType_2 = esriGeometryType.esriGeometryPolygon          Dim pSpatRefFact As ISpatialReferenceFactory2 = New ESRI.ArcGIS.Geometry.SpatialReferenceEnvironment          Dim pGeoCoordSys As IGeographicCoordinateSystem = pSpatRefFact.CreateGeographicCoordinateSystem(ESRI .ArcGIS.Geometry.esriSRGeoCSType.esriSRGeoCS_WGS19 84)          .SpatialReference_2 = pGeoCoordSys      End With Dim pFields As IFields = New Fields Dim pFieldsEdit As IFieldsEdit Dim pField As IField Dim pfieldEdit As IFieldEdit pFieldsEdit = pFields pField = New Field pfieldEdit = pField With pfieldEdit               .Name_2 = "ObjectID"          .Type_2 = esriFieldType.esriFieldTypeOID      End With pFieldsEdit.AddField(pField) pFieldsEdit = pFields pField = New Field pfieldEdit = pField With pfieldEdit               .Name_2 = "SHAPE"          .Type_2 = esriFieldType.esriFieldTypeGeometry          .GeometryDef_2 = pGeomDef      End With pFieldsEdit.AddField(pField) Dim pWorkSpaceFactory As IWorkspaceFactory = New ESRI.ArcGIS.DataSourcesGDB.AccessWorkspaceFactory Dim pFWS As IFeatureWorkspace = pWorkSpaceFactory.OpenFromFile("c:\Dan\Data\DataFi tness-1AOI.mdb", 0) Dim pFeatClass As IFeatureClass Dim pUID As New ESRI.ArcGIS.esriSystem.UID pUID.Value = "esriGeoDatabase.Feature" 'FAILING HERE pFeatClass = pFWS.CreateFeatureClass("TestFC1", pFieldsEdit, pUID, Nothing, esriFeatureType.esriFTSimple, "SHAPE", "")


title: Easy way to get .gpx into mapInfo 12?

text: Is there an easy way to get .gpx files pulled from my Garmin GPS60 with MapSource into MapInfo 12? I know I can grab the data as .txt and fiddle with it in Excel first, just wondering if there is another way. Thanks.


title: Arcobjects: Is my spatial reference Geographic or Projected?

text: I have the user select a coordinate system with the Spatial Reference Dialog. Is there a simple way to determine if the resulting spatial reference is a Projected or Geographic CS? I would of thought that this would be an attribute of the spatialReference, but it does not seem to be. Using ArcObjects .NET SDK (C#). As always, thanks in advance!


title: Openlayers - how can I parse a KML file

text: I have found some info on here regarding opening a KML file (with groundoverlay) from a url in Openlayers. In order to open a KML with groundoverlay, it must first be parsed. However, after I `GET`, I am getting back a downloadable KML file. From the response in FireBug, I just see a bunch of giberish as the response! I want the KML(XML) so I can get the info out of it. Does anyone know exactly how to parse a downloadable kml from a url? Thanks! Here is my code below. The url takes me to a kml that I can see in Google Earth. However, the response I get back is just a bunch of symbols according to Firebug, when I send as a GET. Any idea what I am doing wrong here to get the response in xml format?                     kmlURL='http://capstonedev/cgi-bin/proxy.cgi?url=http%3A//10.60.26.64%3A8080/viewshed.kml%3FREQUEST%3DExecute%26DataSource%3DSRTM3%26Operation%3DLegionViewshedOperation%26Parameters%3DobserverCoord%3A-113+42%2CouterRadius%3A40000%26FORMAT%3DKML';     OpenLayers.Request.GET({         url: kmlURL         ,         callback: function(request) {             if(request.status==200)                alert(kmlGroundOverlayParse(request.responseText));             else             {   alert(request.status + "::" + request.responseText);                 console.log(request.status + "::" + request.responseText);             }         }     })                                                      function kmlGroundOverlayParse(strKML)         {         var NL = "\r\n";         var parserXML = new OpenLayers.Format.XML();         try {         objKMLxml = parserXML.read(strKML);         } catch(err) {         console.log(err.message);         //alert(err.message);         return;         }              var Msg="";         var objLayerList = parserXML.getElementsByTagNameNS(objKMLxml, "*", "GroundOverlay");              for(var i=0;i<objLayerList.length;i++)         {              var derName = parserXML.getElementsByTagNameNS(objLayerList[i], "*", "name");              var dasIcon = parserXML.getElementsByTagNameNS(objLayerList[i], "*", "Icon");         var dieHREF = parserXML.getElementsByTagNameNS(dasIcon[0], "*", "href");              var dieBox = parserXML.getElementsByTagNameNS(objLayerList[i], "*", "LatLonBox");         var derNorden = parserXML.getElementsByTagNameNS(dieBox [0], "*", "north");         var derWesten = parserXML.getElementsByTagNameNS(dieBox [0], "*", "west");         var derSueden = parserXML.getElementsByTagNameNS(dieBox [0], "*", "south");         var derOsten  = parserXML.getElementsByTagNameNS(dieBox [0], "*", "east");              Msg += "name:" + derName[0].firstChild.nodeValue + ", ";         Msg += "url:" + dieHREF[0].firstChild.nodeValue.substr(0,20) + ", ";         Msg += "BOX:" + derWesten[0].firstChild.nodeValue + ", ";         Msg += derSueden[0].firstChild.nodeValue + ", ";         Msg += derOsten[0].firstChild.nodeValue + ", ";         Msg += derNorden[0].firstChild.nodeValue + ", ";              Msg += NL;              var title = derName[0].firstChild.nodeValue;         var url = dieHREF[0].firstChild.nodeValue;         var projection = "EPSG:4326";              var ptmin = [derWesten[0].firstChild.nodeValue,derSueden[0].firstChild.nodeValue];         var ptmax = [derOsten[0].firstChild.nodeValue,derNorden[0].firstChild.nodeValue];              var bounds = ptmin[0] + "," + ptmin[1] + "," + ptmax[0] + "," + ptmax[1];         var size = "100,100"; //uninteressant, notwendig für addLayer??              addKMLGroundOverlay(i, title, url, projection, bounds, size);     }          Msg += objLayerList.length;     parseMsg = Msg;      }


title: how to modify shape extents in qgis

text: I want to change the shape extent of some shape files, I would like to know how to do it in Qgis, since I rasterized some shapes and when I used the calculator to add them, the resulting raster had deleted zones with null data... What i'm trying to do is to add the boolean rasters of the distribution of species into one, to obtain a single one that shows the # of species in a region.... The first image shows the resulting raster (after I use raster calc to add every raster), the second one is the raster I made of the original shape file I used to clip all of my shapes for the region. When I inspect the resulting raster, I get null values (the blue colored section, so the image seems incomplete... ![  ](http://i.stack.imgur.com/yJSRf.png)


title: How to calculate an hypsographic curve of a raster trhough a DEM

text: I am using Arcgis 10.1. I have a MODIS raster from the NSIDC website with a pixel resolution of 500 m and an attribute table with the fields 'VALUE' (as the code of snow, clouds, etc.) and 'COUNT' (as the number of pixel in each class (or in each 'VALUE'). I also have a DEM from USGS that I have reprojected to match the Spatial Reference and the pixel resolution of the MODIS (thus increasing the pixel of each cells from the original 83 up to 500 m size). What I would like to do is to have a table (or whatever) showing the area of the snow class for each 200 m elevation ranges (the hypsographic curve of the snow cover). I have reclassified the 500 m resolution DEM as to have 200 m elevation ranges, and now I have a new attribute table showing the 'VALUE' (the different elevation ranges) and their respective pixel 'COUNT'. I've been trying using the Zonal Histogram tool, putting as the input zone my MODIS and as the input value my DEM. The result seemed fine but I noticed that summing the number of pixels of each elevation range within the same class(for instance 'snow' that is the one I need) the final number of pixel is different than the one in the MODIS attribute Table (sometimes a lot different!). No clue why, guess it might be due to spatial difference amongst the two rasters due to the transformation I've made, even though the two rasters were both clipped using the same mask... Here are examples of 2 original Attribute Tables that I have (200 is snow, other numbers are other classes):                   MODIS                 reclissified_DEM     VALUE  COUNT                VALUE  COUNT          25    240787                   0      2     100       169                 200 188277     ...       ...                 ...    ...      200     32265                6600      3      Moreover, I also noticed zooming to pixel extent that the pixels of the two rasters do not match, and I think this leads ArcGIS not working as I'd like. Is there a way to match them as to loose the fewer information as possible? Or, is there an easier way to do all this job? See the below image to understand what I mean: ![not matching pixels](http://i.stack.imgur.com/y15Qg.png) Hope You could help me.


title: ESRI Flex API - Dealing With Graphics Layers in Polar Regions

text: I have developed a Flex app that incorporates a number of geo-processing functions. The Base Layer of this app is the standard ESRI World Imagery in Web Mercator coordinate space. One of these geo-processing functions is a glorified buffer service that can (and often) gets run in or near the polar regions. The graphics in these locations run-off the map (see attached image) ![enter image description here](http://i.stack.imgur.com/mdhh2.png) So, I have 2 questions about dealing with this situation:   1. Is there some way to confine the graphics layer to the map surface, just like ArcMap does?   2. Is there an algorithm I could use (client side) to draw the graphics like they would fall on an actual globe?


title: Break between two raster layers (topographic maps)

text: I have the following problem [in QGIS]. In displaying two raster layers (topographic maps), a white area appears between the two. If I apply transparency to one of the layers, this white area still hides the union of the contour lines. Is there a way to see these layers together without having to apply transparency? With orthographic layers the visibility of the fold is perfect without having to resort to transparency. ### Original El problema que tengo es el siguiente; cargo dos capas raster (planos topograficos)aparece entre la unión de ambos una zona en blanco. Si aplico la trasparencia a una de las capas dicha zona blanca deja vislumbrar la unión de las curvas topográficas. ¿ Existe la forma de ver dicha unión de capas sin tener que aplicar la transparencia?. Con capas ortograficas la visibilidad del pliege es perfecto sin tener que recurrir a la traspariencia. Gracias.


title: Trouble creating ArcSDE Connection File

text: I'm having trouble creating a ArcSDE Connection File. When I bring up the GP tool to do this, I enter the folder I was save the sde file to, enter an name for the file 'MySDEConnect.sde', enter the Server name 'VirtualXP-64180\SQLEXPRESS', enter the Port number I found under SQL Config Manager>SQL Native Client 10.0 Config>Client Protocols>TCP/IP Properties>Default Port which is "1433". I enter ArcSDE database name "MySDEDB" and uncheck Database authentication since I have not entered any username/password for the SQL Express database. After I enter in the port number in the Service textbox, it shows a Caution sign by the Server saying it can't connect to it. Could I have the port number wrong, if so where do I find the correct one. Any help or direction here would be appreciated.


title: How to create a new 'gis' database in PostGIS?

text: I'd like to create a new database in PostGIS, so I can load stuff into it while the current database is being used. According to the docs > Some packaged distributions of PostGIS (in particular the Win32 installers > for PostGIS >= 1.1.5) load the PostGIS functions into a template database > called template_postgis. If the template_postgis database exists in your > PostgreSQL installation then it is possible for users and/or applications to > create spatially-enabled databases using a single command. In my case this appears not to be so:               $ createdb -T template_postgis my_spatial_db     createdb: database creation failed: ERROR:  template database "template_postgis" does not exist      In the past I have messed around with copying the primary `gis` database, then deleting the contents of all the tables. There must be a better way. What do you do if you accidentally drop it?


title: Can SQLite and SpatialLite files be linked

text: Coming from a ms-access background, it is common to split up larger applications into several database files. An ms-access database can then access data that is in another database via a linked table. This allows for better information management in many cases. I am wondering if I can do something similar with SpatiaLite/SQLite, for example use Spatialite for the GIS part of projects and a separate SQLite database for the non-spatial components. One of the reasons for doing this would be to hide the Spatialite system tables from the user. The other might be that it simply makes sense to separate datasets into different databases (to maintain a single point of truth, etc). For example, my spatialite database may have a list of plant locations recorded during a field survey but my SQLite database may have a data dictionary with all the plant names for my country (~40 000 species). If linking tables is not something that SQLite does, what is the alternative? Andrew M


title: Applying rules to FrameCloud popups in OpenLayers

text: I have style rules for features that enable the map to display the features based on its rule. For example, the map displays a feature from specific scale. I do this in this way               newRule = new OpenLayers.Rule({         name: 'rulename',         minScaleDenominator: 2000,         maxScaleDenominator: 19000,         filter: someFilter,         symbolizer: someSymbolizer     });      Then add the rule to style and apply the style to features. This lets the map to display the feature from scale 2000 to 19000 and when the map goes out of the set scale then it does not display the features. What I want to do here is, to apply those rules to `FrameCloud Popups`. From what I've found so far, popups cannot have style rules. So I implemented this by registering event `'zoomend'` and let it check whenever zoom level changes so that at certain `zoom level` the map `loops through` all the popups and `hide / show` them. It works just enough but it seems unreliable and hardcoding. I think there should be a better way to achieve this. Please advice me if you know the answer. Thanks in advance :)


title: How to populate Unique ID field after sorting?

text: I am trying to create an new unique id field in a feature class. I already have one field called "SITE_ID_FD", but it is historical. The format of the unique value in that field isn't what our current format is, so I am creating a new field with the new format. Old Format = M001, M002, K003, K004, S005, M006, etc New format = 12001, 12002, 12003, 12004, 12005, 12006, etc I wrote the following script:               fc = r"Z:\test.gdb\testfc"          x = 12001          cursor = arcpy.UpdateCursor(fc)               for row in cursor:         row.setValue("SITE_ID", x)         cursor.updateRow(row)         x+= 1      This works fine, but it populates the new id field based on the default sorting of objectID. I need to sort 2 fields first and then populate the new id field based on that sorting (I want to sort by a field called 'SITE' and then by the old id field "SITE_ID_FD") I tried running the script from the python window in ArcMap after manually sorting the 2 fields in hopes that the python would honor the sort, but it doesn't. I'm not sure how to do this in python. Can anyone suggest a method?


title: How can I migrate from agslib 2.1 to agslib 3.1

text: I have an application which is developed using agslib 2.1. I want to migrate t to agslib3.1. When I use the new library, There is an error in MapManager.mxml code as **_"Call to a possibly undefined method zoomToFullExtent through a reference with static type com.esri.ags.tools:NavigationTool."_** I could not find any updated MapManager.mxml in FlexViewer version 3.1. So I was thinking that maybe I must follow a process for migrating from 2.1 to 3.1. does anybody know how I can migrate my code to use the new library, or any workaround for resolving the issue?


title: Calc bottomline of valleys

text: Which way do I calculate bottomlines of valleys or even more preceise: which way do I "find" valleys (for example suggested tectonic faults). Sample below shows a height profile (profile from line) based on Aster data and it's that I at most want to follow the larger valleys (long arrowed lines). I could go for hydrological methods (even though havent been working with them), but using hydro plugins/tools a small breakthrough to lower areas would cause a runoff, while I want to follow the big valley. Any ideas? --- (edited) To underline my problem, I've just taken a circa bottom line profile of the valley pointed to by the most left arrow in pic-1 (arrow'ed). The intersection is at about 8km of 1st diagramm (with arrows) and at km 35 of second profile. ---- (edited) Just to spread some ideas: Rotating the 1st image arount the center between point 1 an 2 (1st and 2nd arrow, Height Profile) also shows "valleys" with different idth/height ratios, but still significant. * * * QGIS 1.8, Ubuntu, Aster Elev Data ![Profile-1](http://i.stack.imgur.com/rdr9S.jpg) First and second "sharp" valley from left (large arrows) are of most interesting to get the idea. It might help to focus on focusing on strong beeing above/below average. Just an idea :-/ ![Profile-2](http://i.stack.imgur.com/HbdF7.jpg)


title: Are there any rules of thumb for the neighborhood settings in Focal Statistics?

text: In ArcGIS 10, users can define the neighborhood in the Focal statistics tool. The moving window shape can be set to any of the following: Wedge, annulus, circle, rectangle, irregular, and weight. For example purposes, let's assume we want to calculate the mean tree canopy area from a binary classified canopy raster (i.e. 0 = no canopy and 1 = canopy present) at 1 m spatial resolution. Given this example: **Are there any rules of thumb to determine which moving window shape should be used?** **Once you determine the moving window shape, is there way to quantitatively determine the optimal neighborhood settings, or is this entirely subjective?**


title: Multiple versions of GDAL (32bit and 64bit) on same machine

text: I currently have GDAL installed on my Windows 7 64bit workstation. It is the 32bit version. I chose the 32 bit version because I wanted to use the GDAL Python bindings with a 32bit installation of Python (version 2.6 installed with ArcGIS). Would it be possible to also install the 64bit version of GDAL on the same computer so that I can take advantage of more memory and processors when running the GDAL command line utilities?


title: How to prepare layout to print multiple images on a page using Arcgis?

text: I want to print multiple images on a layout page with legends. All image are the same size and same georeferencing. How should I prepare it? Thanks a lot


title: When merging two DEMs, do they have to be in the same pixel bits?

text: I have a simple question. I have 2 different Digital Elevation Modeling (DEM). One is the state DEM and has 30m and has 16 pixel bit. I have a couple of smaller DEM that has 30m but they have 32 pixel bit. I know how to merge them , but in my mind, do the Pixel bits have to be in the same pixel bits for example, 30m 16 pixel bits equal to 30m 16 pixel bits, correct ? Reason for asking this question was because when I am working on a watershed and clipped state 30m 16 bit in half and the other smaller DEM has 30m 32 bits and merge them. I tried to find this on the internet and came nothing.... Thanks


title: Edit Toolbar Became Disabled While Editing in QGIS

text: My edit toolbar became disabled while I was editing a layer in QGIS. I have closed the window and opened it again to edit, but it is still disabled.


title: Sextante "temp" folder?

text: I have a german Windows and the problem is when I'm using sextante tools the log tells me that I have issues with the folder `dokumente und einstellungen` > (C:\Programme\Quantum GIS Lisboa>saga_cmd grid_tools "Reclassify Grid > Values" -INPUT "C:\Dokumente und > Einstellungen\user\sextante\tempdata\1353407599.88104.sgrd" -METHOD 0 -OLD > 129 -NEW 0 -SOPERATOR 0 -MIN 0 -MAX 1 -RNEW 2 -ROPERATOR 0 -RETAB > C:\Dokumente und Einstellungen\user\sextante\tempdata\1353407599.88105.txt > -TOPERATOR 0 -NODATAOPT -NODATA 0 -OTHEROPT -OTHERS 0 -RESULT "C:\Dokumente > und > Einstellungen\user\sextante\tempdata\sagareclassifygridvalues102.tif.sgrd" > **Unexpected parameter 'und'** ) Is it possible to change the temp folder location?


title: Where is the Production Editing Toolbar?

text: I'm having trouble finding the production editing toolbar in arcgis 10.1. Is it part of an add on extension?


title: qgis osx : Openstreetmap Plugin and tags

text: I'm using QGIS and The Openstreetmap Plugin to manage osm files. That plugin is very useful, but limited to a few tags that will be converted into dbf file. I'm looking for a method allowing to add some tags or rename existing in order to manage them easily in the dbf file. I've searched for the author of this cool plugin, but no one came out. Thank you!


title: Ordinary kriging in saga GIS?

text: I'm trying to do ordinary kriging using SAGA 2.0.8 or 2.1.0, I succesfully (I think) created the Grid System by the menu modules>>grid>>construction>>create grid system (adding it to the map there is a red polygon that delimits my point shapefile and I think this is good) but when I run the ordinary kriging algorithm from the menu modules>>geostatistic>>kriging>>without variogram fit>> ordinary kriging the answer of the software is a totally empty grid... Someone can help me? Thanks


title: How to convert PostGis Table (Grid data) to Continuous field using Qgis?

text: I'd like to transform my Gridded Layer (generated form a PostGIS table of points) to a continuous and colored layer. How could I do this with Qgis or any other program? Many thanks and best regards, Rafa!


title: OpenLayers: Properly use a WMS layer to display a TMS layer from a different server

text: I have two servers: the first server is 177 and that has a html file with the TMS layer. We will call this tms_layer.html and it has your init function with this in there:               var tmsoverlay = new OpenLayers.Layer.TMS( "TMS Overlay", "",       {         serviceVersion: '.', layername: '.', alpha: true, type: 'JPG', getURL:            overlay_getTileURL, isBaseLayer: true       });      When i go to 177/tms_layer.html the tiles are being correctly displayed. So that is working fine. **Now, I want to serve that tms_layer.html file on a different server (server 190)** , and I have been trying to serve it as a WMS layer. Not sure if WMS is the best approach but I think it is. Correct me if I'm wrong. We'll call this tiles_revision1.html and within the init function I currently have:               layer = new OpenLayers.Layer.WMS( "My TMS layer in WMS",       "http://177/dev/tiles/tiles_1a.html", {layers: ['tmsoverlay'], transparent: "true", format: "image/jpg"} );     map.addLayer(layer);      For the `layers: []` do I even need to reference this since it's just a bunch of jpgs making up the tile(s)/map? Leaving it blank has not done anything. With the above code I currently get a blank OL map, see here (When I pan around the map I get a Uncaught TypeError: cannot read property 'wrapDateLine' of null. I don't think that is the root of my issue though): ![](http://i.stack.imgur.com/QHCxd.png) **Edit** : the most important thing here is to be able to access those 177 tiles from anywhere as a baselayer. There is quite a few associated jpgs, and the `tms_layer.html` file is pretty beefy on its own. What is the correct way to do this?


title: How to Edit custom help in ArcGIS ModelBuilder?

text: I have created a model in ArcGIS model-builder with a certain number of layers specified as parameters. When I launch the model from the tool-box, I would like to edit the information in the right hand panel (and replace "no description"). That way I can give information to the users using the model. Do you know how I can edit that part? Regards,


title: Function of query.Like

text: I was wondering how ESRI's query.Text works. From what I read, it is basically the shorthand for the LIKE SQL statement, but it is not working. Maybe I am misunderstanding it's use? Any help is appreciated.


title: How to install PyWPS on Ubuntu?

text: Since PyWPS is not yet packaged for Ubuntu an installation guide would be handy. This guide should target a vanilla Ubuntu LTS install, detailing the required dependencies.


title: How to find all possible paths by Postgis / Pgrout

text: There are functions available to find the shortest paths in Postgis / Pgrouting extension. But is it possible to find all the possible paths between two points/nodes ? Is there any such function available ? One thing which which surprised me was that posgis must have analysed all the possible before returning the shortest path. So is the API has not been exposed?


title: Add junction to a line which has not intersect with other lines

text: In the process of making network analyst , some lines do not have junctions since they do not intersect with others. Is this possible to give a line junction ( something like adding vertices in digitizing) when the line is changing direction ? Like the image below : ![enter image description here](http://i.stack.imgur.com/LKsQQ.jpg)


title: How to I find the nearest line to a point?

text: I am new to building custom ArcObjects, and am looking for a custom python script for arcgis version 10 that will loop through a point shapefile to find the nearest line segment of a line shapefile (or multiple if possible) and add the 'NAME' attribute from the line shapefile to a new 'STREET' attribute in the point shapefile. Thank you for any help.


title: Contours exported from ArcGIS to DXF yield an extremely large file. Is there an alternative?

text: I am exporting elevation contours from ArcGIS to a DXF file so that I can FTP the result to another office. The resulting file is extremely large. When export the same contours to a shapefile (from file geodatabase) it not only takes a fraction of the processing time but is 6x smaller in size then the DXF file. This is only the major contours, I still need to create a DXF file from the minor contours and the process is crashing all together. I need to deliver the contours in DXF format. I tried compressing the file but it is still too large. Is there another way?


title: How to find nearest neighbors between two tables with point locations in SpatiaLite?

text: I have started playing with SpatiaLite today and already stumbled upon a problem. For each point location stored in tableOne I would like to select one, nearest (linear distance) point from tableTwo. So far I came up with a clumsy solution that utilizes VIEW:               CREATE VIEW testview AS      SELECT      A.id ,      B.myValue,      Distance(A.Geometry, B.Geometry) AS distance     FROM tableOne AS A, tableTwo AS B     WHERE distance < 10000     ORDER BY A.Id, distance;      And then:               SELECT * FROM testview     WHERE distance = (SELECT MIN(distance) FROM testview AS t WHERE t.id = testview.id)      seems to do the job. Two questions: Is there a way to perform such query without creating a VIEW? Is there any other way to optimize this query for better performance? In a real world scenario tableOne will have hundreds-couple thousands records, and tableTwo - 1.3 million.


title: Creating shapefile of satellite image footprints?

text: I'm looking for a tool or a workflow to compute satellite image footprints, for a large number of images across directories, and produce a shapefile. Ideal work flow would be:   * fire up tool   * point to a directory and provide file mask   * the tool browses directory and sub-directories and compute footprints   * the tool produces a shapefile with a polygon for each footprint and pre-selected attributes It would preferably be Esri or ERDAS based, but not necessarily.


title: Cropping an image with a map extent

text: I have an raster file in my server space, which has the same projection as my webmap, and I would like to crop the image by passing the visible extent of a webmap. I think the cropping function is easily possible via a python script server side, but the process of converting the map envelope coordinates to a bounding box the script could use to cut the image to that exact extent is beyond me at the moment. Any ideas, methods, or general roadmap would be helpful. In a nutshell, I am trying to reproduce the "export" functionality of an ESRI map service without using ArcServer. Like this: http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/export?bbox=-9562211.80152863,4584479.44244939,-9519931.21541649,4626760.02856153&size=1024,1024&format=jpg&imageSR=102100&bboxSR=102100&f=image Am I crazy or what?


title: Google Map API and OS Opendata in QGIS

text: I'm new to gis and having problems with matching reference systems for my two data sources. I have downloaded some OS Vectormap data which I believe is in 27700.. And I have some longitude and latitudes from the Google maps API which I have inserted into a geometry column in a postgres database using the function ST_GeomFromText('POINT(lat-from-google, long-from-google)', 27700). When I bring both of these sources into Qgis they do not align. Not as I would expect anyway. Is there a transformation I should do before insertion into the database?


title: Why sometimes Network Analyst can not find the shortest or the best route?

text: Normally in Network analyst and route detection it has to find the shortest and efficient way.But here in my work I can see that it does not find the best choice.I wonder why it chose the longer path ? I have to mention that I am working on geological part of an area and I want to know the shortest connection between available fractures! Would it be because lots of vertices? or anything is wrong there that it cannot solve the route? Below you can see one of the examples of my project! ![enter image description here](http://i.stack.imgur.com/N3MxK.jpg)


title: Multithreading in Arcpy

text: I am learning multithreading and thinking about using it with Arcpy. The example I am working on doesn't have much practical reasons. However, I don't know why it fails on the line "arcpy.Exists(fcPath):" even though the SDE is running and the feature class in question is accessible in ArcCatalog. It didn't help if I used env.workspace. Any thought or suggestion would be appreciated.               import threading     import arcpy     from arcpy import env          def tf(conn_string):         global tTotal         #env.workspace = conn_string         fcName = r"GIS_USER.TEST_FC"         fcPath = conn_string + "\\" + fcName         if arcpy.Exists(fcPath):             threadLock.acquire()             tTotal += 1             threadLock.release()                else:             print('%d: failed to connect to %s'%(tTotal, conn_string))          def mt(conn_string, step):          global tTotal          thread_list = []              for num in range(step):             t = threading.Thread(target=tf, args=(conn_string,))             thread_list.append(t)             t.start()              for t in thread_list:              t.join()              print "total = %d"%tTotal              tTotal = 0     conn_string = r"C:\test_conn.sde"     threadLock = threading.Lock()     mt(conn_string, 5)


title: Arcpy add and calculate fields for features in a list

text: I have a script I am working on and am hitting a runtime error. I am attempting to create a list of all of the shapefiles within a root directory, then add a field to each shapefile and calculate it with the shapefile name. I am able to generate the list (converted from a dictionary) but when I attempt to add the field I encounter the error.               def main():         try:             import arcpy, sys, traceback, os, glob             arcpy.env.overwriteOutput = True             masterFolder = r"Q:\\GIS\\Field_Data\\MT"             outputFolder = r"C:\tmp\Shp_merged"                  #collect a list of subfolders in master folder             subfolderLst = os.listdir(masterFolder)                  #declare a dictionary where a key will be shapefile name             #... and value a list of pathes to shapefile with this name in all subfolders             shpDict = {}                  #loop through all subfolders             for subfolder in subfolderLst:                 #check current subfolder and make a list of pathes to each .shp file                 shpLst = glob.glob(os.path.join(masterFolder,subfolder,'*.shp'))                      #add each shapefile path to dictionary                 for shpPath in shpLst:                     shpName = os.path.basename(shpPath)                          if not shpName in shpDict:                         shpDict[shpName] = []                         shpDict[shpName].append(shpPath)                          else:                         shpDict[shpName].append(shpPath)                  shpDict = shpDict.values()                  print shpDict             for fc in shpDict:               arcpy.AddField_management(fc, 'shpname','text')               arcpy.CalculateField_management(fc, 'shpname', '"'+fc+'"'+ time.strftime('%m_%d_%y'))         #arcpy.Merge_management(fcs, 'out.shp')                   except:             print arcpy.GetMessages()             # Get the traceback object  '"' + wildcard + '"'             tb = sys.exc_info()[2]             tbinfo = traceback.format_tb(tb)[0]                  # Concatenate information together concerning the error into a             #   message string             pymsg = tbinfo + "\n" + str(sys.exc_type)+ ": " + str(sys.exc_value)                  # Return python error messages for use with a script tool             arcpy.AddError(pymsg)                  # Print Python error messages for use in Python/PythonWin             print pymsg          if __name__ == '__main__':         main()      The list generated looks like this:               [['Q:\\\\GIS\\\\Field_Data\\\\MT\\023N052E\\Points.shp', 'Q:\\\\GIS\\\\Field_Data\\\\MT\\023N053E\\Points.shp', 'Q:\\\\GIS\\\\Field_Data\\\\MT\\024N052E\\Points.shp']]]      and the error:               File "P:\Scripts\scratch\scratch.py", line 45, in main         arcpy.AddField_management(fc, 'shpname','text')          <type 'exceptions.RuntimeError'>: Object: Error in executing tool      I think it has to do with cursors but being a novice I have no idea how to resolve the problem Thanks


title: problem with saving to esri file

text: I was using Wroclaw 1.7/GDAL 1.9(earlier release)/Grass 6.4/GSL 1.15-2 and started getting the following message when saving any item to esri format. "Export to vector file failed. Error: creation of layer failed (OGR error:Failed to open Shape DBF file `/Users/jes....dbf)" And when I look for the file/sibling files, the dbf is not there. I just updated everything QGIS 1.8/GDAL 1.9 (December, 3 2012)/Grass 6.4.2. Still getting the same message with any feature that I save. What can I do to fix this asap?


title: How to programatically replace ArcGIS Online image with new imagery in mxd's?

text: I have many mxds that previously used ArcGIS Online Bing imagery. I want to replace those with newly purchased imagery. I know I need to use the `arcpy.mapping.MapDocument` module to do this though not sure how. However when I try to identify the source for the online imagery it is listed as 'source unknown'. Script snippet below shows how I am trying to identify sources in each mxd which I am writing to a .csv               for map in mxd_list:     mxd = arcpy.mapping.MapDocument(map)     layers = arcpy.mapping.ListLayers(mxd, '*')     for i in layers:         try:             ds = i.dataSource         except:             ds = 'source unknown'         writer.writerow([map, i.name,  ds ])


title: No building and Point of interest available while setting up "Rendering Osm Data Ubuntu using MAPSERVER"

text: I have followed RenderingOsmDataUbuntu 10.10 and set up Google styled web map using **mapserver**. The **osm-google.map** seems to be **not** using table **osm_new_buildings**. Also **no** POI (Point of interest) data is seems to be imported from the OSM file. How can I add both?


title: Export Symbology to TAB, or MIF

text: I'm wondering if the TAB or the MIF export from QGIS keeps the symbology applied within the Project. Are there siginificant items that don't translate to MapInfo? I'm specifically trying to export Polygon SHP files with a specific symbology, but I'm also wondering if I can export labeling, or text to MapInfo... Thanks


title: Sharding of geospatial data

text: Reading through Rosenberg & Mateos' **_The Cloud at Your Service_** I stumbled upon the concept of database sharding. Authors point out to several advantages of such approach including high (online) availability, faster queries, handling higher user loads and better parallelization (they also warn of potential pitfalls!) Is sharding used in geospatial world? What are the applications? Advantages? Disatvantages?


title: What will happen when Russia shuts down the GPS stations?

text: Russian officials are seriously talking about shutting down US GPS ground stations within their borders and Deputy Prime Minister of Russia tweeted on the subject. What will happen to the GPS? My assumption would be that its accuracy will get worse, at least in some parts of the globe. If it is correct, then where, and by how much exactly? I have previously posted this question on physics.stackexchange.com and here are two answers I have received there. They seem to be a little contradictory, though. > Kyle Kanos:   >  Usually ground stations are alternative points for a 3rd/4th signal since > it is a fixed (known) location. Russia, at least in the 90s, didn't have a > way to connect to the 24 satellites & depended on the stations; I doubt that > they are of any use anymore given GLONASS > > user6972:   >  There are two types of GPS ground stations for the USA system. Main > stations about 5 around the world provide corrections to timing data due to > relativistic effects, clock drift, ephemeris, or ionospheric delays that are > timing constants rebroadcast by the satellites to receivers for corrections. > The types of stations in Russia are for augmented gps called Global-DGPS . > DGPS improves local GPS accuracy from about 3m to 10 cm. However this lack > of support in Russia's areas only effects civilian use of the US system in > those areas. The Chinese, EU, and Russian systems won't be effected. > > "Employing a large ground network of real-time reference receivers, > innovative network architecture, and award-winning real-time data processing > software, the GDGPS System provides decimeter (10 cm) positioning accuracy > and sub-nanosecond time transfer accuracy anywhere in the world, on the > ground, in the air, and in space, independent of local infrastructure." > (gdgps.net)


title: How to make DTM Qgis-grass

text: Good evening, I need help. Should I create a dtm of an area in the province of Vicenza. It 's the first time I try, I tried the tutorials on the Internet but I could not understand how to do it. Could you suggest me the steps to do? The file has the following header: ncols 1326   nrows 1151   xllcorner 1687082   yllcorner 5091253   cellsize 5   NODATA_value -9999   953.403 953.1417 952.8805 952.6193 952.3698 952.143 951.9162 951.9333 951.9962 951.974 951.8546 951.8008 951.8237 951.8466 952.111 952.3314 952.4512 952.5846 952.718 952.733 952.379 951.8503 951.3278 950.7488 950.103 949.2875 948.44 thank you very much Filippo


title: Examples of building-level geovisualization

text: I have recently stumbled upon a presentation and paper by Duncan Smith exploring geovisualization of 2001 area classification of output areas using building level resolution of urban area (London in this example). ![enter image description here](http://i.stack.imgur.com/daqjU.jpg) Two questions: Could you point me to any other examples of such applications using social/economic/health data? What are the advantages and disadvantages of your examples?


title: Determine Transect line to cover area

text: I'm near certain this is a solved problem, but I haven't been able to find a solution from searches so here's my situation (probably I'm searching the wrong thing)... I need to compute the (optimal/minimal length) line to which covers an entire area. The line has bends separated by some distance less than `max_transact_distance` such that the entire area is sample-able from the transects. Hypothetical and possible path > Bob is searching for treasure in a park with a metal detector, the swath > width is 5m so that is the maximal distance between transects. ![enter image description here](http://i.stack.imgur.com/bFDSl.png) The problem can become pretty intricate when we consider that their may be obstacles in the shape or it may be more complex shape (for future consideration). I am comfortable with arcpy but would rather use an existing solution. If theres a solution for the problem ArcGIS/QGIS/etc that would be extremely helpful either for reference or use. The envisioned steps are something like:   * take shape file of coverage area feature   * Determine the main axis as `x` or `y`   * Create a collection of points   * Choose a start point less than `max_transact_distance` from edge of coverage   * Do some math, create point that satisfies the requirements   * Connect the dots   * Produce the new feature class


title: Line bearing for wind direction for plume of smoke QGIS

text: I'm trying to draw a line representing direction of a plume of smoke for an emergency planning scenario in QGIS. The line needs to be 5km in length and have a bearing of 85 degrees. The closest I have found to achieve this is the CAD like drawing plug-in but this uses angles rather than compass bearings, so 180 degrees would be pointing west rather than south and vice verse. Is there a tool to draw lines using compass angles and ideally length? Thanks.


title: How to create a loop in R to average ndvi raster time series?

text: I have monthly ndvi raster geotiffs for multiple years. I need to run a loop to get the average of each of these ndvi grids/rasters. > Each of my ndvi rasters contains 143 pixels. I would like the mean of all > the pixels within a raster across my time series. Can someone offer any advice?


title: What can I do with lidar returns of 6 or greater in LAS 1.2 specification?

text: I have lidar LAS data that contains a number of points that represent returns 6 or 7. The data is supposed to be in ASPRS LAS 1.2 specification, which does not allow return numbers (echos) greater than 5. With returns of 6 and 7, my data is not 1.2 spec compliant. For all of you point cloud junkies, what are my options to get the data into 1.2 compliance, without deteriorating its integrity? **EDIT:** LiDAR Sensor: Riegl LMS_Q680i Recording Software: Riegl Ri-Acquire Raw Data Processing Software: Riegl RiANALYZE 6.0.2 (build: 2013-12-04) Screen cap showing header of sample data with lasinfo ![enter image description here](http://i.stack.imgur.com/FUjYX.jpg)


title: Using an image file as a placemark in qgis

text: I am making a map of sports clubs in London. I have each club's crest as image files (tiff) and want to make the placemark symbol using these images. I know it's possible to upload images in the SVG format. The problem is I can't find a way of converting the tiff files to svg that gives satisfying results (crests are quite intricate at times). Is there a way of adding tiff files (or png for that matter) as placemark symbols? Alternatively does anyone know of a satisfactory way of changing raster images to svg? Might there be an alternative way of doing this (an additional plugin maybe)? Thanks in advance for any help!


title: How to find overlapping polygons within a multipolygon (oracle spatial)

text: I am working with Oracle spatial and have a table with MULTIPOLYGONS. How can I find the db entries where the polygons of a multipolygon overlap - within the same geometry? So, a function that checks the polygons of a multipolygon for overlapping. I found several examples how to compare polygons in order to find overlapping polygons stored in a different row or in a different table:               SELECT *     FROM       GEOTAB TabA, GEOTAB TabB     WHERE       TabA.ID = 1234       and       SDO_OVERLAPS(TabA.GEOM,  TabA.GEOM) = 'TRUE'      but what I need is something like:               Select * FROM GEOTAB where SDO_OVERLAPSINTERNAL(GEOM) = 'TRUE'      Greetings, D3


title: How to embed a coordinate pair within URL to search OpenStreetMap, Google, Yahoo or Bing Maps

text: Is there a way to embed a latitude longitude coordinate pair within a url link to search for a location on either OpenStreetMap, Google and/or Bing Maps? I'd like to use the url link within Excel, LibreOffice and within an html pages. I have tables with coordinates that I'd like to configure with a link to show its location on a map, without building an online mapping application. If not, then is there a simple javascript that I can encapsulate the coordinate within and fetch that from OpenStreetMap, Google and/or Bing Maps? It seems like the url would be something like the following, but I can't get this to work: http://www.openstreetmap.org/?30.486,-90.195


title: OpenLayers WMS to Leaflet with EPSG:2170 projection

text: This is the original code for OpenLayers 2                       var res = [                 1000.0 / 4.0,                 1000.0 / 8.0,                 1000.0 / 16.0,                 1000.0 / 32.0,                 1000.0 / 64.0,                 1000.0 / 128.0,                 1000.0 / 256.0,                 1000.0 / 512.0,                 1000.0 / 1024.0,                 1000.0 / 2048.0             ];                  var extent = new OpenLayers.Bounds(256000, 0, 640000, 256000);             var mapOptions = {                 controls: [                     new OpenLayers.Control.Navigation(),                     new OpenLayers.Control.PanZoomBar(),                     new OpenLayers.Control.ScaleLine(),                     new OpenLayers.Control.MousePosition(),                     new OpenLayers.Control.KeyboardDefaults()                 ],                 resolutions: res,                 units: "m",                 projection: "EPSG:2170",                 maxExtent: extent             };             map = new OpenLayers.Map('map', mapOptions);             map.setOptions({                 restrictedExtent: extent             });                  layer_dof = new OpenLayers.Layer.WMS("Slovene Ortophoto Images",                 "http://gis3d.urszr.si/pds/wms", {                     layers: "slo-gkr",                     format: "image/jpeg",                     srs: "EPSG:2170"                 }, {                     tileSize: new OpenLayers.Size(512, 512),                     resolutions: res                 });      Now, converting that straight to Leaflet doesn't work:                   var res = [             1000.0 / 4.0,             1000.0 / 8.0,             1000.0 / 16.0,             1000.0 / 32.0,             1000.0 / 64.0,             1000.0 / 128.0,             1000.0 / 256.0,             1000.0 / 512.0,             1000.0 / 1024.0,             1000.0 / 2048.0         ];              var EPSG_2170 = new L.Proj.CRS(             'EPSG:2170',              '+proj=tmerc +lat_0=0 +lon_0=15 +k=0.9999 +x_0=500000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs', {                 resolutions: res,                 //origin: [-640000, -256000]             }              urszr = L.tileLayer.wms("http://gis3d.urszr.si/pds/wms", {             layers: 'dtk-gkr',             format: 'image/jpeg',             attribution: "URSZR",             crs: EPSG_2170,             tileSize: 512,             transparent: false,         });      The projected coordinates are way off, and as far as I managed to figure this out is that the offset is defined in OpenLayers map extent:                       var extent = new OpenLayers.Bounds(256000, 0, 640000, 256000);      The coordinates in this projection start with zero, but the bounding box on Spatial Reference for this projection is               372543.8943, 5034152.5582, 631496.6208, 5197602.9212      **I'm stumped. What's wrong? How do I correctly configure this projection in Leaflet?** The original site done in OpenLayers is here: http://spin.sos112.si/SPIN2/Javno/               Source: view-source:http://spin.sos112.si/SPIN2/Javno/GIS/GraficniPrikaz.aspx


title: GML v3 loading with OpenLayers

text: I rewrote the question to be more readable:   * I saw GML format is just a little more 'evolved' than KML. Am I right? Which format is to be considered more standard, more supported and convenient to invest more on?   * I tried the example here (http://openlayers.org/dev/examples/vector-formats.html) trying to load a GML v3 circle defined like this:              <gml:featureMember xmlns:gml="http://www.opengis.net/gml"     xsi:schemaLocation="http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd"     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">     <feature:feature xmlns:feature="http://example.com/feature">         <feature:geometry>             <gml:CircleByCenterPoint>                 <gml:pos>11.979491114616 43.847170472145</gml:pos>                 <gml:radius uom="km">25</gml:radius>             </gml:CircleByCenterPoint>         </feature:geometry>     </feature:feature> </gml:featureMember>      the example program is not able to load this. It seems a limitation of OpenLayers library in general that is not able to properly load some kind of GML files, or what? Am I specifying an invalid GML xml string? Do you know about some limitation on supporting some advanced features of the GML format in OpenLayers?   * The GML v3 type on OpenLayers has only the possibility to load a GML v3 file passing the xml string via the read() method and not specifying the file to be loaded from the server using a HTTPProtocolOptions. Why this? Is there a way which I haven't understood?   * Do you have some working GML file examples which use relative coordinates? Thanks.


title: How to solve the "Undefined symbols in librouting.dylib" issue on Mac Os X?

text: I'm trying to create a Homebrew formula to let anybody install pgrouting on his or her mac. I've seen this question: How to fix pgRouting librouting_dd.so: undefined symbol error? I'm also following this documentation: http://www.pgrouting.org/docs/1.x/install_freebsd.html I'm copy-pasting the whole message here:               ==> Installing pgrouting     ==> Downloading http://download.osgeo.org/pgrouting/source/pgrouting-1.05.tar.gz     File already downloaded in /Users/ca/Library/Caches/Homebrew     /usr/bin/tar xf /Users/ca/Library/Caches/Homebrew/pgrouting-1.05.tar.gz     ==> Downloading patches     /usr/bin/curl -f#LA Homebrew 0.8 (Ruby 1.8.7-174; Mac OS X 10.6.8) https://gist.github.com/raw/1271301/d3c4db0d2ed68b2e9dd72289b73eecabbc2429b5/pgrouting-mac-os-x.patch -o 001-homebrew.diff     ######################################################################## 100.0%     ==> Patching     /usr/bin/patch -f -p1 -i 001-homebrew.diff     patching file core/src/edge_visitors.hpp     patching file core/src/shooting_star_boost_wrapper.cpp     patching file core/src/shooting_star_relax.hpp     ==> cmake . -DCMAKE_INSTALL_PREFIX='/usr/local/Cellar/pgrouting/1.05' -DCMAKE_BUILD_TYPE=None -Wno-dev -DPOSTGRESQL_INCLUDE_DIR='/usr/local/Cellar/postgresql/9.0.4/include/server/' -DBoost_INCLUDE_DIR='/usr/local/Cellar/boost/1.47.0/include/boost/'     cmake . -DCMAKE_INSTALL_PREFIX='/usr/local/Cellar/pgrouting/1.05' -DCMAKE_BUILD_TYPE=None -Wno-dev -DPOSTGRESQL_INCLUDE_DIR='/usr/local/Cellar/postgresql/9.0.4/include/server/' -DBoost_INCLUDE_DIR='/usr/local/Cellar/boost/1.47.0/include/boost/'      -- The C compiler identification is GNU     -- The CXX compiler identification is GNU     -- Checking whether C compiler has -isysroot     -- Checking whether C compiler has -isysroot - yes     -- Checking whether C compiler supports OSX deployment target flag     -- Checking whether C compiler supports OSX deployment target flag - yes     -- Check for working C compiler: /usr/bin/gcc-4.2     -- Check for working C compiler: /usr/bin/gcc-4.2 -- works     -- Detecting C compiler ABI info     -- Detecting C compiler ABI info - done     -- Checking whether CXX compiler has -isysroot     -- Checking whether CXX compiler has -isysroot - yes     -- Checking whether CXX compiler supports OSX deployment target flag     -- Checking whether CXX compiler supports OSX deployment target flag - yes     -- Check for working CXX compiler: /usr/bin/g++-4.2     -- Check for working CXX compiler: /usr/bin/g++-4.2 -- works     -- Detecting CXX compiler ABI info     -- Detecting CXX compiler ABI info - done     -- Found PostgreSQL: /usr/local/Cellar/postgresql/9.0.4/include/server, /usr/local/lib/libpq.dylib     Boost headers were found here: /usr/local/Cellar/boost/1.47.0/include/boost/     Output directory for libraries is set to /usr/local/Cellar/postgresql/9.0.4/lib     -- Found PGROUTING_CORE core: /tmp/homebrew-pgrouting-1.05-OhBx/pgrouting-1.05/core/src     Installation directory for libraries is set to /usr/local/Cellar/postgresql/9.0.4/lib and for SQL files is set to /usr/share/postlbs     -- Configuring done     -- Generating done     -- Build files have been written to: /tmp/homebrew-pgrouting-1.05-OhBx/pgrouting-1.05     ==> make     make      Scanning dependencies of target routing     [ 16%] [ 33%] Building C object core/src/CMakeFiles/routing.dir/astar.o     Building C object core/src/CMakeFiles/routing.dir/dijkstra.o     [ 50%] Building C object core/src/CMakeFiles/routing.dir/shooting_star.o     [ 66%] Building CXX object core/src/CMakeFiles/routing.dir/boost_wrapper.o     [ 83%] Building CXX object core/src/CMakeFiles/routing.dir/astar_boost_wrapper.o     [100%] Building CXX object core/src/CMakeFiles/routing.dir/shooting_star_boost_wrapper.o     Linking CXX shared library ../../lib/librouting.dylib     Undefined symbols:       "_SPI_freetuptable", referenced from:           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o       "_heap_formtuple", referenced from:           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o       "_elog_start", referenced from:           _finish in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _finish in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _finish in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o       "_pfree", referenced from:           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o       "_Float8GetDatum", referenced from:           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o       "_init_MultiFuncCall", referenced from:           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o       "_BlessTupleDesc", referenced from:           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o       "_SPI_prepare", referenced from:           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o       "_SPI_fnumber", referenced from:           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o       "_MemoryContextAlloc", referenced from:           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o       "_errmsg", referenced from:           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o       "_repalloc", referenced from:           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o       "_end_MultiFuncCall", referenced from:           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o       "_SPI_getvalue", referenced from:           _shortest_path_shooting_star in shooting_star.o       "_per_MultiFuncCall", referenced from:           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o       "_errstart", referenced from:           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o       "_SPI_cursor_fetch", referenced from:           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o       "_SPI_gettypeid", referenced from:           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o       "_SPI_cursor_open", referenced from:           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o       "_SPI_getbinval", referenced from:           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o       "_errfinish", referenced from:           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o       "_SPI_finish", referenced from:           _finish in dijkstra.o           _finish in astar.o           _finish in shooting_star.o       "_RelationNameGetTupleDesc", referenced from:           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o       "_CurrentMemoryContext", referenced from:           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o       "_SPI_connect", referenced from:           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o       "_elog_finish", referenced from:           _finish in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _finish in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _finish in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o       "_errcode", referenced from:           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o       "_DatumGetFloat8", referenced from:           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o       "_SPI_tuptable", referenced from:           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o       "_pg_detoast_datum", referenced from:           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o       "_SPI_processed", referenced from:           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o     ld: symbol(s) not found     collect2: ld returned 1 exit status     make[2]: *** [lib/librouting.dylib] Error 1     make[1]: *** [core/src/CMakeFiles/routing.dir/all] Error 2     make: *** [all] Error 2     ==> Exit Status: 2     http://github.com/mxcl/homebrew/blob/master/Library/Formula/pgrouting.rb#L18     ==> Environment     HOMEBREW_VERSION: 0.8     HEAD: f2acf83b0e0f344b89411fb884af5dfaacf890eb     HOMEBREW_PREFIX: /usr/local     HOMEBREW_CELLAR: /usr/local/Cellar     HOMEBREW_REPOSITORY: /usr/local     HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew     Hardware: dual-core 64-bit penryn     OS X: 10.6.8     Kernel Architecture: i386     Ruby: 1.8.7-174     /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby     Xcode: 3.2.6     GCC-4.0: build 5494      GCC-4.2: build 5666      LLVM: build 2335      MacPorts or Fink? false     X11 installed? true     ==> Build Flags     CC: /usr/bin/gcc-4.2     CXX: /usr/bin/g++-4.2     LD: /usr/bin/gcc-4.2     CFLAGS: -O3 -march=core2 -msse4.1 -w -pipe     CXXFLAGS: -O3 -march=core2 -msse4.1 -w -pipe     CPPFLAGS: -I/usr/local/Cellar/readline/6.2.1/include     LDFLAGS: -L/usr/local/Cellar/readline/6.2.1/lib     MAKEFLAGS: -j2     PKG_CONFIG_PATH: /usr/local/Cellar/readline/6.2.1/lib/pkgconfig          Error: Failed executing: make      If `brew doctor' does not help diagnose the issue, please report the bug:         https://github.com/mxcl/homebrew/wiki/checklist-before-filing-a-new-issue      Thanks for your help! * * * For those interested, you can checkout my Homebrew fork here: https://github.com/charlax/homebrew I have added two formulas: pgrouting and gaul. Hope that helps! If everything's right, you should be able to install pgrouting like this (you need to add my two formulas before):               $ brew install pgrouting