How to import DGN geometry into a file geodatabase?

Specifically, I have an empty File GeoDatabase template consisting of several Group Layers, each containing several Feature Classes. In fact each FC has several subtypes exposed by including a .lyr file in ArcMap. I want to extract the basic polygon geometry data from a dgn, and insert this geometry for each feature into one of the FCs in my FGDB. This is what I have got so far: I can import dgn data using `arcpy.CADToGeodatabase_conversion()`, but this only creates a new CAD dataset in the FGDB alongside my group layers. In ArcMap, by opening the attribute table on the Polygon FC in the new CAD dataset, I can see the fields I want (Shape, Shape_Length, Shape_Area), and I SUPPOSE I need to apply `SearchCursor()` and `InsertCursor()` to copy each geometry object to the correct FC in the FGDB. How would the code look to do this? Is there a slicker way to read dgn geometry objects into an existing FGDB feature class?


Why is it that QGIS shows only one attribute table on all layers?

I have checked the "Select Single Feature" before clicking the Attribute Table but even if I choose a different layer, only one attribute table is shown.


OpenLayers + GeoJSON from a django server does not display features

I'm having trouble with the vector layer for my little project, here's the snippet of the javascript block               var map;             function init(){                 map = new OpenLayers.Map('map', {                   projection: new OpenLayers.Projection("EPSG:3857")                 });                 var osm_layer = new OpenLayers.Layer.OSM("OpenStreetMap");                 map.addLayer(osm_layer);                      var path_layer = new OpenLayers.Layer.Vector("Path Layer", {                       projection: "EPSG:4326",                       strategies: [new OpenLayers.Strategy.Fixed()],                       protocol: new OpenLayers.Protocol.HTTP({                       url: "{% url 'path_json' route.id %}",                       format: new OpenLayers.Format.GeoJSON()                     })                     });                 map.addControl(new OpenLayers.Control.LayerSwitcher());                 map.addLayer(path_layer);                 map.setCenter(                 new OpenLayers.LonLat(121.032, 14.594).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject()), 12);                 if(!map.getCenter()){                     map.zoomToMaxExtent();                 }             }      and here's the view that responds with the GeoJSON object:               def get_path_json(request, route_id):         route = get_object_or_404(Route, pk=route_id)         geoj = GeoJSON.GeoJSON()         path = route.path.all()              path_format = Django.Django(geodjango="path", properties=['mode'])         path_json = geoj.encode(path_format.decode(path))              return HttpResponse(path_json, content_type="application/json")      the object is parsed in geoJSON format via vectorformats. so.. what am i doing wrong? or am i missing something? The map displays but the vector layer doesn't have the features described in the GeoJSON?


How to import GEBCO bathymetry into QGIS?

I'm experiencing problems with the import of bathymetry data in QGIS, which I downloaded freely from GEBCO or NOAA. The problem is that if I import the grid (either with .nc or .asc extension, or if I extract it as geotiff), I simply get a grey map with very faint or no differentiation in depth. Does anybody know what the problem is? Are there are other free sources to get bathymetry data from? Thanks! ellen


How to make labels' size relative to the map in QGIS1.8?

I want to make my labels' size changed automatically with the scale of the map,so in the menu of "Layer labeling settings",I set the Text size" in map Unit".However,the labels in the selected layer disappeared.I turned off the "Scale-based visibility" and tried to set the size from 0.05 to 2000,but the labels still refused to meet me :P What should I do? ![enter image description here](http://i.stack.imgur.com/dwPP8.png) ![enter image description here](http://i.stack.imgur.com/mud9A.png)


Populating D3 Graph with Cartodb

I have been looking at D3 and following along with their basic tutorials. In the documentation you can use json files to create graphs, however I am confused on how to make the connection from my cartodb query, to the input of D3. To clarify I have made a successful query to my cartodb table and returned those results from there I need make a connection from my returned json query to D3.                 var sql = new cartodb.SQL({ user: 'ceigis' });     sql.execute("SELECT status, COUNT(status) FROM deldot_rail_crossing GROUP BY status")       .done(function(data) {         for (var i = 0; i < data.total_rows; i++) {           $('#content').append("
" + data.rows[i].status + "" +  data.rows[i].count+ "

"); ///This was just to test if my json query was correct           //Making the Connection from my query to D3 is where I am struggling                   d3.json("data.json", function(json) {      I am ultimately trying to create a simple pie graph of how many records fall within 4 different statuses. **UPDATE** : I was able to get a working pie chart. One of my problems was passing json object instead of an array.code posted below.. hope this helps out others               function init(){     var w = 1000;     var h = 1000;     var r = 200;     var color = d3.scale.ordinal()         .range(["#98abc5", "#8a89a6", "#7b6888", "#6b486b", "#a05d56", "#d0743c"]);          var sql = new cartodb.SQL({ user: 'igis' });     sql.execute("SELECT status, COUNT(status) FROM rail_ing GROUP BY status")             .done(function(data) {                 for (var i = 0; i < data.total_rows; i++) {                     var data = data.rows;                 }                    var canvas = d3.select("body").append("svg")                 .attr("width", w)                 .attr("height", h);                  var group= canvas.append("g")                 .attr("transform", "translate(300,300)");                       var arc = d3.svg.arc()                            .outerRadius(r)                 .innerRadius(0);                  var pie = d3.layout.pie()                          .value(function(d) { return d.count; });                  var arcs = group.selectAll(".arc")                 .data(pie(data))                 .enter()                 .append("g")                 .attr("class", "arc");                  arcs.append("path")             .attr("d",arc)             .attr("fill", function (d) { return color (d.data.status); });                  arcs.append("text")             .attr("transform", function (d) { return "translate(" +                           arc.centroid(d) + ")";})                 .attr("text-anchor", "middle")                 .attr("font-size", "1em")                 .text (function (d) {return d.data.status;});                  });        }


How to label GeoJSON polygons?

I'm using Leaflet combined with GeoJSON features. Is there a way to label GeoJSON features (in this case - polygons)? It should get labels from               feature.properties.name       This is my code where I think I could insert label:               function style(feature) {                 return {                     weight: 2,                     opacity: 1,                     color: 'white',                     dashArray: '3',                     fillOpacity: 0.7,                     fillColor: getColor(feature.properties.coloring)                 };             }


Simulating the expansion of polygon features

I've got what I'm hoping will be an interesting question. I'm working on an assignment for an intro to GIS course that uses some Gulf oil spill data to introduce common vector-based spatial analysis methods (buffers, overlays, etc.) I've got a polygon feature class that holds the bounds of the Deepwater Horizon oil spill on a given day, and I'm simulating its expansion with buffers. It does the job to illustrate the concept, but certainly doesn't provide realistic results. It got me thinking about how this could be done in a way that provided less uniform results, mimicking/faking the effect of currents directing the oil in various directions as it expands. In a general sense, I'm looking for a workflow that would accomplish the following given an input polygon feature:   * Create a new polygon feature that is bigger than the original by a specified area (like 10 sq. km.) or maybe a specified factor (like 5%)   * The new polygon feature would have an arbitrary shape, with the caveat that...   * The new polygon feature would contain the original polygon feature (this point isn't a deal breaker, but would be nice to have) Any real-world solution would have to involve modeling ocean currents, fluid dynamics, and the like, which goes well outside the scope of what I'm trying to do (though solutions incorporating this are certainly welcome and would be interesting to see), but the idea has piqued my curiosity about the underlying spatial problem and I'm curious what solutions are out there. I've got one solution in mind, but I'd like to hear what solutions others may have. I'm working in the ESRI world, but solutions that involve other packages/platforms are certainly welcome (though I may not be able to test them). General algorithms, pseudocode, and code are fine as well.


what are the main advantages of using a Double Stereo projection?

I'm not per say a GIS guru, I'm more of a user of the technology. On a recent project we were asked to analyze, provide, and submit all our analysis using a Double Stereo projection. What are the main advantages of using it vs. UTM, or any other projection.


How to extract geo data out of a polygon shape file into csv kwt

I have a polygon shape file that contains all the neighborhoods in the Netherlands. My aim is to export the neighborhoods and coordinates to csv file (KWT). Without success I tried (with QGIS) these 'solutions':   1. How to export Polygons to CSV with coordinates?   2. How to get Shapefile point coordinates into .xls? It got me to the point where i have all the attributes (from my vector layer) in a CSV file. The problem lies in that i cant seem to find any geodata (coordinates) in them. Where can i find the polygon coordinates to finally export them with the neighborhoods out my shape file to csv?


deactivate editToolbar with map onClick

I have the below function to enable editing. I click on an editable feature, the infoWindow is displayed with attributeInspector and the editToolbar (move point) is activated. I would like to call editToolbar.deactivate(); when the user clicks off the infoWindow (anywhere on the map). This would also hide the infoWindow. The below does not work. As soon as the feature is clicked, the infoWindow flashes, then closes. If I comment out the map onClick listener, then all is well. Any help with this? Thanks!!               dojo.connect(map, "onLayersAddResult", initEditing);          function initEditing(results) {         var map = this;         var currentLayer = null;              var featureLayers = dojo.map(results, function(result){             return result.layer;         });              var editToolbar = new esri.toolbars.Edit(map);              dojo.connect(map, "onClick",function(evt){             editToolbar.deactivate();             map.infoWindow.hide();         });              dojo.connect(editToolbar, "onGraphicMoveStop", function(graphic, transform){             editToolbar.deactivate();             map.infoWindow.hide();             currentLayer.applyEdits(null,[graphic],null);         });                      var query = new esri.tasks.Query();             dojo.forEach(featureLayers, function(layer){                         dojo.connect(layer, "onClick", function(evt){                                                dojo.stopEvent(evt); //stop propogation of layer onClick event, otherwise it fires the map onClick event which would hide infoWindow & deactivate editToolbar                                currentLayer = this;                     editToolbar.activate(esri.toolbars.Edit.MOVE, evt.graphic);                                           if (map.infoWindow.isShowing) {                         map.infoWindow.hide();                     }                                         //layerInfos specific to each editable featureLayer                     if (layer.name == "Facilities"){                         var layerInfos = [{                             'featureLayer': layer,                             'fieldInfos': [                                 {'fieldName':'site_code', 'isEditable':false,'label':'FacID'},                                 {'fieldName':'facil_type','isEditable':false,'label':'Type'},                                 {'fieldName':'facil_name', 'isEditable':false,'label':'Name'},                                 {'fieldName':'address', 'isEditable':true,'label':'Address'},                                 {'fieldName':'facil_location', 'isEditable':true,'label':'City/State'},                                 {'fieldName':'zip', 'isEditable':true,'label':'Zip'}                             ]                         }]                     }                     else if(layer.name == "Edit Points"){                         var layerInfos = [{                             'featureLayer': layer,                             'fieldInfos': [                                 {'fieldName':'type', 'isEditable':false,'label':'Edit Type'},                                 {'fieldName':'approved', 'isEditable':true,'label':'Edit Status'},                                 {'fieldName':'notes', 'isEditable':true,'label':'Notes','stringFieldOption':esri.dijit.AttributeInspector.STRING_FIELD_OPTION_TEXTAREA}                             ]                         }]                     }                     else if(layer.name == "Markup - Line"){                         var layerInfos = [{                             'featureLayer': layer,                             'fieldInfos': [                                 {'fieldName':'notes', 'isEditable':true,'label':'Notes','stringFieldOption':esri.dijit.AttributeInspector.STRING_FIELD_OPTION_TEXTAREA}                             ]                         }]                     }                     else if(layer.name == "Markup - Polygon"){                         var layerInfos = [{                             'featureLayer': layer,                             'fieldInfos': [                                 {'fieldName':'notes', 'isEditable':true,'label':'Notes','stringFieldOption':esri.dijit.AttributeInspector.STRING_FIELD_OPTION_TEXTAREA}                             ]                         }]                     }                     else if(layer.name == "Markup - Point"){                         var layerInfos = [{                             'featureLayer': layer,                             'fieldInfos': [                                 {'fieldName':'notes', 'isEditable':true,'label':'Notes','stringFieldOption':esri.dijit.AttributeInspector.STRING_FIELD_OPTION_TEXTAREA}                             ]                         }]                     }                     else if(layer.name == "Sampling Locations"){                         var layerInfos = [{                             'featureLayer': layer,                             'fieldInfos': [                                 {'fieldName':'site_code', 'isEditable':false,'label':'FacID'},                                 {'fieldName':'narrative','isEditable':true,'label':'Notes'}                             ]                         }]                     }                          var attInspector = new esri.dijit.AttributeInspector({                         layerInfos: layerInfos                     }, dojo.create("div"));                          //select the feature that was clicked                     query.objectIds = [evt.graphic.attributes.OBJECTID];                     layer.selectFeatures(query, esri.layers.FeatureLayer.SELECTION_NEW, function(features) {                         map.infoWindow.setContent(attInspector.domNode);                         map.infoWindow.show(evt.screenPoint, map.getInfoWindowAnchor(evt.screenPoint));                     })                          dojo.connect(attInspector, "onAttributeChange", function(feature, fieldName, newFieldValue) {                         feature.attributes[fieldName] = newFieldValue;                         feature.getLayer().applyEdits(null, [feature], null);                     });                          dojo.connect(attInspector, "onDelete", function(feature) {                         feature.getLayer().applyEdits(null, null, [feature]);                         map.infoWindow.hide();                     });                          });         });     }


Python Toolbox Raster Parameter Error

I borrowed a simple script I found online to clip a shapefile from the extent of a raster. It works perfectly from the ArcMap built in python command prompt. I modified is slightly to use in a tool. It's having issues accepting the raster (inraster) in:               extent = arcpy.Raster(inRaster).extent      I get the following error: > extent = arcpy.Raster(inRaster).extent TypeError: expected a raster or layer > name I'm using "Raster Layer" as my inRaster parameter type. The raster type I am using is an ERDAS IMAGINE .img file. I'm thinking it must be conflicting with the parameter type and the .img input raster, but I can't figure out what it is. As I mentioned, it worked from the command prompt, just not in the tool. Any suggestions are welcome. Code is as follows:               import arcpy          inLines = arcpy.GetParameter(0)     inRaster = arcpy.GetParameter(1)     outRaster = arcpy.GetParameter(2)          pnt_array = arcpy.Array()     extent = arcpy.Raster(inRaster).extent     pnt_array.add(extent.lowerLeft)     pnt_array.add(extent.lowerRight)     pnt_array.add(extent.upperRight)     pnt_array.add(extent.upperLeft)          poly = arcpy.Polygon(pnt_array)          arcpy.Clip_analysis(inLines, poly, outRaster)      Thanks, Mike


I'm looking for a comprehensive database of all cities/towns in South Africa

The title says it all really - I'm looking for a comprehensive list/database of all cities/towns in South Africa. I know about these guys: http://www.afrigis.co.za/, but they're just not getting back to me no matter how many times I contact them. They were recommended to me as the only really trustworthy and comprehensive source for the data I need, but they're obviously not extremely helpful. If anyone has any info on where I can get this then please let me know. Yes, I have tried Google and no I haven't found anything that is comprehensive enough (except for AfriGIS).


Why does Field Calculator return 0 values when decimals are expected?

I realize I posed this question, and got answers, several days ago (see (Field calculator error)) , but none seem to really be working, and so am posing again. Below are two screenshots that show the fields with field properties, and another showing the field calculator and the equation with the "answer" field populated by 0s. I apologize for them not being next to each other or in line with the appropriate text, but the web formatting keeps overlaying them. Here is an overview of the problem: I am trying to do a in field calculator, where I'm trying to populate a new field with the values from a fairly simple equation of one field divided by another (Cnt1 by Pop1 in this case). Both fields that I am dividing are double, and the value, while small is not infinitesimal, approx 0.01765. I have tried creating various types of new fields: double, long, float, and played around with the scale/precision/properties, but everytime it returns "0" values. I know the values will be very small, i.e .04 but it doesn't seem to be a decimal display problem as I tried running it with Pop1/.4 and it correctly returned a decimal. I've tested dividing the Cnt1 by .5 and that gives an appropriate decimal value, so it's not the new field format; **the one thing that seems really strange is when I add (in field calculator python version): !Cnt1!+!Pop1! (which is 38+218699) I get 2.187** , however, I suppose this could be related to the field being classified as float with precision=4, scale=3? ![enter image description here](http://i.stack.imgur.com/OHcn1.jpg) I've also tried the suggestions of @blord-castillo of doing:               1.0* (Cnt1/Pop1)      and also 1.0* (int(Cnt1/Pop1)) But neither works, I'm at my wits end on this one, and would greatly appreciate any help! ![enter image description here](http://i.stack.imgur.com/VdTWp.jpg)


Why does dividing two decimal field values using Field Calculator return/write Integer?

I have fields in my datasets such as HR60, HR70, HR80, HR90 When I tried to use field calculator using the following [HR70]/[HR60], all I got was 1, 2, 3, 4 as my values. Last time I checked 1.14/2.24 is not 1 and 2.92/.69 is not 4. In a map I did using field calculator using [ ]/[ ]*100 to get percentages and it let me do that so why this time am I getting whole #'s and not the appropriate decimals?


Disambiguate messy place names in python (preferably on local machine)

I have list with several million place names that come from Flickr profiles. Users provided these placenames as free text, so they look like this:               Roma, Italy     Kennesaw, USA     Saginaw, MI     Rucker, Missouri, USA     Melbourne, Australia     Madrid, Spain     live in Sarnia / work in London, Canada     Valladolid, España     Italia     West Hollywood, United States      I want to disambiguate these place names. I am aware that there is in some cases no straightforward to this solution, but I am willing to live with some false disambiguation and with "no answer" for some of the places. If a place name corresponds to the name of multiple cities, then I want to assign that place to the largest city that it corresponds to. Yahoo's place finder api would be a good solution to this problem, but I would need to make too many API calls to get through my list, so I'd like a local solution (i.e., one that does not depend on a remote api). Does anyone know of any python libraries that do this kind of thing, or any other local solutions? (I've also asked this question on stackoverflow.)


Model Builder's VBscript

I use the Model builder to run my model and I have question               Sub M()     ' Create the Geoprocessor object     Dim gp As Object     Set gp = CreateObject("esriGeoprocessing.GPDispatch.1")          ' Check out any necessary licenses     gp.CheckOutExtension "spatial"          ' Load required toolboxes...     gp.AddToolbox "C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Spatial Analyst Tools.tbx"     gp.AddToolbox "C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Conversion Tools.tbx"     gp.AddToolbox "C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Data Management Tools.tbx"               ' Local variables...     Dim Output_Features As String     Dim Output_point_features As String     Dim Layer_Name_or_Table_View As String     Dim Kriging_poin3 As String     Dim Output_variance_of_prediction_raster As String     Dim dbtexts_mdb As String     Dim ws As String     Dim dbtexts_mdb__2_ As String     Output_Features = "C:\temp2\RasterT_Kriging1.shp"     Output_point_features = "C:\temp2\RasterT_Kriging1.shp"     Layer_Name_or_Table_View = "ws_Layer"     Kriging_poin3 = "C:\temp2\kriging_poin3"     Output_variance_of_prediction_raster = ""     dbtexts_mdb = "C:\dbtexts.mdb"     ws = "C:\dbtexts.mdb\ws"     dbtexts_mdb__2_ = "C:\dbtexts.mdb"          ' Process: Make XY Event Layer...     gp.MakeXYEventLayer_management ws, "x", "y", Layer_Name_or_Table_View, ""          ' Process: Kriging...     gp.Kriging_sa Layer_Name_or_Table_View, "data", Kriging_poin3, "Spherical 249.101224",     "250", "VARIABLE 12", Output_variance_of_prediction_raster          ' Process: Raster to Point...     gp.RasterToPoint_conversion Kriging_poin3, Output_point_features, "Value"          ' Process: Add XY Coordinates...     gp.AddXY_management Output_point_features          ' Process: Table to Geodatabase (multiple)...     gp.TableToGeodatabase_conversion "C:\temp2\RasterT_Kriging1.shp", dbtexts_mdb__2_          End Sub      in the sub I have parameters but I want it to run with the data I have can I just like VB give it a do loop and make it run itself?


Is it possible to use esri.dijit.Popup for editing

In the new arcgis js api ESRI added new nice infowindow - esri.dijit.Popup. We can use it this way:                //create a popup to replace the map's info window      var popup = new esri.dijit.Popup(popupOptions, dojo.create("div"));           map = new esri.Map("map", {           extent: initExtent,           infoWindow: popup      });      The code from samples. Is it possible to use it for editing? I like this new infoWindow more than standart editing infoWindow


I have a table with a series of lat/long points - how do I convert them into polygons?

I have an Excel sheet with about 150 points (lat and long in decimal degrees) which belong to about 15 different polygons. The columns I have are FID, NAME (the same between polygons), POINTS (points for the polygons), LAT, LONG, ELEV. So a sample row might have: FID: 0, NAME: LO, POINTS: LO1, LAT: xx.xxxxxxxx, LONG: -yy.yyyyyyyy, ELEV: zzzz The NAME field is the same for the different points that make up one polygon (so ~10 fields have the name LO, and the points are numbered as NAMEx [so the LO polygon will have different rows with LO1, LO2, LO3, etc. in the POINTS field). I have already successfully converted these points to a shapefile in Arc, is there a way to make them into polygons? I have access to ArcMap 10.1 or 10.2. Thanks all.


Factors in computing scoring for place name searches, like Geonames

As part of the `FULL` response style, the GeoNames search API returns results like the following:               <geonames style="FULL">       <totalResultsCount>510</totalResultsCount>         <geoname>         <toponymName>Las Vegas</toponymName>         <name>Vegas</name>         <lat>36.17497</lat>         <lng>-115.13722</lng>         <geonameId>5506956</geonameId>         <!-- abbreviated -->         <score>92.10135650634766</score>       </geoname>     </geonames>      How is the `score` element calculated? I'm guessing there's some sort of search index (e.g. something running on top of Lucene, like Solr or Elasticsearch). I'm less concerned about exactly understanding the scoring algorithm they use, but rather an understanding which factors would be the most useful in implementing a scoring mechanism if I were to implement a similar web service locally.


ArcGIS 10.2.1 Table To Table tool in Python script gives ExecuteError: ERROR 001156?

I work for an organization that just upgraded from esri arcmap 9.3.1 to 10.2.1 and I'm currently in the process of updating the python scripts. When running a script I'm getting hung up on a portion that imports data from a database connection. The portion of the script is below:               arcpy.MakeTableView_management(ext_parcel_base, view_parcel_base_temp, "status = 'A'", "", "lrsn lrsn VISIBLE NONE;last_update last_update VISIBLE NONE;status status HIDDEN NONE;parcel_id parcel_id VISIBLE NONE;parent_lrsn parent_lrsn HIDDEN NONE;parent_parcel_id parent_parcel_id HIDDEN NONE;county_number county_number HIDDEN NONE;township_number township_number HIDDEN NONE;district_number district_number HIDDEN NONE;corporation_id corporation_id HIDDEN NONE;section_plat section_plat HIDDEN NONE;routing_number routing_number HIDDEN NONE;neighborhood neighborhood VISIBLE NONE;property_class property_class VISIBLE NONE;prop_street prop_street VISIBLE NONE;prop_city prop_city VISIBLE NONE;prop_state prop_state VISIBLE NONE;prop_zip prop_zip VISIBLE NONE;number_cards number_cards HIDDEN NONE;owner1 owner1 VISIBLE NONE;owner2 owner2 VISIBLE NONE;own_street own_street VISIBLE NONE;own_city own_city VISIBLE NONE;own_state own_state VISIBLE NONE;own_zip own_zip VISIBLE NONE;tax_bill_id tax_bill_id HIDDEN NONE;assoc_parcel_id assoc_parcel_id HIDDEN NONE;assemblage_parcel assemblage_parcel HIDDEN NONE;lock_flag lock_flag HIDDEN NONE;reval_neigh reval_neigh HIDDEN NONE;hmstd_code hmstd_code HIDDEN NONE;assoc_name assoc_name HIDDEN NONE;deed_book deed_book HIDDEN NONE;deed_page deed_page HIDDEN NONE;condo_pct_int condo_pct_int HIDDEN NONE;condo_field1 condo_field1 HIDDEN NONE;condo_field2 condo_field2 HIDDEN NONE;condo_field3 condo_field3 HIDDEN NONE;future_hmstd_code future_hmstd_code HIDDEN NONE;hmstd_eff_year hmstd_eff_year HIDDEN NONE;par_base_int1 par_base_int1 HIDDEN NONE;par_base_int2 par_base_int2 HIDDEN NONE;par_base_int3 par_base_int3 HIDDEN NONE;par_base_flag1 par_base_flag1 HIDDEN NONE;par_base_flag2 par_base_flag2 HIDDEN NONE;nei_rating nei_rating HIDDEN NONE;legal_acreage legal_acreage VISIBLE NONE;contract_owner1 contract_owner1 HIDDEN NONE;contract_owner2 contract_owner2 HIDDEN NONE;contract_street contract_street HIDDEN NONE;contract_city contract_city HIDDEN NONE;contract_state contract_state HIDDEN NONE;contract_zip contract_zip HIDDEN NONE;value_allocation value_allocation HIDDEN NONE;nei_rating2 nei_rating2 HIDDEN NONE;condo_type condo_type HIDDEN NONE;condo_level condo_level HIDDEN NONE")          arcpy.TableToTable_conversion(view_parcel_base_temp, sde, "parcel_base_temp", "", "lrsn 'lrsn' true true false 4 Long 0 10 ,First,#,"+ ext_parcel_base +",lrsn,-1,-1;last_update 'last_update' true true false 16 Date 0 0 ,First,#,"+ ext_parcel_base +",last_update,-1,-1;parcel_id 'parcel_id' true true false 26 Text 0 0 ,First,#,"+ ext_parcel_base +",parcel_id,-1,-1;neighborhood 'neighborhood' true true false 4 Long 0 10 ,First,#,"+ ext_parcel_base +",neighborhood,-1,-1;property_class 'property_class' true true false 4 Long 0 10 ,First,#,"+ ext_parcel_base +",property_class,-1,-1;prop_street 'prop_street' true true false 40 Text 0 0 ,First,#,"+ ext_parcel_base +",prop_street,-1,-1;prop_city 'prop_city' true true false 30 Text 0 0 ,First,#,"+ ext_parcel_base +",prop_city,-1,-1;prop_state 'prop_state' true true false 2 Text 0 0 ,First,#,"+ ext_parcel_base +",prop_state,-1,-1;prop_zip 'prop_zip' true true false 10 Text 0 0 ,First,#,"+ ext_parcel_base +",prop_zip,-1,-1;owner1 'owner1' true true false 36 Text 0 0 ,First,#,"+ ext_parcel_base +",owner1,-1,-1;owner2 'owner2' true true false 36 Text 0 0 ,First,#,"+ ext_parcel_base +",owner2,-1,-1;own_street 'own_street' true true false 40 Text 0 0 ,First,#,"+ ext_parcel_base +",own_street,-1,-1;own_city 'own_city' true true false 30 Text 0 0 ,First,#,"+ ext_parcel_base +",own_city,-1,-1;own_state 'own_state' true true false 2 Text 0 0 ,First,#,"+ ext_parcel_base +",own_state,-1,-1;own_zip 'own_zip' true true false 10 Text 0 0 ,First,#,"+ ext_parcel_base +",own_zip,-1,-1;legal_acreage 'legal_acreage' true true false 8 Double 4 10 ,First,#,"+ ext_parcel_base +",legal_acreage,-1,-1", "")          arcpy.AddIndex_management(sde_parcel_base_temp, "parcel_id", "parcelid", "NON_UNIQUE", "NON_ASCENDING")      This results in an error: > File "C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy\arcpy\conversion.py", > line 2018, in TableToTable raise e ExecuteError: ERROR 001156: Failed on > input OID -1, could not write value ' ' to output field prop_city Failed to > execute (TableToTable). I'm not very advanced in python and i understand it means: > A value could not be added to the output field. For example, text values > cannot be added to numeric fields, and text values cannot be added to text > fields if the values are longer than the field length. Do you have an idea what i need to do to fix this?


Showing attributes of multiple parcels on one layout using DDP with dynamic text?

I am using ArcGIS 10.1 for making maps showing the distribution of parcels and their attributes in a given area. I am working with anywhere from 20 to 50 parcels in a set, sometimes more. I often use Data Driven Pages (DDP) and dynamic text to speed the process along. My problem is that sometimes there are multiple parcels in close proximity to each other. I would like to be able to show the attributes of multiple parcels on one layout using ddp/dynamic text. How can I do this? Update: This is an example of what I most commonly work on. I used ddp and dynamic text for the attribute data on the right of the map. I wish to use dynamic text for attributes for all parcels in the layout. How can this be accomplished? Further explanations and examples can be provided if need be.![enter image description here](http://i.stack.imgur.com/XCAQ8.jpg)


How to show GeoStatistical Analyst Layer in web map using ArcGIS Javascript API?

I have created a "GeoStatistical Analyst Layer" with "Diffusion Interpolation with Barriers" tool and then I published it on the ArcGIS for Server. How can I show this layer in my web map application using Javascript API?


Passing RasterDataSource object to RasterData object in Javascript API?

I have a GP service that requires a RasterData object as input. The RasterData object should hold a RasterDataSource object, but I'm not sure of the syntax to connect these two classes. The API reference has no examples. I have tried:               var dataSource = new RasterDataSource();     dataSource.workspaceId = "SharedData";     dataSource.dataSourceName = "raster.tif";     var rasterData = new RasterData();     rasterData = dataSource.toJson();      All properties of the RasterData object return "undefined". What is the correct syntax to do this?


Install FileGDB using Homebrew error

I am trying to install following these instructions http://dayne.broderson.org/2013/02/10/homebrew_qgis_with_FileGDB.html               brew install gdal --enable-unsupported     ==> Installing gdal dependency: lzlib     ==> Downloading http://download.savannah.gnu.org/releases/lzip/lzlib-1.4.tar.gz                                                                                0.0%     curl: (22) The requested URL returned error: 404     Error: Download failed: http://download.savannah.gnu.org/releases/lzip/lzlib-1.4.tar.gz      How can I find mirrors of the file that I try to download ?


How to shift polygons by updating their details in R

I have two polygon shapefiles and I want to see to what extent the observed amount of overlap is due to chance. I'd like to randomly move the polygons in one shapefile to new locations, measure the total area of intersection, repeat this a thousand times or so to get a distribution of areas of intersection, and then measure how likely the observed area is compared to the distribution of random areas. I'm stuck on moving the polygons: **how can I shift polygons to a random new location in a bounding box?** I'm using `R`, here's an attempt at a reproducible example:               require(sp)     require(splancs)     require(rgeos)     require(maptools)          # simple example polygons     Sr1 = Polygon(cbind(c(2,4,4,1,2),c(2,3,5,4,2)))     Sr2 = Polygon(cbind(c(5,4,2,5),c(2,3,2,2)))     Sr3 = Polygon(cbind(c(4,4,5,10,4),c(5,3,2,5,5)))     Sr4 = Polygon(cbind(c(5,6,6,5,5),c(4,4,3,3,4)), hole = TRUE)          Srs1 = Polygons(list(Sr1), "s1")     Srs2 = Polygons(list(Sr2), "s2")     Srs3 = Polygons(list(Sr3, Sr4), "s3/4")     SpP = SpatialPolygons(list(Srs1,Srs2,Srs3), 1:3)     plot(SpP, col = 1:3, pbg="white")          # make bounding box to contain random relocations of polygons     bbx <- bboxx(bbox(SpP))     bbx <- rbind(bbx, bbx[1,])     bbx <- SpatialPolygons(list(Polygons(list(Polygon(bbx)), "bbx")))          # make random points in bounding box to use as centroids to sample from     rnd <- spsample(bbx, 100, type = "random")          # get centroids of polygons     cnt <- gCentroid(SpP, byid = TRUE)      Here's where I'm stuck...               # replace centroids of polygons with random points in bounding box     # in the hope that this will shift the polygons     out <- SpP # to store output     for(i in 1:length(SpP)) {         # create a random offset to shift the polygon by         offset <- unname(cnt[i,]@coords) - unname(rnd@coords[sample(1:length(rnd),1),])          # shift the polygon by this random offset         # this doesn't seem to be doing what I want...         out[i,] <-  elide(SpP[i,], shift = offset)     }     plot(out) # not the desired result...          # check to see that something is happening...     sapply(1:length(SpP), function(k) SpP@polygons[[k]]@labpt)      The desired output is a shapefile with the polygons in new random locations in the bounding box. My general approach is based on this. What am I doing wrong and how can I fix it?


Efficient arcpy method of points in polygon

Coming from a background of Mapinfo and Manifold, I frequently find myself frustrated with the ArcGIS SQL toolset. In both these former programs it is trivial to write a query asking, for instance, how many points fall within each polygon. This can be filtered using where clauses, e.g. all the points of type a within each polygon and then all tbe points of type b within each polygon. Since the query result is an in-memory table, it is quick and uses up very little disk space. By contrast, Spatial Join in ArcGIS seems quite slow, possibly because of disk IO, uses up more disk space than necessary, and I personally find it cumbersome. I know there are alternatives, Hawths Tools for instance, but I was trying to do something in arcpy. My first thought was to loop through each geometry in both the polygon set and point set and test whether the point was contained by the polygon. This would then enable all sorts of things to be calculated. I wrote a test that just looped through all the points for one polygon:               import arcpy     arcpy.env.workspace = r"path\to\workspace"     print "Start"     geom = arcpy.Point(530000,180000)     cursor = arcpy.SearchCursor("FCName")     for rowid in cursor:          poly = rowid.Shape          if poly.contains(geom):               print rowid.OBJECTID       However, this takes a few seconds for each polygon, so with a dataset size of 4,000 polygons, I don't think this is going to work particularly quickly. Does anyone have any ideas for making this more efficient, or a function that I'm missing?


Are the folders always part of the service name in the rest server response?

> **Possible Duplicate:**   >  ArcGis Rest – service name vs. folder - Are the folders always part of the > service name? I'm using ArcGis with Rest. My Question is, are the folders always part of the service name in the rest server response? The server send me for the folders:               {"currentVersion" : 100,        "folders" : [         ...         "Fire",          ...       ],        "services" : [         {"name" : "Geometry", "type" : "GeometryServer"}       ]     }      and for the service:               {"currentVersion" : 100,        "folders" : [],        "services" : [         {"name" : "Fire/Sheep", "type" : "MapServer"},          {"name" : "Fire/Sheep", "type" : "FeatureServer"}       ]     }      You can see, the folder is part of the service name, is this always so? What is, if there is more then one level of folders? Thanks for help!


How to open a map from gdb?

A librarian has helped me create some maps, and I need to open them. He is off work at the moment and I am in a rush for this. I have downloaded ArcGIS and he says I can open this with arcMAP. He has given me a folder that is .gdb and inside it contains many files: .gdbindexes .gdbtable .gdbtablex .spx .atx etc.. I cannot open any of them with ArcMap. I know this is probably a stupid question (I have used stackexchange before for compsci and mathematics etc, and I know this is not what stackexchange is for) but any help would be great! I am sure this is an easy task.


Are there plans for improving performance of vector files in QGIS?

Does anybody know if there are any improvements planned pertaining to the performance of vector files in QGIS? Right now, a 1 GB file with contour lines needs several minutes to open. In addition to that I have the suggestion that vector-files shouldn't be refreshed in whole when panning or zooming. This costs a lot of nerves and could be avoided through a cache. Thank you.


Industry employment and GIS: effective search methods for new grads?

What are some good ways of identifying private entities that may be inclined to accept intern work or offer an entry level job?


ArcPy replaceDataSource to an SDE raster catalog error

New to Python! I'm trying to re-path a multitude of rasters currently the workspace is a folder, the intended workspace is a raster catalog in an SDE database - using the replaceDataSource method I'm getting the error as below. Does anyone know if this method cant output as a Raster Catalog or what the actual problem may be? > > > lyr = arcpy.mapping.Layer(r"C:\Folder\MyLayer.lyr") > lyr.replaceDataSource(r"pathToSDEConnectionFile.sde","SDE_WORKSPACE","rasterCatalogName", > True) Runtime error : Layer: Unexpected error Thanks.


Problem in executing the routing_core.sql

I am getting the following error: > ERROR: could not access file "$libdir/librouting": No such file or directory How can I fix it?


Why does Updating Location of ArcSDE Feature using ArcObjects .NET give Error HRESULT E_FAIL has been returned from call to COM component?

I have been able to connect to an Enterprise GeoDatabase, retrieve features from it and update attributes. However I am having problems accessing and then updating the shape property of a feature. Here is my code (its not production, just test code at the moment) :                 try             {                      IQueryFilter queryFilter = new QueryFilterClass();                 queryFilter.SubFields = "OBJECTID, Definitive_ID, FL_Id, GIS_ID, SAP_ID, CHECK_Status, CHECK_DateAbandoned, CHECK_Outfall_Ipid, CHECK_Outfall_X";                 queryFilter.WhereClause = "FL_Id = 71444";                 IFeatureClass testFeatureClass = featureWorkspace.OpenFeatureClass("SDE_CSO.DBO.DefinitiveList");                      IQueryFilterDefinition queryFilterDef = (IQueryFilterDefinition)queryFilter;                 queryFilterDef.PostfixClause = "ORDER BY OBJECTID";                      int nameIndex = testFeatureClass.FindField("OBJECTID");                 int defIndex = testFeatureClass.FindField("Definitive_ID");                 int flIndex = testFeatureClass.FindField("FL_Id");                 int GISIndex = testFeatureClass.FindField("GIS_ID");                 int sapIndex = testFeatureClass.FindField("SAP_ID");                 int checkStatusIndex = testFeatureClass.FindField("CHECK_Status");                 int checkDateAbandonedIndex = testFeatureClass.FindField("CHECK_DateAbandoned");                 int checkOutfallIPIndex = testFeatureClass.FindField("CHECK_Outfall_Ipid");                 int checkOutfallXIndex = testFeatureClass.FindField("CHECK_Outfall_X");                 int XLatIndex = testFeatureClass.FindField("XLat");                 int LongIndex = testFeatureClass.FindField("Long");                      using (ComReleaser comReleaser = new ComReleaser())                 {                     IFeatureCursor cursor = testFeatureClass.Search(queryFilter, true);                     comReleaser.ManageLifetime(cursor);                     IFeature feature = null;                     while ((feature = cursor.NextFeature()) != null)                     {                         int ObjectID = Convert.ToInt32(feature.get_Value(nameIndex));                         string Definitive_ID = Convert.ToString(feature.get_Value(defIndex));                         int FL_ID = Convert.ToInt32(feature.get_Value(flIndex));                         string GIS_ID = Convert.ToString(feature.get_Value(GISIndex));                         string SAP_ID = Convert.ToString(feature.get_Value(sapIndex));                         string CHECK_Status = Convert.ToString(feature.get_Value(checkStatusIndex));                         string CHECK_DateAbandonedIndex = Convert.ToString(feature.get_Value(checkDateAbandonedIndex));                         string CHECK_OutfallIPID = Convert.ToString(feature.get_Value(checkOutfallIPIndex));                         string CHECK_OutfallX = Convert.ToString(feature.get_Value(checkOutfallXIndex));                         double XLat = Convert.ToDouble(feature.get_Value(XLatIndex));                         double Long = Convert.ToDouble(feature.get_Value(LongIndex));                              Type factoryType = Type.GetTypeFromProgID("esriGeometry.SpatialReferenceEnvironment");                         System.Object obj = Activator.CreateInstance(factoryType);                         ISpatialReferenceFactory3 spacialReferenceFactory3 = obj as ISpatialReferenceFactory3;                         IGeoTransformation geoTrans = spacialReferenceFactory3.CreateGeoTransformation((int)esriSRGeoTransformationType.esriSRGeoTransformation_OSGB1936_To_WGS1984Petrol) as IGeoTransformation;                         ISpatialReference fromSpatialReference;                         ISpatialReference toSpatialReference;                         geoTrans.GetSpatialReferences(out fromSpatialReference, out toSpatialReference);                              var wgs84GCS = spacialReferenceFactory3.CreateGeographicCoordinateSystem((int)esriSRGeoCSType.esriSRGeoCS_WGS1984);                         var bngPCS = spacialReferenceFactory3.CreateProjectedCoordinateSystem((int)esriSRProjCSType.esriSRProjCS_BritishNationalGrid);                              IGeometry geometry = feature.ShapeCopy;                         IPoint point = geometry as IPoint;                         point.PutCoords(-3.159875, 51.465615);                         geometry = point as IGeometry5;                         geometry.SpatialReference = wgs84GCS;                         point = new PointClass();                         point = geometry as PointClass;                         point.SpatialReference = wgs84GCS;                              feature.Shape = point;                         feature.Store();                     }                 }             }             catch (Exception ex)             {                 Log("Problem Connecting to Feature Class or Querying : " + ex.Message);             }      I am using an IQueryFilter which I thought would allow me to update the feature, however I get an error at the line "IGeometry geomtey = feature.ShapeCopy" - "Error HRESULT E_FAIL has been returned from a call to a COM component" I am probably doing something incorrectly, please could someone advise how to change the location of an existing Point Feature using C# ArcObjects .NET (Im using v10.1)


Simple Dojo Pop Up Window

I'm working on my first web application using the JS API and am looking to add a simple tabbed pop-up window that can be called on the load of the page that can display map instructions and a general data disclaimer. For the life of me I can't figure this out. Any help would be greatly appreciated.


How to find all objects deleted by user in specified time

Is there any way to get list of objects with their geometries deleted by specified user in specified time?


Installing QGIS from non-packed file

I've been asked a question regarding installation of QGIS from an unpacked file on Windows, as the organization that wants to install it needs to run a thorough malware scan. Currently, the installation of QGIS in standalone form requires downloading of the setup file which then proceeds to download and unpack all the QGIS files. This doesn't allow a malware scan beforehand. Is there a way to install a "pre-unpacked" QGIS program?


How to get QGIS layers style in a single file

I have layers on my QGIS project.   * Rivers   * Water pipes   * Gas pipes   * ..... I set the color, width, size of these layers. All layers are different style. I want to use these styles in geoserver. I have WMS for each layer. So I should save single SLD files in QGIS and upload them in geoserver. I want to save all layer styles in a single SLD file from QGIS and create a single style in geoserver. Than Apply it to WMS layer. Is this possible?


Use of RRC(Range Rate Control) in Pseudo Range Correction for satellite

Can anyone tell me the use of RRC in order to calculate the value of PRC(pseudo range correction) in PPK(post processed kinematics)? ![DGPS correction for Code Ranges](http://i.stack.imgur.com/XrE9n.png) ![continue](http://i.stack.imgur.com/9mg9Z.png) ![continue](http://i.stack.imgur.com/dT3Ku.png)


How to make query task synchronous in ArcGIS JSAPI

I am using ArcGIS JS API version 3.6. I want to make query task synchronize. While executing query task reaming code will wait until completion of query task. For example I have shared my code here which contains query layer. Case 1: In which I am directly executing the code and printing the log in console window, where you can see before the query task output is displaying Case 2: In this case we have used alert (for time delay) in the code then value is getting before query task. -Researching on Google and going through similar question Case 1 screenshot : ![-Screen shot for case 1](http://i.stack.imgur.com/HIiv0.png) Case 2 screenshot : ![-Screen shot for case 2](http://i.stack.imgur.com/TGxwD.png) Any help will be great !!! thanks in advance : )


How specify QGIS scale settings according to project?

I have a layer in QGIS named rivers. I want to view this layer between 1/5000 and 1/400.000 scale. But when I open QGIS, I see the default scale is 1:-2.147.483.648 I setted the project scales from **Project -> General -> Project Properties** like this:   * 1:400.000   * 1:200.000   * 1:100.000   * 1:50.000   * 1:10.000   * 1:5.000 And I set the layer scale properties Maximum = 1/400.000 and Minimum = 1/5.000 Now I am selecting the scale as 1/200.000 from QGIS window, but my layer does not appear. It appears 1:36.103.390 scale and upper. How can I solve this problem?


Need a combination of geoprocessing tools that could replace Extract By Mask for use with WPF Runtime

I am in need of a combination of geoprocessing tools that could replace Extract By Mask for use with WPF Runtime. The "Extract by Mask" tool is one of the tools that is not supported with Runtime. Also "Reclassify" is one tool that is not being supported by Spatial Analyst extension. However, right now I just want to concentrate on the Extract By Mask. When I use that tool in my model, run the model and then try to create a geoprocessing package (gpk) from that result, I get an error message letting me know that that tool is not supported. Therefore I need a combination of tools that could be used in my model, that would accomplish the same goal. Thanks, Renee


How to run a ZTV (ZVI) on ESRI ArcGIS 10 for a 3m high object?

What tool in the spatial toolbox would you use to run a ZTV (ZVI)? or is there a better way of carrying this type of query out using Arc? Also what other information would I need to do this type of query? Thanks in advance.


r.basin.py GRASS addon

I have added this add on with g.extension on my grass 6.4.3RC3. But it doesnt work... this is the error I can see: Traceback (most recent call last): File "C:\Program Files (x86)\GRASS GIS 6.4.3RC3\etc\wxpython\gui_core\prompt.py", line 839, in OnItemSelected self.cmdDesc = gtask.parse_interface(GetRealCmd(cmd)) File "C:\Program Files (x86)\GRASS GIS 6.4.3RC3\etc\python\grass\script\task.py", line 470, in parse_interface tree = etree.fromstring(get_interface_description(name)) File "C:\Program Files (x86)\GRASS GIS 6.4.3RC3\etc\python\grass\script\task.py", line 448, in get_interface_description "\n\nDetails: %(det)s") % { 'cmd' : cmd, 'det' : decode(cmderr) } grass.script.core . ScriptError : Unable to fetch interface description for command 'r.basin.py.bat'. Details: C:/Program Files (x86)/GRASS GIS 6.4.3RC3/scripts/r.basin.py: line 74: import: command not found C:/Program Files (x86)/GRASS GIS 6.4.3RC3/scripts/r.basin.py: line 75: import: command not found C:/Program Files (x86)/GRASS GIS 6.4.3RC3/scripts/r.basin.py: line 76: import: command not found C:/Program Files (x86)/GRASS GIS 6.4.3RC3/scripts/r.basin.py: line 77: import: command not found C:/Program Files (x86)/GRASS GIS 6.4.3RC3/scripts/r.basin.py: line 78: from: command not found C:/Program Files (x86)/GRASS GIS 6.4.3RC3/scripts/r.basin.py: line 79: from: command not found C:/Program Files (x86)/GRASS GIS 6.4.3RC3/scripts/r.basin.py: line 80: import: command not found C:/Program Files (x86)/GRASS GIS 6.4.3RC3/scripts/r.basin.py: line 82: syntax error near unexpected token (' C:/Program Files (x86)/GRASS GIS 6.4.3RC3/scripts/r.basin.py: line 82:if not os.environ.has_key("GISBASE"):' can someone help me? thanks


Possible to Call ArcPy Script From AddIn in ArcGIS 10.0?

Is it possible to call an ArcPy script from a Java/.Net addin in ArcGIS 10.0?


Advanced labeling formatting (centered and different sizes)

I would like to place the elevation-number of a point in a different front size and centred under its name: ![enter image description here](http://i.stack.imgur.com/T9uL9.png) Is that possible? (That is my actual labeling: `label || '\n' || elevation`) Thanks!


wastewater GIS system

Im new to GIS development and I would like to develop a pilot GIS for wastewater network integrated with a work order management system. Can anybody guide me? and what software do I need with low cost?


How Select only specific feature from selected features of more than one layer

I selected features using select feature tool in a map. I want to fetch only specified features among all selected features of different layers. For example, I want to fetch only roads among all selected features(roads, river, buildings..etc). How to do it in .net? Please help me out. Thanks


Find overlapping polylines in same layer in ArcMap?

How can I find overlapping polyline features in a layer in ArcMap without writing any code? I have a PolyLine feature class in a personal geodatabase. It contains some features that overlap another polyline features.If I use "Select by location" menu to find these overlapped features, (suppose I have two different layers based on same featureclass) and use "Share a line segment with the source layer feature" from the dialog box in ArcMap, all features get selected because each feature overlaps with itself. So let me ask my question more exactly: If I have 2 polyline layers in ArcMap based on one feature class, how can I find features from top layer which overlap with features of bottom layer that have different ObjectId. ![This is a layer with only 2 line features that overlap each other.It's in editing mode with one feature selected so we can see its vertices and how it overlap part of another line segment](http://i.stack.imgur.com/fPzFq.png) Any suggestion or idea is really appreciated.


Help installing add-on in GRASS, I get an error message

My Grass gives me this error message, Grass_info_error(4816,1):'make' required. Please install 'make' first. This happens when I attempt to fetch an add-on (r.viewshed). What am I doing wrong? and what is 'make'? Thanks for helping for a Grass newbie. I'm running on Mac Snow Leopard if that makes any difference.


ArcGIS 10 keeps putting space in table value, when nothing is wanted

I have a table with a row Page_Number_N some of the rows have values and others just have a space. For example record 4 is just a space. Field values are Strings.               1     2     3          5      When I start an edit session and delete the space it deletes it. However, as soon as I save edits. Boom the space in the data returns... I have tried removing the space in the field calc without edit session turn on and same result. I need this record to equal "" ie. No spaces or null and I can't seem to get ESRI to cooperate. Does anyone know how to fix this? [EDIT] Clarification.


Adding noise to a raster

I want to add some fine-grained noise to a raster in an automated python process (i.e. I do not want to use Photoshop or GIMP). I looked at PIL, but unless I'm mistaken, it doesn't seem to have any modules for adding noise. So, I'm thinking of using NumPy to create an array of Gaussian values in the three bands (RGB) and then add that to the raster (imported as an array to NumPy). However, I'm sure somebody on the forum has done this sort of thing before and I imagine there could be better ways of going about it. Does anybody have a recipe for adding noise to a raster using python (possibly with GDAL/Numpy/PIL/or something else). Many thanks **EDIT:**   Following Aragon's suggestion, I had a look at the noise module, but I need to use Python 3.2 and this module is quite old (2009) and is for Python 2.x. So I decided to have a go at porting to 3 using the '2to3.py' tool. All goes well until I run setup.py, where I get the following error:               running install     running build     running build_py     creating build     creating build\lib.win32-3.2     creating build\lib.win32-3.2\noise     copying perlin.py -> build\lib.win32-3.2\noise     copying shader.py -> build\lib.win32-3.2\noise     copying shader_noise.py -> build\lib.win32-3.2\noise     copying __init__.py -> build\lib.win32-3.2\noise     running build_ext     building 'noise._simplex' extension     creating build\temp.win32-3.2     creating build\temp.win32-3.2\Release     c:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W     3 /GS- /DNDEBUG -Ic:\python32\include -Ic:\python32\PC /Tc_simplex.c /Fobuild\te     mp.win32-3.2\Release\_simplex.obj     _simplex.c     _simplex.c(224) : warning C4013: 'Py_InitModule3' undefined; assuming extern ret     urning int     _simplex.c(225) : warning C4047: '=' : 'PyObject *' differs in levels of indirec     tion from 'int'     c:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\link.exe /DLL /nologo /INCRE     MENTAL:NO /LIBPATH:c:\python32\libs /LIBPATH:c:\python32\PCbuild /EXPORT:PyInit_     _simplex build\temp.win32-3.2\Release\_simplex.obj /OUT:build\lib.win32-3.2\nois     e\_simplex.pyd /IMPLIB:build\temp.win32-3.2\Release\_simplex.lib /MANIFESTFILE:b     uild\temp.win32-3.2\Release\_simplex.pyd.manifest     LINK : error LNK2001: unresolved external symbol PyInit__simplex     build\temp.win32-3.2\Release\_simplex.lib : fatal error LNK1120: 1 unresolved ex     ternals     error: command '"c:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\link.exe"'     failed with exit status 1120      Any suggestions (either for an alternative library to try or how to port this one from 2 to 3)? Should I take this to the main Stack Exchange site as we're drifting away from GIS now Thanks


Programmatic authentication to ArcGIS Server secured layers via RESTful API

I have an ArcGIS 10.1 Server instance exposing secured mapservices on the Internet. My need is to code down a client application (which I am currently building using the 3.3 version of the ArcGIS Javascript API) enabling the user to view those secured webservices: I think this online ESRI example is a good start. My will is not to have the user prompted for EACH mapservice authentication because I already know that ALL of the mapservices belong to her/him and therefore are accessible by her/him under the same username&password. In my idea, the prompt for credentials should appear just ONCE and therefore the JS code should feed credentials to each of the mapservice via some sort of RESTful login call. To me it doesn't seem like the ArcGIS Server REST API is providing such a call...maybe I am wrong. Is therefore this "RESTful" way to login to secured mapservices feasible with ArcGIS Server (making it possible to access secured services programmatically)? If so, can any of you provide examples or links to web resources explaining this? Thanks in advance


Will NMEA support the GNxx string in future?

At the moment there is no problem when using GPS only devices, NMEA string with information about speed, DOP value etc starts with GP.. prefix. But with Glonass included NMEA string has different prefix GN.. and information about DOP and speed are not recognized in Qgis. Is it planned to update this also? Position is ok, in both cases. regards, radek


Classifying point coordinates to countries or continents?

I have about 50 000 points (latitude and longitude), and I would like to find out in which country each of the points is located. It does not need to be super precise, though. (Or actually I only need to classify them to larger geographical areas (North America, South America, Europe, Africa, Middle East, Ex-USSR, Asia, Oceania), but I assume classifying the points to countries and then the countries to larger geographical area is the way to do it.) How should I proceed? Preferably the tool to do this should be free, run on Linux, and be a command- line tool, or e.g. Python or R program (I can write the program if I find some starting points or hints) or some library that I could use. I have no experience in GIS software, and I would prefer a programmable or a command line solution.


What's the Workflow for buffering in meters/km using WGS84 layers?

I'm a little bit new to GIS, so bear with me a minute.... I'm using QGIS 1.7.4-Wroclaw and working with an SHP layer in WGS84. I want to buffer out to a certain number of kilometers from this layer using the ftools buffer tool. I understand that the buffer tool always uses the layer units, which for WGS84 are decimal degrees. We all know that degrees don't convert consistently to meters, so how should I go about making my buffers? Is it necessary for me to convert the shapefiles to a different CRS that natively uses meters? If so, how do I choose one? Thanks for your patience.


What is the easiest way to detect geometry type from text in PostGIS?

I have some records with different types of 'geometries (poly,line,points)' stored as string. I'm trying to use ST_GeomFromText as I want to do some intersection with them. What is the easiest way to detect whether I should put ST_GeomFromText(Polygon or LineString or MultiPolygon or Point in the SQL besides splitting the string and counting the coords pair? ## Example data:               71.1776585052917 42.3902909739571           -71.1776585052917 42.3902909739571,-71.1776820268866 42.3903701743239,     -71.1776063012595 42.3903825660754,-71.1775826583081 42.3903033653531,-71.1776585052917 42.3902909739571          -71.1776585052917 42.3902909739571,-71.1776820268866 42.3903701743239,     -71.1776063012595 42.3903825660754,-71.1775826583081 42.3903033653531      So the first one should be point, the second a polygon, the third is a linestring. But programmatically i don't know how to differentiate them, unless I split the string up count them up and if it's 1 pair it's point, etc...


Accessing KML for Google Map API using Google Fusion Table

I am trying to host my KML file on fusion table so that I have dynamic control over my KML file and I am trying to access same as in public URI as an parameter in the Google Map Java Script . I am getting lost on how to do it need some help on that .


How to create line with exact same length over and over again?

I need to draw 30 meter lines in specific places. Ctrl+l is too annoying to do everytime. Is there a easy way to define specific same length for a line that I need to draw many times?


Convert measurement geometry from ground reference frame to satellite reference frame

I need to convert solar_zenith_angle, solar_azimuth_angle, platform_zenith_angle, and platform_azimuth_angle from a reference frame at the WGS84 surface to a reference frame at the satellite observer, in 817km altitude. Using lat/lon of the ground reference frame, and using the platform_azimuth_angle and platform_zenith_angle, the first step would be to calculate lat/lon coordinates of the satellite ground point. Next, the four angles can be converted from the ground-based reference frame to the satellite-based reference frame. **Question (a):** Is there am existing script/library to do these kind of conversions, preferably in Python? **Question (b):** If there isn't, how do I consider the WGS84 ellipsoid in my trigonometric calculations (instead of simply assuming a spherical Earth)? **EDIT 1:** Why am I doing this? I want to use a radiative transfer model to simulate spectral measurements from the S-5P satellite. The scenarios I want to simulate are defined by geometry _at the surface_. However, the radiative transfer model I'm using expects the geometry _at the observation platform_.


Why cant I use SelectLayerByAttribute_management while a cursor is set

I've been having a problem with arcpy in that the simple line:               arcpy.SelectLayerByAttribute_management ("TEMP_LINES")      produces this response: Runtime error : ERROR 000358: Invalid expression Failed to execute (SelectLayerByAttribute). Ive worked out that this error only occours when a cursor is set, like this:               lineCursor = arcpy.UpdateCursor("TEMP_LINES","","","combined_i")      Can I not use select by attribute and the cursor or do I have one of them set up wrong? EDIT: whole code:               arcpy.MakeFeatureLayer_management (Lines,"TEMP_LINES")          lineCursor = arcpy.UpdateCursor("TEMP_LINES","","","combined_i")          for row in lineCursor:         arcpy.SelectLayerByAttribute_management ("TEMP_LINES")         arcpy.SelectLayerByLocation_management (Polygons, "INTERSECT", "TEMP_LINES")         arcpy.FeatureClassToFeatureClass_conversion (Polygons, "temp_polys")         polyCursor = arcpy.SearchCursor("temp_polys")         blocks_list = []         for row in cursor:             blocks_list.append(row.getValue("BLOCK"))         blocks_str = ', '.join(blocks_list)         lineCursor.BLOCK = blocks_str


How to use ggplot with Processing in QGIS 2.0?

I'm trying to use R scripts within QGIS thanks to Processing. There are some example scripts available and I achieved to plots different columns of the attribute table (with the plot built-in package). What I cannot do is using the ggplot package. This is one of the simple code I've written:               ##Vector processing=group     ##showplots     ##Layer=vector     ##Field1=Field Layer     ##Field2=Field Layer     library("ggplot2")     ggplot(Layer)+     geom_point(aes([[Field1]], [[Field2]]))      But none plot is shown. Log output says:               R execution commands     options("repos"="http://cran.at.r-project.org/")     tryCatch(find.package("ggplot2"), error=function(e) install.packages("ggplot2", dependencies=TRUE))     tryCatch(find.package("rgdal"), error=function(e) install.packages("rgdal", dependencies=TRUE))     tryCatch(find.package("raster"), error=function(e) install.packages("raster", dependencies=TRUE))     library("raster")     library("rgdal")     Layer = readOGR("/media/data/Universita/brema/gis/file_tesi/piezo_e_logger",layer="piezo_tutto_finale")     Field1="Br"     Field2="Ca"     png("/tmp/processing/f02d43598eb44b63aec89c02de38af54/RPLOTS.html.png")     library("ggplot2")     ggplot(Layer) + geom_point(aes(Layer[[Field1]], Layer[[Field2]]))          dev.off()      And that's a piece of the dbf table (trying to plot Cl vs Br):               ID                     Cl   Br     2818/22/0834    125.70  0.20     2818/22/0851    219.12  0.29     2818/22/0853    298.55  0.26     2818/22/0886    132.32  0.09     B0F                520.60   1.01     B12T           3435.49  3.83     B1T                2322.61  2.54     B21T           2800.90  3.18     B22F            366.87  0.64     B26T           1891.63  2.10     B33F            216.97  0.62     B4F                 383.98  0.44     P1                   82.01  0.14     P21                 365.56  0.74     P24                 199.98  0.73     P25                 308.71  0.90     P27                 217.58  0.58     P28                 436.09  0.32     P29                 711.77  1.08


How to import qgis.core to python IDLE?

I try to follow the step in How to import qgis.core to python app? to import qgis.core with Python Shell. But when I type               set PYTHONPATH=C:\Program Files (x86)\Quantum GIS Wroclaw\apps\qgis\bin      it report               SyntaxError: invalid syntax      and highlight PYTHONPATH


3D photography visualisation and data acquisition

Couple of years back, i remember seeing a demo on web from Microsoft (i think it was) which showed a web application which was displaying what i would describe as a "cloud" of terrestrial survey photos shown in 3D, where the user had an option (via UI) to quickly jump from one image to the other in 3d and while doing so, he basically moved through 3D space where images were positioned and rotated according to their real life locations. In order to jump from one image to the other, overlap was required. The example was for one building shot from multiple locations, but this was not your ordinary stereo photogrammetry, im guessing some form of ray intersecting concepts were indeed still used. I'd like to know how is this application/context called, and if there are perhaps already tools available for data acquisition (vectorization) of objects in such 3D image "clouds". UPDATE: Finally found what the app was: MIcrosoft Photosynth... Now... i wonder if there is something more advanced fro photogrammetric purposes perhaps? Check here: http://www.microsoft.com/web/solutions/photosynth.aspx


Importing metadata from HTML into ArcCatalog fails

I downloaded restricted areas shapefile from here: https://webgis.dme.qld.gov.au/webgis/webqmin/viewer.htm It came with a rst.html file, which, on opening, displayed a page exactly the same as the 'Description' tab in ArcCatalog. Enthused, I imported this file into ArcCatalog, hoping it would transfer all the information automatically. Unfortunately, however, it only imported the bounding box coordinates and put the name of the shapefile as the heading. Anyone know what went wrong? Wil


Are you able to buffer labels to prevent other labels within the buffer area?

I saw a post that talks about label offsets, but that was in 1.7. I did some internet research with no success. Is there a way to apply a buffer area so that labels from another layer are not placed in the buffer area? Otherwise the only option that I can think of is actually moving all labels that are in conflict manually.


I've been searching the net for a couple of days to find a way, how to check if a wms layer has no features... Let me explain I'm using openLayers/geoserver/postgis. I'm using a cql_filter to search a wms layer. If the filter returns some features (points or lines or polygons) then i redraw the layer and they succesfully render. But, if no features are rendered, I want to alert a message using javascript. The message simply gives some info, like "no matches found, please try again". I guess I have to check if there are no features, and then alert the message. Right? Or is there another way to do this? Please help, I'm new to web- mapping.... Thanks UPDATE Uhm, I'm not saying that your answers are bad, but... I was thinking, using a simple getFeatureInfo, with no feature.count parameter, after I redraw my layer. If the text that returns is empty, then there are no features rendered (= no matches found). I came up with this idea, playing with the demo requests on Geoserver, using the getFeatureInfo. The syntax they use there, returns all the features...So, I will do the same thing and if no features returned I get what I want... But how to check for an empty text? Or this idea is completly wrong?


How to add color interpretation for raster bands using GDAL?

I have 3 separate 1-band GeoTIFF files. The color interpretation for band is gray. I want a 3-band RGB file. I've used gdal_merge.py               gdal_merge.py -separate file1.tif file2.tif file3.tif -o output_file.tif      But the color interpretation for the 3 bands of the resulting output_file.tif is gray, undefined, undefined. Apart from that, **all pixels are 0**. If I execute pct2rgb.py, I get a RGB file:               pct2rgb.py output_file.tif output_file_rgb.tif      But of course, the pixels are 0 too. So, I have 3 questions:   * Is gdal_merge.py the right tool to combine 3 1-band files in one 3-band RGB file?   * Why am I getting undefined color interpretation for bands?   * Is pct2rgb the right tool to transform 3-band files with this color interpretation to RGB files? **UPDATE** : The rasters does not have a color table. Just color interpretation: Gray. On other hand, pixel values goes from 0 to 1023 (this is deliberate) More data: they're rotated rasters (no north up), but all of them have the same geotransform. **UPDATE 2** : I can warp the images to make them north up, construct a VRT and add ColorInterp for each band, but I still get color interpretation as gray, undefined, undefined in the output result. The problem is I need to create a color table in, at least, the first band. I know the way to create them, but I don't know how many entries should my table have. Why are there 13 entries in the example of GDAL Raster FAQ? All the pixels have values between 0 and 1023, if helps. **UPDATE 3** : Apparently, there's no way in the TIFF format to really specify the color interpretation of each band. The way GDAL builds the color interpretation when reading a TIFF file is a combination of the value of the PHOTOMETRIC and EXTRASAMPLES tag. Reading about these tags:   * PHOTOMETRIC represents the color space of the image data. A value of 2 means that the components of a pixel value are RGB, but it assumes Byte pixels, and I have UInt16 pixels (I tried `-co "PHOTOMETRIC=rgb"`, and got an error). So, I can't specify PHOTOMETRIC tag for the output file.   * EXTRASAMPLES specifies that each pixel has N extra components. I'm not sure about how to use this tag to create my merged file. Or if a I need it. So, in update 2 I suggest the creation of a ColorTable, but how? In my 3 input files, pixel values go from 0 to 1023. Do I have to match them with colors? Do I have to create a ColorTable with 1024 inputs? How? In update 3, seems that I could use some GeoTIFF tags when creating the merged file, but I'm not sure if I really can use them, or how.


Where can I find Foursquare Datasets?

I'm doing research which aims to analyse location based social networks. So the Foursquare dataset is suitable for me. Is there any Foursquare dataset available? I need 4 information in the dataset: userID (number is ok); position(long,lat); time; relationship between user. Thanks a lot.


Visualize Spatial Data in Reporting Service

Is it possible to visualize a piece of geographical map from SQL server Spatial data (geometry, not geography) in a report from reporting service? If yes, how should it be done in a course of action. A concrete example is to display the orange line from the Chinese subway's map in a specific reporting page. ![enter image description here](http://i.stack.imgur.com/U8FwC.jpg)


HelloWPS Tutorial GeoServer

I have a problem with creating WPS-Processes for GeoServer. I followed the "Hello World Tutorial": When I want to start GeoServer, the application doesn't work anymore ( _"The requested resource is not available."_ ). I'm using Geoserver Version 2.2.2 (with Tomcat Webserver) and Maven 2.2.1. First I created the Folder hello_wps, added the pom.xml (edited the version number from               <groupId>org.geotools</groupId>     <artifactId>gt-process</artifactId>     <version>8-SNAPSHOT</version>      to               <groupId>org.geotools</groupId>     <artifactId>gt-process</artifactId>     <version>8.4</version>      Then I used the maven command "mvn eclipse:eclipse" to create the Java Project for Eclipse. I imported the project in an Eclipse workspace, created the class HelloWPS.java and added the applicationContext.xml to the folder resources. Finally, I created the *.jar with the command "mvn clean install" (I wanted to use the option "-Pwps", but that didn't work). I copied the _.jar-file to the ._.\apache-tomcat-7.0.33-windows-x86\apache- tomcat-7.0.33\webapps\geoserver\WEB-INF\lib* folder What can I do?? That's the log when starting Tomcat               SEVERE: bean lookup error     org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [org.geoserver.wps.gs.HelloWPS] for bean with name 'helloWPS' defined in URL [jar:file:/C:/Program%20Files/apache-tomcat-7.0.33-windows-x86/apache-tomcat-7.0.33/webapps/geoserver/WEB-INF/lib/hello_wps-2.2-SNAPSHOT.jar!/applicationContext.xml]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: org/geotools/process/gs/GSProcess         at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1265)         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:576)         at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1331)         at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:317)         at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:298)         at org.springframework.context.support.AbstractApplicationContext.getBeanNamesForType(AbstractApplicationContext.java:1150)         at org.geoserver.platform.GeoServerExtensions.extensions(GeoServerExtensions.java:110)         at org.geoserver.platform.GeoServerExtensions.bean(GeoServerExtensions.java:291)         at org.geoserver.config.GeoServerLoaderProxy.lookupGeoServerLoader(GeoServerLoaderProxy.java:71)         at org.geoserver.config.GeoServerLoaderProxy.setApplicationContext(GeoServerLoaderProxy.java:39)         at org.springframework.context.support.ApplicationContextAwareProcessor.invokeAwareInterfaces(ApplicationContextAwareProcessor.java:117)         at org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:92)         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:394)         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1448)         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)         at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)         at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)         at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:740)         at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:449)         at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:385)         at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:284)         at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)         at org.geoserver.platform.GeoServerContextLoaderListener.contextInitialized(GeoServerContextLoaderListener.java:18)         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791)         at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)         at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)         at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1655)         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)         at java.util.concurrent.FutureTask.run(FutureTask.java:166)         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)         at java.lang.Thread.run(Thread.java:722)     Caused by: java.lang.NoClassDefFoundError: org/geotools/process/gs/GSProcess         at java.lang.ClassLoader.defineClass1(Native Method)         at java.lang.ClassLoader.defineClass(ClassLoader.java:791)         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)         at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2904)         at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1173)         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1681)         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)         at org.springframework.util.ClassUtils.forName(ClassUtils.java:258)         at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:417)         at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1283)         at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1254)         ... 39 more     Caused by: java.lang.ClassNotFoundException: org.geotools.process.gs.GSProcess         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)         ... 50 more


How to make Geological Cross Sections in Adobe Illustrator, and any suggestions for GIS software?

I have been tasked with producing a geological cross section in Adobe Illustrator. It is a lengthy process, as I am new to the software. I never learned it in my GIS studies. I know that there is plenty of GIS software out there to produce x sections automatically (we have Petrel for example), but they want it done in Adobe Illustrator as it's not a data driven x section. Does anyone have any familiarity with doing such a thing? I am having to basically use the cutting tool to divide up a box into the sedimentary layers. Then I fill the cut shapes with the correct colour. Complications arise, however: I have to show wavy lines between some sedimentary layers to indicate a gap, or layers which aren't shown. I am using the distortion tool to automatically produce the wavy line, which means I need to: a. copy/paste the original area b. change the appearance so there is no fill, delete all strokes except the one which will turn into the wavy line, apply distortion c. copy/paste the original area d. change the appearance so there is no fill, delete the stroke that will turn into the wavy line, change stroke to black line This means I have 3 elements whenever there is a part of the cross section showing a wavy line: the area which has a fill but no stroke, the wavy line (derived from the area by deleting the fill and strokes which aren't wavy), the rest of the stroke around the area. ![AI stroke problem](http://i.stack.imgur.com/gGutM.png) Does anyone know of a faster way to do such a thing? I wish I could just draw a shape using some sort of line tool and AI would detect when there is a closed off area so I could then select a colour fill. Another problem is the cutting tool does not make it easy to produce matching curves: ![Matching curves problem](http://i.stack.imgur.com/bhbOC.png) In this image you can see that there is a wrinkle across many sedimentary layers, but my cutting skills in Illustrator mean that the lines do not follow a nice uniform shape. Of course this is the case in the real world as well, although at the moment the image has a bit too much of a 'hand drawn' look to it. Part of the problem is that the cutting tool, usually helpfully, smooths out the cut line as one goes (digitising a smooth curve with a mouse is impossible!). Sometimes this smoothing has undesired effects. It would be good to know if I can apply an offset to another line when cutting. Is it right that I should be using the cutting tool as my primary way of setting up a x section, anyway? I'm thinking a better way to do all of this would be to somehow have a tool that enables me to select vertices across multiple lines in sedimentary layers, then drag them up or down. This would then apply the same amount of curve across the layers.


Sum raster data visible from given point, by proportion of view

I am wondering if there is a tool that does the following (preferably in Arc but other options considered). Simple example: **what proportion of the view from a given point on the landscape is occupied by a given land use type?** You might think you could do this by computing a viewshed and using zonal statistics to sum the land use over the area of the viewshed. However, this will give an answer as a proportion of land area, which will therefore be biased towards more distant land uses - if you can see a long way, you can see an enormous area even if it only occupies a small proportion of your view. So as far as I can tell, the tools in Arc do not do the job. More complex example: **Sum the weights on a raster by proportion of view they occupy from a given point**. Essentially the same as the first example but now dealing with continuous values rather than 1 and 0 identifying the land use type. More complex example yet: **Sum the weights on a raster by proportion of view they occupy for each point in the output raster**. Same as the first example but repeated for every point.


onLayerAdd function why dojo.connect?

I am building a map application, calling layers from an arcgis-server using the javascript api. Maybe I am being stubborn, but I am trying to minimize my use of dojo throughout this process. Much of my previous experience has been using other APIs like cartoDb, google maps and I prefer using jquery and pure javaScript. I am going to build a dynamic list of layers and legend items by iterating through the layerInfos of the dynamicMapServiceLayer that I have added to my map. I have found that I cannot itterate through the layerInfos until after the layer has been added to the map. To detect this I am using the onLayerAdd event. The only way I've been able to use the onLayerAdd event is to also use a dojo.connect               dojo.connect(map, "onLayerAdd",testFunction);      Do I have to use dojo.connect? If so why? It seems like it would make more sense to do something like               map.onLayerAdd(testFunction)      Thanks in advance....


Differences between Raster Dataset, Raster Catalog, and Raster Mosaic

I have about 40 scanned, colorful Geology maps that are GeoTiffs. I want to bring them into an Esri FileGeodatabase to lower their size, combine them as one and display them with a mostly transparent overlay that is also scanned. Right now they are individual Tif Images and I'm not sure which is the best way to store them in a FileGeodatabase. Does anyone have experience with these and could you tell me when I would want to use one and not the others? Eventually we will have an ArcServer, but for now they will be served from a Geosoft DAP server. They will mostly be displayed in Arc 10.0, or 10.1, but will any of these options display well in Geosoft Target? Edit: So after some more research I've found that none of these options are useable by Geosoft. At least not in a File Geodatabase. So what we will end up doing is making two mosaic rasters and save them as GeoTiffs with Packbits compression (which Geosoft supports, LZW on the other hand is not supported by Geosoft). One for the Geology and one for the Overlays. The compression will work great for the overlays which are mostly just one color with some black features, so the file size will be a fraction of the uncompressed size. As to the difference between the 3 options I was considering, I'm still fuzzy on it. So if anyone has a good explanation, I would still love to know...


How can I manipulate the timestamps in a GPX file?

I have a GPS tracked stored in a GPX file. Now I'm looking for a tool that allows me to set the start time of the track and the duration, and the tool should automatically evenly distribute the appropriate timestamps for all my recorded points in the track. The tool should be free and run on OSX.


Radio station coverage areas for the UK

In the US, the FCC (Federal Communications Commission) publishes transmitter data about TV and Radio stations, including information about their respective service area boundaries. Using the published data you can derive station details and coverage area maps, like what is linked here and here. Does anyone know of similar publicly available data for AM & FM radio stations in the UK? Ultimately I would really like to find or generate coverage area maps that I can put into my own application.


Calculate the perimeter of a polygon

I have a feature layer with land parcels. Each parcel is a polygon. So, I want to calculate the perimeter of each polygon using VBA and ArcObjects. Is there any ready code in VBA and ArcObjects to do this? Any help please? Thanks Deme


How to intersect shape files with elevation models?

I have a high resolution digital elevation model (DEM) and a line shape file displaying a bycicle track. The DEM has 1 meter resolution. The line shape is something like 25 km long. What I need is a detailed elevation profile of that track, let's say one coordinate every 1 meter. What I've tried so far is to convert the `shp` file to `gpx` files and used tools like gpsvisualizer or gpxplot to plot elevation profiles of the track. I used a great circle calculation afterwards to find out the distances between the points. ![simple elevation profile](http://i.stack.imgur.com/fX3K6.png) The distance between single points varies from 3 to 700 meters which makes this plot useless. The main problem is that the conversion of line shape to GPS coordinates only generates the corners of the line but not points inbetween somewhere on the edge of the line. I'm wondering is there an easy way how to use my elevation model (available in AutoCAD files format `adf`) to intersect it somehow with the line shape to plot some detailed elevation profile both in numerical (lat, lon & elev. or x, y & z) and graphical ways? I need this to do further analysis on the given bycicle track.


How to extract elevation data from binary .ADF elevation format at given coordinates?

I have a high resolution digital elevation model available. The ground resolution is 1 meter and the file format is `adf` which is some binary ESRI grid raster format. I have a script the outputs x/y- or lat/lon-coordinates and as a next step I have to extract the elevation of the given coordinate from the binary `adf` file. But that's a huge one. The file is like 1.5 GB in size and I haven't found a way yet how to access the data via a headless command line or script. How to access `adf` files via script? Is there any programmes available or are there any known libraries I could use? Or should I rather convert the `adf` to some ASCII text files? But that will cost a lot of disk space and performance. I've been reading about elevation databases. How to create one from my elevation model? Is it worth a try regarding performance? **Update** : To break this down, in short - How to access `adf` files or elevation data most efficient using a script with coordinates as parameters?


Obtaining friendly names for ArcMap layer data types

Using ArcObjects, is there a way to programmatically obtain the "friendly name" for a layer's data type as seen in the ArcMap Source tab for layers in a map document? e.g.:   * File System Raster   * Shapefile Feature Class   * Tiled Internet Layer Or is this ArcMap-specific code and not exposed to ArcObjects?


Append or merge consecutive line segments (contours) as one single line of the same elevation value

Is there a way using python (ArcPy) or ArcGIS 10.1 tools to collect consecutive line segments having the same elevation value and appending/merging/generating one single line from them? Each resulting line will have the same elevation value as the original segments. Sorry, supporting image blocked for guest post.


How to find the total number of people who live in a ward 5 miles or less from a closed bank?

I am currently using QGIS 1.8.0 and need some assistance with a 'Select by Location' query. I have a data layer showing all UK wards (containing data on ward names, areas and populations) and another with all bank branches. I have run a query to find all the bank branches that have closed. I now want to run a query to find the total number of people who live in a ward 5 miles or less from a closed bank. Please advise as to how to do this.


Batch Mode Routing for Fastest Route Distance

I would like to run a batch process to derive the total driving distance between points, for a largish set of point-pairs. e.g. I would have data something like:               Start_ID    Start_Lat    Start_Long    Dest_ID    Dest_Lat    Dest_Long     00000001    42.12345     -76.54321     10000000   41.12345    -75.54321      What I would like to get returned from this is the driving distance. I have tried this using a few web services, but the latency is such that it would take too long for my purposes. I have potentially millions of routes to compute, so a latency of a couple seconds quickly adds up to way too much! :) I have seen some references to setting up an OSRM instance as well as other references to PostGIS with pgRouting. I don't know these tools, so I am not sure if they would meet my requirements or if there is another tool that would be better. So, what good solutions exist for generating total driving distance for many pairs of points, to execute in batch mode?


Merging polylines together keeping the attributes of the largest one

I have a set of polygons with polylines running through them. I am trying to assign the polylines the polygon ID that they pass through the most. I have already split the polylines to the polygon boundaries, merged the individual shapefiles together keeping seperate features and joined them spatially to the polygons to give them the polygon IDs. The issue I now face is to dissolve the features based on their polyline IDs while making the features keep the attributes of the section that is longest in a polygon. For example, if 60m of a polyline falls in polygon 1 and 40m of it falls in polygon 2, the rejoined line keeps the attributes of the section in polygon 1. There may be any number of features to merge. Notable Condition: Some polylines may have more length outside of a polygon than inside. For those lines, I need the line to keep the attributes of the one that passes through a polygon. For example, if 5m of the line passes through polygon 1 and 95m of it pass through empty space, the merged attributes should reflect the line passing through the polygon Here is the basic logic that I believe will work. I am just not sure how to code it into python or if there are tools that can accomplish what I am trying to do. Select two line features. When one line has lineid = 1 and the second has lineid = 1, check for polygon ids in both, if only one has a polygon id, merge based on the one with an id, if they both have polygon ids, compare the lengths and merge based on the one that is longest. Move on to the next feature. I am not sure if they need to be compared one at a time or if the dissolve tool or something else incorporates this kind of code. Thoughts? I am using ArcGIS 10.0


How to define a BoundingBox when using GDAL's WCS Driver (Java API)?

Is it possible to define a bounding box when requesting a coverage subset using the GDAL WCS Driver, accessed using GDAL's Java API? I've read several mailing lists and related posts on gis.stackexchange, but have not located a clear solution. The driver documentation (http://www.gdal.org/frmt_wcs.html) does not contain a bounding box definition, unlike the WMS driver. I attempted to define the bounding box in the xml configuration, but the requests generated by the driver when using gdal.open(wcs.xml) return the entire coverage instead of the requested area.               <WCS_GDAL>     <ServiceURL>http://myserver/geoserver/wcs?</ServiceURL>     <Version>1.1.0</Version>     <CoverageName>MyWorkspace:MyCoverage</CoverageName>     <GetCoverageExtra>&BoundingBox=65.0104,31.1977,65.3287,31.4623,urn:ogc:def:crs:OGC:1.3:CRS84</GetCoverageExtra>     </WCS_GDAL>      AND               <WCS_GDAL>     <ServiceURL>http://myserver/geoserver/wcs?BoundingBox=65.0104,31.1977,65.3287,31.4623,urn:ogc:def:crs:OGC:1.3:CRS84</ServiceURL>     <Version>1.1.0</Version>     </WCS_GDAL>      Ideally, I'd be able to retrieve the required data and process it using tools provided by the GDAL. I am able to define a url string (below) containing the desired bounding box, open an HttpUrlConnection, and get a MimeMessage containing the desired raster data as an InputStream.               String url = "http://myserver/geoserver/wcs?service=wcs&version=1.1.1&request=GetCoverage&format=image/geotiff&identifier=MyWorkspace:MyCoverage&BoundingBox=65.0104,31.1977,65.3287,31.4623,urn:ogc:def:crs:OGC:1.3:CRS84";      However, I haven't figured out how to convert the InputStream to a GDAL DataSet object.


Creating a multispectral image from scratch

I want to make a multispectral image from cero to do some tests on it. Something really simple like 5 completely uniform bands with salt and pepper noise on them or a square of different values at the center. Clearly this would just be a stack of matrices, a multidimensional array, which is pretty straight forward to generate. I want to achieve this using python and gdal but gdal is being pretty hermetic, I don't get the hang of it at all. I ideally would want to create a geotiff file. Could anyone help me on this? some pointers or some gdal tutorial which is very gentle? Thank you all.


How to select polygons containing points?

I have a dataset that contains more than 10,000 polygon features. I also have a point layer with 300 points, some of which intersect the polygon features. I want to make a query and create a dataset of those polygons which contain at least one point. How can I do this?