Add memory layer to a preexisting PostGIS table

I'm trying to append a memory layer to a preexisting PostGIS table. The DB connection is already established (in this way: How to properly establish a PostgreSQL connection using QgsCredentials) and, based on a check done on a table, I generated a memory shp that can be easily added to the map canvas or "right-clicked and saved as" from the TOC. Here (unable to call shp2pgsql using python) I've found a way to accomplish this using **subprocess.Popen** or more simply, as suggested, using **os.system** to run a command in a subshell.               # Whitout adding it to the map canvas as follow:     # QgsMapLayerRegistry.instance().addMapLayer(mem_layer)     # I wanted to use shp2pgsql to append its records straight to a PostGIS table          os.system("shp2pgsql -a -s 3857 -g the_geom mem_layer SCHEMA.TABLE_NAME")      Can the records of a memory layer be appended to a preexisting PostGIS table? I don't get any error while running the code but no record is appended to the DB Table. What am I doing wrong? Thanks, m. **-EDITS-** I have been doing some testing with shp: I can run a command from shell and add a table (coming from the aforementioned memory file saved as a shp) into the destination schema. The following command works:                shp2pgsql -s 3857 -I /path/table_to_be_added.shp SCHEMA.table_to_be_added | psql -h HOST -d DB -U USER      Using SPIT, I can add the shp to the schema and append it (SQL) to the destination table (not considering the GID field):               INSERT INTO SCHEMA.destination_table (field1, field2, ...) SELECT "field1", "field2", "..." FROM SCHEMA."table_to_be_appended";      When I try to append the shp from cmd using the following command (the one I'd like to use as a parameter for **os.system()**               shp2pgsql -a -s 3857 -I /path/table_to_be_appended.shp SCHEMA.destination_table | psql -h HOST -d DB -U USER      I get the following error:               new row for relation "destination_table" violates check constraint "enforce_geotype_the_geom"      I tried many combinations of flags for that command but nothing worked! I am still wondering if a memory file can be appended to a preexisting PostGIS table (as stated in the title) and how to do so, but if anyone had some clue about all of the above, that would be much appreciated. Thanks again, m.


OpenLayers Hide/Show Layers from external checkboxes

I'm using OpenLayers with mapserver to display a lot of raster images and queryable wms layers. Everything works fine, the layers can be turned on/off in the OpenLayers layer switcher...But now I want to turn on/off the layers by external checkboxes and I don't know how to do this. I'm little bit new to Javascript-the only thing I know is that I have to pass the checkbox layer value to an OpenLayers function. Till now I tried to call a function with an onClick event `<input type="checkbox" name="ckeckbox_layer1" onClick="layervisibility(this.checked);">` But I don't know how the function 'layervisibility' has to look like so that my layers that are actually placed in the openlayers init() function turn on/off correctly when I check/uncheck the checkboxes.


How to fix "No QGIS data provider plugins found" erros in QGIS for Android?

I've bought a Samsung galaxy note 10.1 2014 edition, running with android 4.3. I've downloaded several versions of qgis for android (7 and 9). When I start QGIS, the message "No QGIS data provider plugins found in: \data\app-lib\lib no vector layers can be loaded" appears and I am not able to open or create a shapefile What can I do?


How do I create attributed line segments between two known points?

I have stream survey data that is spatially referenced every 10th habitat unit by a point. There are 10 habitat units between each point along the survey and I need to figure out a way to spatially reference each individual habitat unit. The habitat unit lengths are known from the survey but are not individually referenced. Does anyone know how to complete this task?


Alternative way to generate service area in ArcGIS - No Network Analyst License

I am working on a project currently that relates to creating service areas for points across California based on streets. I created a python script that can take a point and create a buffer around it, get intersection points of where the buffer intersects streets and then create a smaller buffer around those points. This would continue until the buffer size would be 0. An example is starting with a 5 mile buffer and work down in one mile increments until reaching 0. This was our original make-shift idea of creating service areas without a network analyst license. I realized after doing this though that this does not take into account at all that matter of possible barriers. Such as a river in-between 2 parallel streets – this form of analysis might include that parallel street even if there was not a nearby bridge to actually cross over into the street. I am now trying to find an alternative method that can do something similar but account for possible barriers like that of the service area tool in Network Analyst (I am trying to find a workaround due to licensing limitations). Do you have any possible ideas of a way I can do this type of analysis without having to use Network Analyst? Thanks for any help or suggestions you can provide.


Leaflet SVG layer is obscuring the underlying GeoJSON interactivity

I have SVG on top of GeoJSON in my map. How can a leaflet SVG overlay be placed outside of the leaflet-overlay-pane while keeping GeoJSON in-place within the leaflet-overlay-pane? (For example, how could I put just the SVG into say the leaflet-shadow-pane and then turn pointer-events off on the leaflet-shadow-pane... thus making it possible to interact with the GeoJSON?) Thus-far, when I set: .leaflet-overlay-pane svg { pointer-events: none; } ...it seems to disable to disable pointer events to both the SVG and GeoJSON, which defeats the purpose.


Creating regularly spaced, defined # of points within polygon in QGIS

I used the research tool "Regular Points" to produce a certain number of points within a polygon, but it forms a rectangular grid of points rather than only within the shape of the polygon. Since I need a certain number of points within the polygon, is there any way to do so without trial and error? E.g. right now only 8 of the 25 points I want are within the polygon, but I want 25 points, so I could increase to 50 points and see how many then appear within the polygon ![enter image description here](http://i.stack.imgur.com/5blXs.png)


How to save label scales?

When I open a QGIS file, QGIS 1.8 resets the scale factors for all labels. Is there a way to save the file so that it knows to also save the label scales?


ET Geotools Split Lines at Vertices Issue

This might seem like a really simple question but for whatever reason I can't figure it out. How do I run the split line tool in ET Geotools on an entire polyline layer? I can do it for a single feature within the layer but I am unsure of how to apply it to the entire layer.


add grid to GetFeature Info tool

I have added the GetFeatureInfo Tool to my Viewer but the PopUp does not have a grid in it to display the Feature Info neatly. How do I get the grid layout in the Feature Info PopUp, like the one that we are able to see in the popup box in the feature edit tool?


how to execute a python tool in ArcGIS 9.3

I have a problem executing the code below. The file is not found in split_row_0717.py Please kindly help any modification and thank you. The error said that Traceback (most recent call last): File "C:\Python25\Lib\site- packages\pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in **main**._ _dict_ _ File "H:\python_p\python_code\split_row_0717.py", line 46, in gp.SplitByAttribute_Analysis2(fc, fieldName, outWorkspace, fieldName) AttributeError: Object: Tool or environment not found               ##Script Name: split rows     ##Description: using      ##Created By: Elaine Kuo     ##Date: 12/07/2012               #Import standard library modules     import arcgisscripting     import os          #Create the Geoprocessor object     gp = arcgisscripting.create(9.3)               #Set the workspace.     gp.Workspace= "H:/temp/test"               #Set the workspace. List all of the feature classes in the dataset     outWorkspace= "H:/temp"          # Add a toolbox with a model to the geoprocessor and set the workspace     gp.AddToolbox("C:/Program       Files/ArcGIS/ArcToolBox/Toolboxes/AdditionalAnalysis/Additional Analysis - Generic Tools.tbx")               #Get a list of the featureclasses in the input folder     fcs = gp.ListFeatureClasses()          # Loop through every item in the list that was just generated     for fc in fcs:              # Break out the name, no path or extension, using the describe object.         desc = gp.describe(fc)         featureName = desc.name              # Validate the new feature class name for the output workspace.         OutFeatureClass = outWorkspace + os.sep + gp.ValidateTableName(fc,outWorkspace)              #get file name         fcName, fcExt = os.path.splitext(fc)               #build field name         fieldName = fcName              #### Execute Script Tool ####         gp.SplitByAttribute_Analysis2(fc, fieldName, outWorkspace, fieldName)               gp.AddMessage(gp.GetMessages())     print gp.GetMessages()


How to choose the correct WPS platform?

I have some shapefiles & I want to implement some known GIS algorithms (buffer, intersection, voronoi, etc) & serve the results using an Openlayers UI through WPS. A minimal setup could be a WPS platform & and a web page having some Openlayers code. I did a quick search in ZOO & 52-north but I am not sure where to start. My feeling is that ZOO intergrates better with Openlayers but even the installation seems too complicated.. Any ideas or even better any success stories (just to avoid re-inventing the wheel)?


Extract longitude and latitude from shapefile

I want to create a media wiki page with map option where polygon required the following format. What is name of this format and how can it possible to extract this format from shapefile? `polygons=62.103882522897855,5.09765625:58.309488840677645,5.712890625:58.95000823335702,10.8984375:61.68987220046001,12.83203125:63.35212928507874,11.865234375:64.1297836764257,13.974609375` Detailed format can be found here http://semantic-mediawiki.org/wiki/Maps_examples/Google_Maps_shapes


Displaying HTML popups for feature service

This bit of information caught my eye today as I was reading about Feature Services in the ArcGIS Server .NET help: > Feature services also support HTML pop-ups setup in ArcMap. HTML pop-ups are > a powerful and easy way to share HTML formatted information about features. > They work much like the Identify tool, except that the information display > can be customized HTML. I set up the HTML popup in ArcMap and it worked as expected, and then I published a map service. The REST endpoint of my service now shows esriServerHTMLPopupTypeAsURL as the HTML Popup Type, however, I can't seem to find a sample, etc. that shows how to display the popup in a web application. Does anyone have a link to a sample, or some sample code, that can show me how to do this? I have looked through the JavaScript API samples/reference and didn't find what I was looking for (or what I thought I should be looking for). Thanks, Tim **Edit:** Thanks to those who supplied answers for the links. I think I need to re-phrase the question: I'm not having problems getting the popup to display - that is working fine. My HTML popup type is set as PopupTypeAsURL, so I was expecting the popup to display the contents of the URL, say http://whateversite.com. Essentially I want the popup to display a web page or web form. Is this possible?


Android app where i can import image and set waypoints by GPS

Hello i'm looking for an application for android where I can upload a large image raster and apply for it `these GPS waypoints. We would like to count the trees in the area, we have the exact raster images from the plane. Because our GPS signal is too small and we cannot add waypoints without this. I found a lot of apps but i in those I can only add shape. I don't have shapes. Thank you for any idea.


Handle annotation layers with arcpy

I want to access annotation layers using arcpy (the purpose is to verify few text strings in text annotations). By annotation I mean **draw tool annotations** , not dynamic labels. These annotation layers are under a groups layer by the name of 'Default'. The Esri documentation talks of draw annotation as being layers themselves : > There are essentially three categories of layers in a map document: feature > layers, group layers, and raster layers. The isFeatureLayer, isGroupLayer, > and isRasterLayer properties allow you to identify or isolate the majority > of layer types but not all layer types. **_There are a few specialized > layers and datasets that don't fall into one of these three categories: > annotation subclasses, dimension features, network datasets, terrain > datasets, topology datasets, and so on. In these cases you may need to test > other properties to isolate a layer of interest before doing something to > it._** One thing to be aware of is how ArcGIS handles draw annotations, two mean configurations are possible : > ArcGIS fully supports two types of annotation: geodatabase and map document In my case, it's map document. * * * In light of all this documentation, it so appears that draw annotations are mere layers, thus a simple code such as this should be working :               mxd = arcpy.mapping.MapDocument("some\mxdpath\here")     df = arcpy.mapping.ListDataFrames(mxd,"Layers")     lyr = arcpy.mapping.ListLayers(mxd,"current_annotation_layer",df)       But the problem is the annotations do not seem obtainable via dataframe (which is weird considering each of my annotation layers is associated to a feature layer). * * * Any specific arcpy class to access annotations (one comparable to IAnnotationFeature2 of ArcObject SDK)? Any workaround ? Thanks !


ERDAS Imagine 2013 NDVI fail

i have a problem with NDVI in Erdas Imagine. Instead of NDVI image it makes a mask, which is not suppose to make. Do anyone know where the problem is?


Why am I unable to dock Main Menu in ArcCatalog?

For some reason the Main Menu dis-attached itself from the ArcCatalog window and I am not able to dock it or even move it when i click the menu title bar. The functions work but it's just stuck in place on screen and I can't do anything with it. The title bar itself appears dimmed. ![enter image description here](http://i.stack.imgur.com/IuEjF.png)


Select point with highest value within a buffer

I work with ArcMap 10.2.1 and I created buffers around points. Some buffers contain many points and others just one. I would like to select one point for each buffer, but the points can represent different attributes having different values. So when I have for example one buffer with two points, one point could be organism one and the second point could be organism two. Organism one has a value 30% and organism two has value 70%. I would like to select organism two and delete organism one from the buffer (file). Only thing is I have many buffers, with varying amount of points (organisms) and different percentages..So I would like to do it for all the buffers.. I am using modelbuilder as I do not know python. Does anybody have a suggestion? That would be great!


I need to configure geoserver proxyHost even standing on my local machine?

I'm with geoserver on my local machine running on port 8080 on jetty which is standard in windows installer. I want to use my GetFeatureInfo WMS layers, but I have the following questions: I need to configure proxyHost even being on my local machine? Can I use ProxyHosto GeoServer running with Jetty as the default installation for WindosEstou with geoserver on my local machine running on port 8080 on jetty which is standard in windows installer. I want to use my GetFeatureInfo WMS layers, but I have the following questions: I need to configure proxyHost even being on my local machine? Can I use ProxyHosto with GeoServer running on Jetty as is standard for Windows installation or do I have to install it in Tomcat? This is my code, when I click is carrying too much time and nothing appears: ** EDITED CODE **               <!DOCTYPE html>     <html lang='en'>     <head>      <meta charset='utf-8' />      <title>My OpenLayers Map</title>      <script type='text/javascript' src='OpenLayers.js'></script>      <script type='text/javascript'>           OpenLayers.ProxyHost = "proxy.cgi?url=";           var map;           function init() {               var bounds = new OpenLayers.Bounds(                     -51.280762, -30.241074,                     -51.020828, -29.969619                 );                 var options = {         controls :[new OpenLayers.Control.Navigation(),                 new OpenLayers.Control.PanZoom()],                     maxExtent: bounds,                     maxResolution: 0.00106037109375,                     projection: "EPSG:4326",                     units: 'degrees'                 };         map = new OpenLayers.Map('map_element', options);              var wms = new OpenLayers.Layer.WMS(                 "Paradas de ônibus",                 "http://localhost:8080/geoserver/wms?",                 {                    layers: 'Teste:Stops',                                                    isBaseLayer: false,                    styles : '',                     format :"image/jpeg"                 }                         );              map.addLayers([wms]);              //GetFeatureInfo Simples         info = new OpenLayers.Control.WMSGetFeatureInfo({             url: 'http://localhost:8080/geoserver/wms?',              title: 'Identify features by clicking',             queryVisible: true,             eventListeners: {                 getfeatureinfo: function(event) {                     map.addPopup(new OpenLayers.Popup.FramedCloud(                         "chicken",                          map.getLonLatFromPixel(event.xy),                         null,                         event.text,                         null,                         true                     ));                 }             }         });         map.addControl(info);         info.activate();              var point = new OpenLayers.LonLat(-51.22,-30.08);          point.transform(new OpenLayers.Projection("EPSG:4326"),          map.getProjectionObject());          map.setCenter(point, 3);               map.addControl(new OpenLayers.Control.LayerSwitcher({}));           if(!map.getCenter()){         map.zoomToMaxExtent();      }     }           </script>          </script>     </head>          <body onload='init();'> <!-- Chama a função js init() -->           <!--Elemento HTML onde o mapa é exibido -->      <div id='map_element' style='width: 800px; height: 800px;'>      </div>          </body>     </html>


OpenLayers WMS disappears when including OpenStreetMap

Setup:   * ArcSDE 9.3.2    * Oracle 11g   * GeoServer 2.1.4    * OpenLayers (latest build)   * OpenStreetMap    * InternetExplorer 7.0/ Google Chrome  * * * **EDIT: I have updated information just below the screen shots** Problem: I am trying to take some feature classes from our arcsde and overlay them with OSM, originally i was trying to keep them in their native projection of BC_Albers (EPSG:42102) but i couldn't get them to overlay properly. So i consigned my self to having to do a reprojection of my data from 42102 to 4326. I did the reprojection this morning and then modified my openlayers test page to view the data. I can view my featureset by itself just fine, I can view the OSM layer by itself just fine but when I try and combine the two all I get is OSM.                         <title></title>                              <form id="form1" runat="server">

location

     </form>                ![Layers In ArcMap](http://i.stack.imgur.com/3BZmp.png) ![Overlay Layer without OSM](http://i.stack.imgur.com/stdqq.jpg) ![Overlay Layer with OSM](http://i.stack.imgur.com/dKwzv.png) it appears it may have something to do with the way that openlayers is changing the EPSG: without OSM on map: http://wldev1.canfor.ca:8080/geoserver/WIM/wms?LAYERS=WIM%3AFOREST_WIM.WEB_COPI_TRAPPER&FORMAT=image%2Fgif&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A4326&BBOX=-180,-90,0,90&WIDTH=256&HEIGHT=256 WITH OSM on map: http://wldev1.canfor.ca:8080/geoserver/WIM/wms?LAYERS=WIM%3AFOREST_WIM.WEB_COPI_TRAPPER&FORMAT=image%2Fgif&TRANSPARENT=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A900913&BBOX=-180,-90,10018574.17,10018664.17&WIDTH=256&HEIGHT=256


ArcEngine 10 Polyline with arrow

I was wondering if there is a way to draw a polyline but with an arrow head at the end point? Thanks all               IPolyline line = new PolylineClass();     ((IPointCollection)line).AddPoint((IPoint)sourceFeature.Shape);     ((IPointCollection)line).AddPoint((IPoint)sinkFeature.Shape);


how to connect to ArcGIS server with c#

I would like connect to ArcGIS server, but I have an error message "la référence d'un objet n'est pas définie à une instance a une objet". I have many examples:               string serverName = "adresse";     string instance = "ArcGIS/services";     // Using the ADF Common API data source implementation of the ArcGIS Server Web Service API         string serviceNameAndType = "nameservice/MapServer";         ESRI.ArcGIS.ADF.ArcGISServer.MapServerProxy agsSoapMapServerProxy = new     ESRI.ArcGIS.ADF.ArcGISServer.MapServerProxy("http://" + serverName + "/" + instance + "/" + serviceNameAndType);      or                ESRI.ArcGIS.ADF.Identity identity = new ESRI.ArcGIS.ADF.Identity("usernamer", "password", "domain");      ESRI.ArcGIS.ADF.Connection.AGS.AGSServerConnection agsconnection;     agsconnection = new ESRI.ArcGIS.ADF.Connection.AGS.AGSServerConnection("nomserver", identity);      agsconnection.Connect();      IServerObjectManager SOM = agsconnection.ServerObjectManager;      or               string mapServiceUrl = "http://servername/ArcGIS/services/servicename/MapServer";          ESRI.ArcGIS.ADF.ArcGISServer.MapServerProxy mapServerProxy = new ESRI.ArcGIS.ADF.ArcGISServer.MapServerProxy(mapServiceUrl);      I hope that someone can help me :)


What are people using LANDSAT data for?

Obviously it's potentially a very powerful tool, but I'm curious as to what practical applications people are using it for? Admittedly, this is a very broad question... The reason I ask is because while I personally am aware of a number of applications, I'm sure that others out there have thought of many other novel uses that might be interesting to share, and think about. In addition, if you are using LANDSAT data yourself, what sort of workflow are you going through to get what you need from the data?


Walkthrough: Add-In Command Bars root menu

I am wanting to create a new ArcMap Add-In project with just a custom root menu. According to the walkthrough, I can access the Add-In Command Bars (which has the Menu element) by adding a new item to a project. What kind of project do I create in the first place given the selection of Add-In Types?


Case sensitive query of shapefile in ArcMap 10

I am an IT guy, not a GIS guy. What I know about how to use ArcMap 10 I learned from Google. It has served me well so far. Apparently what I'm wanting to do worked in version 9, but no longer does in the same fashion in 10. I'm trying to select by attributes on a shapefile. I know that in one type of database you can ignore case, but you cannot in another. I don't know what category a shapefile fits in. I even tried Googling that particular question and couldn't figure it out. Ultimately, I want to perform a search on a particular column, ignoring case for multiple values. I did have this:               "STRUCSTATE" = 'IL' and ("ENTITY" LIKE '%City%' or "ENTITY" LIKE '%village%' or          "ENTITY" LIKE '%town%' or "ENTITY" LIKE '%county%' or "ENTITY" LIKE '%district%')      but it used the exact case I used. There may be any mix of case (including impROper) and those strings could be anywhere in the field. Help?!


Decent Alabama GIS Clearinghouse?

Alabama's data portal (portal.gsa.state.al.us) is down and I haven't come across any other GIS clearinghouses for AL that are as good as say, Florida's FGDL. Does anyone know of a decent GIS clearinghouse specific to Alabama?


Problems with NAD27 projection in QGIS

I have some data that is in NAD27, but I am having a hard time displaying it in QGIS. I think that the problem is with the CRS. I cannot seem to find the correct NAD27 option. The closest one seems to be EPSG:2027 (NAD27(76)/UTM zone 15N), but my data points are still about 25 meters off. This data plots up just fine in ArcGIS, and I have transformed it to NAD83, which I can use with no problem in QGIS, but this is an awkward workaround, and I would like to migrate this project into QGIS entirely. Does anyone have an idea on this?


Having issues getting Leaflet "L.tileLayer.wms" to display Geoserver WMS data

I've set up Geoserver and WMS capabilities to host some weather data files (satellite data for example). Here's an example file:               http://xxx.xxx.xxx.xxx:8080/geoserver/opengeo/wms?service=WMS&version=1.1.0&request=GetMap&layers=opengeo:met9Qtest&styles=&bbox=-39.550275759,-33.426229830999986,60.91911924099999,67.043165169&width=512&height=512&srs=EPSG:900913&format=image/png      see code below for ip Now, I'd like to be able to use leaflet to display weather data layers. I've been successful in getting example in Leaflet documentation to work: http://leafletjs.com/reference.html#tilelayer-wms But when I try to do this same thing for the data on my Geoserver, the layer never shows up. Here's the snippet from my Leaflet code:               var test = L.tileLayer.wms("http://209.123.242.190:8080/geoserver/opengeo/wms",{     layers: 'opengeo:met9Qtest',     format: 'image/png',     transparent: true,         opacity: 0.7            });      I've tried changing the SRS in geoserver to EPSG:900913, 4326, 102100, 3857... still nothing. Any ideas? I can't tell if the issue I am having is on the Leaflet side or Geoserver? Thanks, Matt


How can I avoid reprojection gaps when merging DEM rasters?

I have two raster DEMs in same resolution I want to bring together. I was using the merge-function in SAGA, GRASS and QGIS but I always get the following result: ![enter image description here](http://i.stack.imgur.com/XWllu.png) What do I need? Where could the fault be? Thanks!


How to create parameter windows for custom geoprocessing tools?

I would like to create a geoprocessing tool with a custom GUI for its input data. To put it in other words: imagine that your client works mainly with arcmap documents and he already has an arcpy script which deals with the geoprocessing. Unfortunately he doesn't like building blocks which take parameters for the script (drop-down list, onelineinput etc.) and would like to have a custom input method like let's say a scrollbar (f.e. for selecting time interval instead of typing it manually or selecting from a list). Is it achievable in ArcMap to have custom input GUI elements? I'm pretty sure it's not, but my colleague swears on everything that he's seen something like that. Before I completely cross out that idea I wanted to have a confirmation from people who have spent more time working with ArcGIS. To my understanding the only solution is to create a standalone application using Runtime SDK or ArcObjects/ArcEngine.


GDAL Conversion of US Topo GeoPDFs

I've used GDAL_translate with "--config GDAL_PDF_LAYERS" option to convert US Topo GeoPDFs to GeoTIFF and it works great for creating collarless topos based on the new format. However, I can't get it to remove the "Images" layer from the US Topo PDFs for North Dakota (Fargo area) no matter what I try, short of flattening the PDF and discarding spatial component, which defeats the purpose of GDAL conversion. The US Topos for MN in the adjacent area convert as expected. It's something to do with the ND topos. Has anyone come across this and how can I get GDAL to remove the "Images" layer from the ND US Topos?


Create Geographic Reference for X,Y Coordinates

I have a set of x,y data that do not have any sort of geographic reference. I have lat/longs (WGS 84) for a small set of those points. How can I calculate lat/long for the remaining points so I can get them geographically placed? Thanks!


I am trying to publish a map on my server but I am getting this error: > Compressing the service definition failed. I have changed the location of service points, still the Error remains. How can I solve this issue?


QGIS 2.2.0 install via OSGeo4W overwrote/lost qGIS ver. 2.0

Just installed ver 2.2.0 Valmiera through the OSGeo4W advanced installer for a test drive. It overwrote existing ver 2.0 in the process. Still want to have the previous to work from. How can i get QGIS ver 2.0 back without problems in running the new release?


beginner ESRI Javascript API Question

So I've just finished the tutorial to at least get a map on the screen, and it already isn't working. Can someone see what I'm missing?![htmlfile](http://i.stack.imgur.com/ndliH.png)![javascriptfile](http://i.stack.imgur.com/vWLBP.png)


Solution for android map app with offline use

As the title reveals i'm in search of a way to develop an app for android with embedded maps which can work without an internet connection(i.e. can i get the tiles of the open streetmap for offline use?). I have developed web apps before by using the google maps api v3. I need a general answer as a specific one.I'm trying to find the concepts and technologies i need to learn :) (Meanwhile i found osmdroid.Does it work offline?) Cheers


"Attribute only valid on v:image" error on popup

I'm implementing a script based on the popup on vector layer example into a cognos report. It all works fine in firefox and i dont get no errors. But if i open my script with internet explorer, as soon as I click on a feature, I can't close the popup anymore and internet explorer crashes with the failure notice: "Attribute only valid on v:image". This happens in both IE 8 & 7. When i open the regular example i can open/close the popups without an error. If not for my work i wouldnt care at all that the script can't be used by IE users :) I hope someone can help. EDIT: Yes, i've googled before i posted here.


Chart inside pop up window in Javascript

How to show a chart inside pop up window? I'm using Leaflet JS, which has support for raphael plugin http://dynmeth.github.com/RaphaelLayer/. Is it possible to create a div inside popup window? I was thinking about http://softwarebyjosh.com/raphy-charts/ If it's not possible with Leaflet, I am opened to only Raphael map solution. Thanks


No route results after calling network analyst service

I have published a network analyst service and I'm trying to use it from the Flex API 3.1. When I use the service in ArcMap or through the rest GUI in a browser, the service returns the right answer. When I use the service from the Flex API 3.1, my object "routeResult" that contains the route returned by the server is null. I get the error: "Error #1009: Cannot access a property or method of a null object reference." for the object routeResult. Here is my application code:               <s:layout>         <s:BasicLayout/>     </s:layout>          <fx:Script>         <![CDATA[             import com.esri.ags.events.MapMouseEvent;             import com.esri.ags.events.RouteEvent;             import com.esri.ags.FeatureSet;             import com.esri.ags.Graphic;             import com.esri.ags.symbols.CompositeSymbol;             import com.esri.ags.symbols.SimpleMarkerSymbol;             import com.esri.ags.symbols.TextSymbol;             import com.esri.ags.tasks.supportClasses.RouteResult;                  import mx.controls.Alert;             import mx.rpc.events.FaultEvent;                  [Bindable]private var stops:FeatureSet = new FeatureSet([]);                  [Bindable]private var lastRoute:Graphic;                              private function mapClickHandler(event:MapMouseEvent):void             {                 var stopSymbol:CompositeSymbol = new CompositeSymbol();                 var circleSym:SimpleMarkerSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 20, 0x000099);                 var textSym:TextSymbol = new TextSymbol(String(stops.features.length + 1));                 textSym.textFormat = new TextFormat("Verdana", null, null, true);                 textSym.color = 0xFFFFFF;                 stopSymbol.symbols = [ circleSym, textSym ];                                      var stop:Graphic = new Graphic(event.mapPoint, stopSymbol);                 inputsLayer.add(stop);                 stops.features.push(stop);                      if (stops.features.length > 1)                 {                     routeTask.solve(routeParams);                 }             }                  private function solveCompleteHandler(event:RouteEvent):void             {                 var routeResult:RouteResult = event.routeSolveResult.routeResults[0];                 lastRoute = routeResult.route;                 lastRoute.toolTip = routeResult.routeName;                 if (routeResult.route.attributes.Total_Time)                 {                     lastRoute.toolTip += " in " + Math.round(Number(routeResult.route.attributes.Total_Time)) + " minutes.";                 }             }                  private function faultHandler(event:FaultEvent):void             {                 Alert.show(event.fault.faultString + "\n\n" + event.fault.faultDetail, "Routing Error " + event.fault.faultCode);                 // Supprimer le dernier stop ou les deux s'il n'y en a pas plus.                 if (stops.features.length <= 2)                 {                     inputsLayer.clear();                     stops = new FeatureSet([]);                 }                 else                 {                     inputsLayer.remove(stops.features.pop());                 }             }              ]]>     </fx:Script>              <fx:Declarations>                <esri:MapPoint id="mapPoint" x="655672" y="6861079"/>              <esri:RouteTask id="routeTask" concurrency="last" fault="faultHandler(event)"                         requestTimeout="30" showBusyCursor="true"                         solveComplete="solveCompleteHandler(event)"                         url="http://serverIP:8399/arcgis/rest/services/na_service/MapServer/Route"/>              <esri:RouteParameters id="routeParams" stops="{stops}" returnDirections="false"/>              <esri:SimpleLineSymbol id="routeSymbol" width="5" alpha="0.6" color="0x000099"/>     </fx:Declarations>          <s:BorderContainer id="applicationHolder" width="100%" height="100%">                   <s:layout>             <s:VerticalLayout/>         </s:layout>              <s:SkinnableContainer id="headerBar" width="100%" height="50" backgroundColor="0xcccccc">             <s:layout>                 <s:HorizontalLayout verticalAlign="middle"/>             </s:layout>                  <mx:Text id="titleText" fontSize="25" fontWeight="bold"                      text="My application"/>             <mx:Spacer width="75"/>                       </s:SkinnableContainer>              <esri:Map id="mainMap" width="100%" height="100%" center="{mapPoint}"                   crosshairVisible="{crosshairsCheck.selected}" level="16"                   mapClick="mapClickHandler(event)" panArrowsVisible="{panArrowsCheck.selected}">             <esri:ArcGISDynamicMapServiceLayer url="http://serverIP:8399/arcgis/rest/services/myMapService/MapServer"/>                  <esri:GraphicsLayer graphicProvider="{lastRoute}" symbol="{routeSymbol}"/>             <esri:GraphicsLayer id="inputsLayer"/>         </esri:Map>          </s:BorderContainer>      Do you have any advice? Regards


Basic PostGIS and PGRouting question

I'm using OSX 10.6 and just downloaded and installed `PostgreSQL 9.0.2-1` and `pgRouting 1.0.5-1 for Postgres 9.0` from here. I'm a confused what my next steps are though. I'd like to try loading a simple network into pgRouting and running a few different network routing analyses on it to test it out. However, I don't know where to begin. How do I open PostgreSQL or pgRouting? I'm fairly comfortable with terminal commands and scripting, but as I installed precompiled versions, I don't know where anything is or what to get at. I have looked at the pgRouting documentation, but I didn't see anything similar to my question.


What is faster for geoprocessing (intersect) big shapefiles?

I have 200 Mb shapefiles of polylines downloaded from OSM. I've been working with QGIS 2.0 in Ubuntu 64 Bit 8 Gb RAM to make some geoprocessing tasks and it's taking 2 days for processing. Once I've got my final shapefile, i have to make further calculations/scripting for making a model, and i don't have that time. So, in order to accelerate the process I've been thinking in:   * Exporting my shapefiles to R    * Converting them to SQL and process them by spatialite   * Maybe gdal in shell? But i don't know what is faster/better option, because I'm a beginner with big data and scripting, so python is not yet an option for me. My question would be trivial for some. I have a few experience in R, but idk if it's the better option. Thank you very much in advance **EDIT** : I have a database for Brazil. I'm interested in two shapefiles: "landuse" and "roads". I have another with the state of São Paulo "sp". So, i just need to intersect the landuse with sp = landuse_sp, roads with so = roads_sp, and later roads_sp with landuse_sp. That's in order to have every the roads of the state of São Paulo with the landuse. Then I'll intercept with the municipalities and with another dataset with vehicle count I'll generate a model for vehicle count. With this final shapefile, i need to perform case calculations adding fields. With field calculator, creating the field "count" as an example, would be something like this: `CASE WHEN roads IS 'primary' AND landuse IS 'residential' THEN exp(8 + 0.0033*2)` `ELSE 0` `END` This is just an example, but it's quite the idea


Showing Linestring from SQL statement with CartoDB

I have cartodb sql statement to return what polygons are intersected by a linestring, but I'd like to have the linestring visualized over the polygons on the results. Also not add the linestring to the database. SELECT country, permit_inf, permit_req, the_geom_webmercator FROM airspaceshape_1 WHERE ST_Intersects( the_geom, ST_SetSRID( ST_GeomFromGeoJSON('{ "type": "LineString","coordinates": [ [27.456667,5.065], [30.456667,-1.088] ] }'),4326) )


Step by step contour creation algorithm

I do seismic processing, and recently have been moving into doing contours. I have a question on the exact way this is done. I have watered down my problem so that I can understand from 'first principles'. I have checked out this question here as well, since it is similar. **Input:** I have a uniformly sampled 2-dimensional (x,y) spatial grid, of size M by N. I have P random points within the grid, making up say, 1% of all the M*N points. Each of those points has a positive z value. All the rest of the points are at z=0. **Output:** Based on this information, I would like to know, from an algorithmic / signal processing perspective, the steps needed to make a contour plot. **The Question:** My problem is somewhat nested: My questions are the following:   1. Do I need to first perform a 2D interpolation of my data, so as to fill up all those z=0 values, as a necessary pre-processing step before being able to make a basic contour plot? 1a. If that is the case, then how does one do this 2D interpolation? I am familiar with linear regression, but it seems from my trials that this was not adequate. Nearest neighbours interpolation also does not seem like it would yield good looking contours.   2. If a 2D interpolation is not a necessary pre-processing step before being able to make a contour, then how exactly, from an algorithmic perspective, are those z=0 values being filled? It seems to me that this is totally necessary first, and if so, I would like to know how this is done.  Thank you. A contextual remark, I am very new to contouring, so I-dont-know- what-I-dont-know applies. Please feel free to elucidate me on any points that might otherwise seem 'obvious'. Cheers!


Get default values from PostGIS DB in QGIS 2.4 editor

One of my postgis tables tables automatically includes the nextval(xxx) in the edit feature form in qgis(and I think will also update ids of multiple features automatically). The other seems to have the same definition in postgis and qgis, but does not. Is there a key setting that I am missing? This is the definition of both my tables in postgis:               Property    Value     Name    id     Position    1     Data type   integer     Collation        Default nextval('seq1'::regclass)     Sequence    seq1     Not NULL?   Yes     Primary key?    Yes     Foreign key?    No     Storage PLAIN     Inherited   No     Statistics  -1     System column?  No     ACL      Comment           -- Column: id           ALTER TABLE x ADD COLUMN id integer;      ALTER TABLE x ALTER COLUMN id SET NOT NULL;      ALTER TABLE x ALTER COLUMN id SET DEFAULT nextval('seq1'::regclass);      And the other                Property   Value      Name   id      Position   1      Data type  integer      Collation        Default    nextval('seq2'::regclass)      Sequence   seq2      Not NULL?  Yes      Primary key?   Yes      Foreign key?   No      Storage    PLAIN      Inherited  No      Statistics -1      System column? No      ACL          Comment              -- Column: id          ALTER TABLE y ADD COLUMN id integer;     ALTER TABLE y ALTER COLUMN id SET NOT NULL;     ALTER TABLE y ALTER COLUMN id SET DEFAULT  nextval('seq2'::regclass);      And QGIS metadata definitions: Doesn't work Metadata General **Storage type of this layer** PostgreSQL database with PostGIS extension **Description of this provider** PostgreSQL/PostGIS provider PostgreSQL 9.3.4 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4), 64-bit PostGIS 2.1 USE_GEOS=1 USE_PROJ=1 USE_STATS=1 **Source for this layer** dbname='x' host=y port=5432 user='z' sslmode=disable key='id' table="xx" (geom) sql= **Geometry type of the features in this layer** Polygon **Primary key attributes** id **The number of features in this layer** 249 **Editing capabilities of this layer** Add Features, Delete Features, Change Attribute Values, Add Attributes, Delete Attributes, Fast Access to Features at ID, Change Geometries, Simplify Geometries, Simplify Geometries with topological validation Does work metadata General **Storage type of this layer** PostgreSQL database with PostGIS extension **Description of this provider** PostgreSQL/PostGIS provider PostgreSQL 9.3.4 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4), 64-bit PostGIS 2.1 USE_GEOS=1 USE_PROJ=1 USE_STATS=1 **Source for this layer** dbname='a' host=b port=5432 sslmode=disable key='id' srid=4326 type=MULTIPOLYGON table="c" (geom) sql= **Geometry type of the features in this layer** Polygon **Primary key attributes** id **The number of features in this layer** 128 **Editing capabilities of this layer** Add Features, Delete Features, Change Attribute Values, Add Attributes, Delete Attributes, Fast Access to Features at ID, Change Geometries, Simplify Geometries, Simplify Geometries with topological validation Below is the editor view when I add a feature to the working layer - I get nothing in either box when adding to the other layer. ![Editor image](http://i.stack.imgur.com/Rh07J.png)


Can ArcGIS ModelBuilder be exported to Python and run in QGIS?

Is it possible to construct a geoalgorithm on the ArcMap modelbuilder, export this entire algorithm to python syntax (without having ANY knowledge of python) and then import this algorithm to QGIS and run it successfully? I am more familiar with ArcGIS and unfortunately the QGIS Processing framework presents enormous difficulties when using GRASS commands to process raster files. I for one am not familiar with GRASS, and am very disappointed that QGIS processing framework is unable to take care of the GRASS part for me when it comes to dealing with rasters. I am pursuing an internship for a company that only uses QGIS so if I could do this for them they would be very impressed :D.


Converting Points to Line

I have a shapefile that contains points (xy coordinates) that display several different routes for a transit agency. In the attribute field I'm given information on what route each point corresponds to and also the sequential numbering for each point in each route (starting back at 1 for every new route). My question is how to convert these points into lines separated by each of the routes. I used the point to line tool but it created extra lines connecting each of the routes together. I even tried specifying the Line Field and Sort Field to the fields with the route numbers/sequential numbering and got an error. Appreciate any help!


Weird-looking France after OSM import with osm2pgsql

After importing `france-latest.osm` from Geofabrik, using osm2pgsql, it seems that the polygon attributed to Metropolitan France (osm_id = 1403916) is a bit odd: ![France polygon in QGis](https://lut.im/THRrDDXs/8QcaB0p0) I'm far to be a geography expert, but I think that the shape is a bit off here. Is there something I missed? Thanks


Problem with adding mosaic layer via arcpy

I have a mosaic layer that I want to add to my map in ArcMap. When I add this layer manually (i.e the "Add Data" button), a raster image, a boundary, and a footprint are added to my table of contents. However, when I run the following code, only the raster image is added to my TOC. I have no idea why this happens. How do I get my code to also add the footprint and boundary to the map?                   import arcpy         in_workspace = r"C:\Users\Christian\Documents\ArcGIS\Default.gdb"         in_mosaicdataset_name = "mosaic_file"         mxd = arcpy.mapping.MapDocument("CURRENT")         df = arcpy.mapping.ListDataFrames(mxd)[0]         path_to_layer = in_workspace+"\\"+in_mosaicdataset_name         layer = arcpy.mapping.Layer(path_to_layer)         arcpy.mapping.AddLayer(df,layer,"BOTTOM")      EDIT: Michael Miles-Stimson's idea worked. The following code produced the desired result:                   import arcpy         arcpy.env.workspace = r"C:\Users\Christian\Documents\ArcGIS\Default.gdb"         in_mosaicdataset_name = "mosaic_file"         mxd = arcpy.mapping.MapDocument("CURRENT")         arcpy.MakeMosaicLayer_management(in_mosaicdataset_name,in_mosaicdataset_name+"_layer")         arcpy.SaveToLayerFile_management(in_mosaicdataset_name+"_layer",in_mosaicdataset_name+"_layer.lyr")         layer = arcpy.mapping.Layer(in_mosaicdataset_name+"_layer")         df = arcpy.mapping.ListDataFrames(mxd)[0]         arcpy.mapping.AddLayer(df,layer,"BOTTOM")


How to delete multiple selected polygons at once?

I'm new at this, a novice at best. I'm using QGIS 1.7.3. I simply want to select a large number of polygons on screen and hit the delete key to delete them and resave the shapefile. Can this be done?


Alternatives to ESRI Business Analyst

Does there exists any other software that can do store-level trade area analysis without much programming overhead? I am particularly interested in:   1. Creating cutomer-derived trade areas that represent x% of sales    2. Location analysis using a Huff-style model with competition and site attributes (like size) The data that comes with the software is not really an added benefit for me since I already have access to similar products.


arcpy.Describe.extent not working

I have a script using ArcPy that I used a year ago and calculates the extent of all the features in a shapefile:               # -*- coding: utf-8 -*-          import arcpy     from arcpy.sa import *     import os, os.path          arcpy.CheckOutExtension("spatial")          srcSHP = "D:/eab2012.shp"     arcpy.env.workspace = os.path.dirname(srcSHP)     descShp = arcpy.Describe(srcSHP)          print descShp.file          extent = descShp.extent     minX = extent.XMin     minY = extent.YMin     maxX = extent.XMax     maxY = extent.YMax      It's just an extract, but it was working well, at least last year. I don't know it they change something but now, I have an error "'NoneType' has no attribut 'XMin'"... In this page (Describe object properties (arcpy)), the Describe object returns properties such as baseName, file, path, etc. In this page (Dataset properties (arcpy)), the Describe object returns properties such as "datasetType, extent, spatialReference, etc. Both are declared in the script with               desc = arcpy.Describe()      The "print descShp.file" part of my script works. So, I have the object properties, not the dataset properties. So now, how can I get the extent of my features? It was working the last time. I even tried the code sample in the arcGIS 10.2.2 Help               #Code Sample     #Dataset properties example (stand-alone script)          #The following stand-alone script displays dataset properties for a shapefile.           import arcpy          # Create a Describe object from the shapefile     #     desc = arcpy.Describe("C:/temp/xy.shp")          # Print dataset properties     #     print("Dataset Type: {0}".format(desc.datasetType))     print("Extent:\n  XMin: {0}, XMax: {1}, YMin: {2}, YMax: {3}".format(     desc.extent.XMin, desc.extent.XMax, desc.extent.YMin, desc.extent.YMax))     print("MExtent: {0}".format(desc.MExtent))     print("ZExtent: {0}".format(desc.ZExtent))          print("Spatial reference name: {0}:".format(desc.spatialReference.name))      and got the same error. How can I put it... Help? ;) Thanks!


Data Driven Pages reading angles in attribute tables question

Is there a way to emulate the Data Driven Pages process (ArcGIS 10) of reading angles (rotation) in a polygon shape file? Screen shot of the DDP window with rotation field and corresponding attribute circled in green In other words, make a polygon rectangle shp recognize an "Angle" field from its attribute table and automatically rotate the polygon rectangle based on that "Angle" field ?


Can you edit an SDE table via ArcObjects when not added to ArcMap

I have a table that is in SDE, what I want to do is in my userform click on the "Save" button, and the table will be edited even though it is not within the map document. Is this possible? I have tried the following code, which runs, but nothing happens to the table (I have also added the table to the map document and still nothing happens or no error messages occur). Here is that I have code.               Private Sub cmdSaveDev_Click()          Dim pTable As ITable     Dim pCursor As ICursor     Dim pRow As IRow     Dim pRowBuffer As IRowBuffer          Dim pPropset As IPropertySet     Set pPropset = New PropertySet         With pPropset             .SetProperty "Server", "***"             .SetProperty "Instance", "***"             .SetProperty "User", "***"             .SetProperty "Password", "***"             .SetProperty "Version", "SDE.DEFAULT"         End With               Dim pSdeWS As IWorkspace          Dim pSdeWF As IWorkspaceFactory     Set pSdeWF = New SdeWorkspaceFactory          Dim pSdeFeatWS As IFeatureWorkspace     Set pSdeFeatWS = pSdeWF.Open(pPropset, 0)          Set pSdeWS = pSdeFeatWS          Dim pWkspEdit As IWorkspaceEdit     Set pWkspEdit = pSdeFeatWS          Set pTable = pSdeFeatWS.OpenTable("SY_CSY_TERRIER.DEVELOPMENT_DEVELOPER")          Dim i As Integer          If lstSelectedDevelopers.ListCount = 0 Then         MsgBox "Add a developer to the Selected Developer box and try again"     Else              pWkspEdit.StartEditing (True)         pWkspEdit.StartEditOperation              Set pRowBuffer = pTable.CreateRowBuffer         Set pCursor = pTable.Insert(True)         For i = 0 To lstSelectedDevelopers.ListCount - 1             Set pRow = pRowBuffer             pRow.value(1) = frmCityDev.txtRecordNo             pRow.value(2) = lstSelectedDevelopers.List(i)                  pCursor.Flush         Next i              pWkspEdit.StopEditing (True)         pWkspEdit.StopEditOperation          End Sub      Thanks!


Overriding the QGIS Feature Dialog

We are developing a QGIS plugin and would like to override the QGIS Feature Edit Form with our own Dialog. Have explored using setEditForm and setEditFormInit, but the init process appears to want to use a python file located in the user's project directory. Ideally we'd use an init method from our Plugin's code and gain access to our Plugin's instance. Had thought that the new EditWidget V2 might be able to help, but this seems to be focussed on editing individual attributes rather than a feature. _UPDATE_ Doh. Managed to resolve it. In the **init** method of your plugin: Firstly add the plugin directory to the system path list (or a subdirectory of it) Secondly, initialise a static variable with the Plugin's instance (self) Am yet to add logic to the dialog but looks like we're on the home run. Thanks Python!


How to reconcile UTF encoding for OpenStreetMap

I frankly am a bit confused when I am working outside the United States so please excuse my ignorance. I downloaded some shapefiles for Moldova (MoldovaData) and had a question regarding the encoding of the attributes. I have other data I want to link to it but many of the city names are encoded differently. For instance I believe the attribute BÄƒlÈ›i corresponds to Balti (Bălți) how do I reconcile the attribute names ?


Setup GeoNetwork and Geoserver withTomcat

I need to set up GeoNetwork on the same server as GeoServer (Windows server 2003, with IIS6) . Is it best to use multiple instances of Tomcat or put both web archives in the same one? They both need to listen on the same port 8080. Thanks


Is Esri GeoPortal compatible with ArcGIS 10.2?

I am attempting to set up GeoPortal 1.2.4 and use ArcGIS 10.2 as my client desktop. I haven't come across any documentation which says these are compatible other than the Git page. However, I am unable to set up my software, I am getting a message which says 10.1 is not installed. https://github.com/Esri/geoportal-server/wiki/Preinstallation-1.2.4


Broken Plugin: EOL while scanning string literal

I've written a python plugin, and it works perfectly on my pc (Windows 7). I've zipped the whole folder and sent it to the client. they report back with this (the name of plugin's folder is LTS): ![enter image description here](http://i.stack.imgur.com/jLQhQ.jpg) Any ideas why this happened? As far as I know they use Windows too.


Hydrology toolbox versus ArcHydro toolbox

I would like to do some watershed delineation research/development (at the County level) with our LIDAR generated DEM, after it is corrected, but am wondering what, if any, differences might result from using the hydrology toolbox to generate watersheds or the ArcHydro suite of tools? I will probably try both toolboxs but am curious if anyone has done anything similar? The tools and workflow between both seem similar, at first blush, so I am wondering what the differences would be between the tools...algorithms? Am using ArcInfo 10.0.


Creat point and update featuers spatial join

I have the following code that is in a tool. The tool creates a point on click, then auto sequential populates the "AddressID" field and also populates X_Coord, , Y_Coord. This part of the tool works smoothly. After these fileds are populated i need the new created feature to populate other fields based on Parcel the newly created point sits on. I do a spatial join in order to get the fields populated. The two functions work perfectly if they are separate but once i combine the two and run the tool ArcMap just sits thinking and thinking nothing happens. I eventually have to end ArcMap process with task manager. I don't get no error at all. After i reopen the mxd i see the newly created point but nothing is populated from the Parcels. I would appreciate any help. Here are the two codes.               import arcpy     import pythonaddins     import os     from arcpy import env          class Add_points(object):     """Implementation for AddPoints_addin.Add_points (Tool)"""     def __init__(self):         self.enabled = True         self.cursor = 3 # Can set to "Line", "Circle" or "Rectangle" for interactive shape drawing and to activate the onLine/Polygon/Circle event sinks.     def onMouseDownMap(self, x, y, button, shift):              fc = "TonyTwoWay.DBO.TT"         workspace = r"C:\Users\talmeida\AppData\Roaming\ESRI\Desktop10.1\ArcCatalog\Connection to dsd15_sqlexpress.sde"         arcpy.env.overwriteOutput = True              #arcpy.ChangeVersion_management('TonyTwoWay.DBO.TT','TRANSACTIONAL','dbo.DEFAULT', "")         # Start an edit session. Must provide the worksapce.         edit = arcpy.da.Editor(workspace)              # Edit session is started without an undo/redo stack for versioned data         #  (for second argument, use False for unversioned data)         edit.startEditing(True)              # Start an edit operation         edit.startOperation()              CC_list = []         with arcpy.da.SearchCursor(fc, ["AddressID"]) as cursor:             for row in cursor:                 try:                     if "CC" in row[0]:                         CC_list.append(int(row[0].strip("CC")))                    except TypeError:                     pass                 del cursor              CC_list.sort()         AddressID = CC_list[-1] + 1         AddressID = 'CC' + str(AddressID)              row_values = [(x, y, (x, y), AddressID)]         cursor = arcpy.da.InsertCursor(fc, ["X_Coord", "Y_Coord", "SHAPE@XY", "ADDRESSID"])              for row in row_values:             cursor.insertRow(row)         del cursor              # Stop the edit operation.         edit.stopOperation()              # Stop the edit session and save the changes         edit.stopEditing(True)              arcpy.RefreshActiveView()         arcpy.AddMessage('Updated all records sucussefully')               pass      Here the spatial join part.               import arcpy     import pythonaddins     import os     import time     from arcpy import env          fcTarget = "TonyTwoWay.DBO.TT"     workspace = r"C:\Users\talmeida\AppData\Roaming\ESRI\Desktop10.1\ArcCatalog\Connection     to dsd15_sqlexpress.sde"     arcpy.env.overwriteOutput = True          ####Select by location on parcels with created point     Parcellyr = "testParcelsAdmit"     fcTarget = "TonyTwoWay.DBO.TT"          arcpy.MakeFeatureLayer_management(Parcellyr, "Parcel layer")     entries = int(arcpy.GetCount_management(fcTarget).getOutput(0))          for i in xrange(entries):     arcpy.MakeFeatureLayer_management(fcTarget, "point layer", "\"OBJECTID  \"={}".format(str(i)))     arcpy.SelectLayerByLocation_management("Parcel layer", "INTERSECT", fcTarget, "", "NEW_SELECTION")     #if arcpy.Exists(pt_lyr): arcpy.Delete_management(pt_lyr)          #### populates fields     #fcTarget = "TonyTwoWay.DBO.TT"     #fcJoin = "testParcelsAdmit"     add_fields =     ["ACCOUNT","SiteNum","OwnerName","SiteAddres","SiteNumSfx","SiteStreet","predir","StreetTyp    e","SubName"]          # fix args     if not isinstance(add_fields, list):     # from script tool     add_fields = add_fields.split(';')          # do not need this scratch file     fcOutput = r'in_memory\temp_join'     arcpy.SpatialJoin_analysis("Parcel layer", fcTarget, fcOutput, 'JOIN_ONE_TO_MANY', 'KEEP_COMMON')               # grab oid field from points     oid_t = arcpy.Describe(fcTarget).OIDFieldName          # init rowW and rowR     curR = arcpy.SearchCursor(fcOutput)     join_dict = dict([(r.JOIN_FID,[r.getValue(f) for f in add_fields]) for r in curR])     del curR          # Now update the new target     curW = arcpy.UpdateCursor(fcTarget)     for row in curW:         t_oid = row.getValue(oid_t)         if t_oid in join_dict:             for f in add_fields:                 row.setValue(f, join_dict[t_oid][add_fields.index(f)])         curW.updateRow(row)     del row, curW     arcpy.Delete_management(r"in_memory\temp_join")     arcpy.AddMessage('Updated all records sucussefully')          I use this part of the code to select the new created feature. am i going the wrong way about it?               Parcellyr = "testParcelsAdmit"      arcpy.MakeFeatureLayer_management(Parcellyr, "Parcel layer")      entries = int(arcpy.GetCount_management(fcTarget).getOutput(0))      for i in xrange(entries):          arcpy.MakeFeatureLayer_management(fcTarget, "point layer", "\"OBJECTID\"={}".format(str(i)))          arcpy.SelectLayerByLocation_management("Parcel layer", "INTERSECT", fcTarget, "", "NEW_SELECTION")


Web system for adding points and related information to a map

I have been asked to find/make a web-based system whereby members of the public can add a point to a map and then enter some details about it. I could make this myself but as it's such a simple system I'm sure there must be an existing solution already out there.


ESRI JavaScript API ArcGISDynamicMapServiceLayer Scale Dependency Visibility

**Background:** I am building a JavaScript web app using ESRI's JavaScript API v3.8, and our ArcGIS Server v9.3.1. I have layers I am rendering using the **ArcGISDynamicMapServiceLayer** , and I have been trying to find a way to access scale dependency visibility and have only been able to access the **defaultVisibility**. **Not Preferred Solution:** Using **FeatureLayer** for each layer allows me to check the **MinScale** against the map's current scale to determine whether the layer can be visible at that scale. I am trying to find a way to do this comparison using an **ArcGISDynamicMapServiceLayer** since it renders symbology based off of my map template or MSD file. I would prefer to avoid setting up a dozen or so layers using FeatureLayer because I have to render each layer's symbology individually, since I am using ArcGIS Server v9.3.1, and it does not render it for me like 10.x+. This becomes tedious when I have a dozen or so layers each with a few class divisions. **Goal** I am using checkboxes for layer visibility, and if the layer isn't visible at the current scale, I am disabling and clearing the checkbox. I am using this as a way to tell the user that the layer isn't visible at this scale. A disabled control should be easier to understand than having a 'checked' checkbox and no layer showing up. Anyone run into a similar situation? I am just trying to avoid coding in the symbology for all the layers as FeatureLayers. Thanks!


Label legend interval with number of elements - ArcMap 10

I have made a series of choropleth maps in ArcMap 10. When I classify the interval the bottom of the dialogue tells how many elements are in the class. Is it possible to have this number automatically places beside my class labels? Thanks in advance. J.


Reorder rows of shapefile in the file

How do I reorder the rows of the shapefile in the file? I know how to order them in the attribute table view, but I need to actually switch up the order (by descending id) in the file itself. It's a little weird but the reason being eventually it will be turned into a geojson and drawn up in a webmapping project but the way the webmapping API works, the draw order is naturally in the order that is in the file, and when icons get very clustered, I'd like items with the lower id to take priority (e.g. be on top / drawn last). There's probably a way around that in the webmap API but I think it'd just be much simple to reorder the table.


Create oblique projection?

bit of an odd one which isn't necessarily package-specific. I'm trying to make a tshirt with a map section centred on the plane between San Francisco, USA, to Galway, Ireland. The Great Circle line between them goes over northern Canada and the Hudson Bay. What I'd like is to make a oblique projection of the earth with that plane as the 'equatorial line'. If that's possible, I'd prefer the projection to be Miller 1 rather than Mercator, but I'm not too fussy since the greatest distortions will be farthest away from the area of interest. This will result in a tshirt whereby one place is on the front, one on the back, joined across the side of the tshirt, which may be hard to print. In the course of my investigations I've recently seen the Werner (2nd Stabius) map (http://www.progonos.com/furuti/MapProj/Normal/ProjPCon/) which would be perfect as a front or back only (easier for standard tshirt printing) AND is a lovely heart (aww) BUT is less likely to be supported by map projection programmes I assume. Nonetheless if I could make one of those where I could set my own angle and pole, that would be dandy. I've looked into a variety of tools but come up short so far. I'm not aware that QGis can set a projection which doesn't use the standard equator/poles & angle? Thanks in advance for any clever ideas! p.s. this is the centring i'm talking about, but obviously suffers huge distortion at the edges, where the points of interest are: http://imgur.com/ktw4KOr If anything, I might even be interested in a projection which minimised the centre of focus to the benefit of the edge regions...


Free Web-service providing Satellite Images

Is there any web-service currently available which is hosting satellite images as open-source, just like OSM web-service hosting vector maps? We want to make a real-time traffic monitoring commercial application for Turkey and want a hybrid map as our base-layer (OSM layer + Satellite Images with 50% transparency). Images where roads are easily visible are suffice and young images are more preferable.


About symbol position

I have to draw in ArcGis a graph which has the end points of each segment with a circle. The circle has to be unique at the same point when two or more end points are coincident. I’m using the font of ESRI Default Marker (Unicode 80) and the circle is not centred at the end point, but it is shifted of the ray's length along the segment. So, the result is that I have two different circles for each segment. If I give an offset at the position of the symbol the result is still two or more slightly different circles, but not coincident. Is there a way to obtain an unique circle when more segments are coincident at the same end point? Thanks for any help! I’m using ArcGis 9.3


Driver error when converting MapInfo file to Shapefile with ogr2ogr

I am trying to convert a MapInfo file to an ESRI shapefile using `GDAL`'s `ogr2ogr` command as described here, but I am getting the following error:               FAILURE:     Unable to open datasource `Iceland2pts.mif' with the following drivers.       -> ESRI Shapefile       -> MapInfo File       -> a bunch more drivers listed...      Just to be sure I have updated my GDAL install to the latest version (1.10.1) on Ubuntu, so I'm thinking it has to do with the format of the file (due to this), but I just don't know enough about these to know what is going wrong. **Example format of MapInfo file** :               VERSION 300     Charset "WindowsLatin1"     COLUMNS 0     DATA     REGION 156      4             -22.556955         64.777794             -22.555510         64.782730             -22.544556         64.779297             -22.546009         64.777359      5             -22.493431         64.767670             -22.486217         64.774597             -22.483826         64.772453             -22.486826         64.768799             -22.493431         64.767670      Does the formatting look incorrect, or is something else eschew? Thanks! **Update:** Example of the possible `MID` header               VERSION 300     Charset "WindowsLatin1"     COORDSYS Earth     PROJECTION 1, 104     COLUMNS 0     DATA     REGION 1     19814             -23.8252        65.7438             -23.8289        65.7445             -23.8355        65.7472             -23.8421        65.7503             -23.8477        65.7531


Add attributes to vector layer with pyqgis (QGIS 2.0 API)

i am trying to make a QGIS plugin ready for the new QGIS API in the current development branch (for the upcoming QGIS 2.0 release).   http://hub.qgis.org/wiki/quantum-gis/Python_plugin_API_changes_from_18_to_20 However i struggle a bit on how to add new attributes to the attribute table.   Up to now i have added new attributes like this:               # Working in QGIS Lisboa     layer = ... # QGsVectorLayer object     name = "newAttribute"      provider = layer.dataProvider()     caps = provider.capabilities()     # Check if attribute is already there, return "-1" if not     ind = provider.fieldNameIndex(name)     try:         if ind == -1:           if caps & QgsVectorDataProvider.AddAttributes:             res = provider.addAttributes( [ QgsField(name,double) ] )     except:         return False      In the recent QGIS dev. version these steps aren't working anymore (the attribute column isn't added) and i was not able to find the solution in the above mentioned wiki-page.   Can someone give me hint?


How to publish raster data in Arcgis Viewer for Flex?

I'm new to ArcGIS for Server and I would like to publish several raster layers (land surface temperature, NDVI etc.). I have uploaded raster to server, but I cannot add it to my ArcGIS viewer for flex. Is it possible? If not, what is the best solution to publish raster layer that is located in ArcGIS server?


How to delimit hinterland boundaries among multiple city centers?

![enter image description here](http://i.stack.imgur.com/MfHza.gif)I need to delimit city boundaries basing on centers'magnitude. CenterA's employment/CenterB's employment = (Distance from centerA to break-point E/Distance from centerB to break-point E)^2. AB=AE+BE. I have multiple centers. I need to create a buffer-like irregular boundary to delimit adjacent cities. And still, I don't know how to illustrate the influence among non-adjacent cities. Is there any tools that I can use in ArcGIS 10 to do this? Thanks a lot!!!!!!!!!! PS. Sorry, I cannot post picture. S.


Split single raster within multiple polygons

I have a raster ('slope') which content only one attribute in the table. On the other hand I have a feature which content several polygons (catchments) in the attributes table. I would like to obtain the area or count of the 'slope' for each catchments. Are there any faster way to do it without separating the catchments and mask the raster one by one? Thank you.


Smooth replay of gps points on google map

When first the google map is loaded we load data using php codes in the backend and draw a line connecting between each lat long. There after we check if the lat long point have some mapDataMarkerCurrent.eventAlert then we draw another type of marker accordingly. Accordingly for each lat long we do this latlngbounds1.extend(secondPoint); and finally we perform this map.fitBounds(latlngbounds1); to ensure we get a full view with all the points in it. All works fine below are our codes.               function processtViewMapData(json) {         mapDataJson = eval('(' + json + ')');         var totalMapData = mapDataJson.MapData.length;              var hash = [];         var firstLoc = 0,             foundFirstLoc = "N",             foundLastLoc = "N",             lastLoc = 0;         var firstLat = "",             firstLong = "";                   for (var i = 1; i < totalMapData; i++) {             //alert("I : "+i);             var startPoint = "";             var endPoint = "";                  var mapDataPrevious = mapDataJson.MapData[i - 1];             var mapDataCurrent = mapDataJson.MapData[i];                  if (mapDataPrevious.lat == 0 || mapDataPrevious.long == 0 || mapDataCurrent.lat == 0 || mapDataCurrent.long == 0) {                  } else {                 var polylineCoordinates = [                     new google.maps.LatLng(mapDataPrevious.lat, mapDataPrevious.long),                     new google.maps.LatLng(mapDataCurrent.lat, mapDataCurrent.long)                 ];                 var polyline = new google.maps.Polyline({                     path: polylineCoordinates,                     strokeColor: "#8B0000",                     strokeOpacity: 0.5,                     strokeWeight: 4                 });                      polyline.setMap(map);                      var firstPoint = new google.maps.LatLng(mapDataPrevious.lat, mapDataPrevious.long);                 var firstMarker = createMarkerPoint(firstPoint, mapDataPrevious.hd);                 latlngbounds1.extend(firstPoint);                      var secondPoint = new google.maps.LatLng(mapDataCurrent.lat, mapDataCurrent.long);                 var secondMarker = createMarkerPoint(secondPoint, mapDataCurrent.hd);                 latlngbounds1.extend(secondPoint);                           if (foundFirstLoc == "N")                     firstLoc = i;                 /                                      if(foundFirstLoc=="N")                                 {                                       foundFirstLoc="Y";                                        firstLoc = firstLoc-1;                                            var point = new google.maps.LatLng(mapDataPrevious.lat,mapDataPrevious.long);                                       latlngbounds1.extend(point);                                        firstLat = mapDataPrevious.lat;                                       firstLong = mapDataPrevious.long;                                     var marker = createMarker(point,"","F","$80");                                           }                                 if(foundFirstLoc=="Y")                                 {                                     // alert("I : " + i + "  " + "Loc -1" + firstLoc);                 if (i != firstLoc) {                     lastLoc = i                     foundLastLoc = "Y";                 }             }              }     }          var lastData;     if (foundLastLoc == "Y") {         lastData = mapDataJson.MapData[lastLoc];              var lastPoint = new google.maps.LatLng(lastData.lat, lastData.long);         latlngbounds1.extend(lastPoint);         var marker = createMarker(lastPoint, "", "L", "$80");     }     map.fitBounds(latlngbounds1);          var alertLocCounter = 0;          for (var i = 0; i < totalMapData; i++) {              var mapDataMarkerCurrent = mapDataJson.MapData[i];         if (mapDataMarkerCurrent.eventAlert != "") {             marker = createMarker(point, "", "U", "$80");         }          }     }      After the full loading happened as above function user have the option to perform replay where we run through the points drawn previously using a truck icon. Below are the codes. In the doReplay function we have this codes again to simulate the zoom into the area where truck icon is now moving. At certain point when it zooms it the previous markers are all lost but the connecting line remain. Then when I manually zoom in or out the icons appear again. How to avoid this issue and have smooth replay. Another issue is that I notice the map is like keep refreshing. So how to animate it to show a smooth replay?               var markerP = "";     var setReplayID = "";     var indexReplay = 0;     var delayReplayTime = 500;     var replayStarted = 0;          function startReplay() {         //alert("Start Replay");         //alert("replay started : "+replayStarted);         if (loadData == 1 && replayStarted == 0) {             clearInterval(setReplayID);             setReplayID = setInterval("doReplay()", delayReplayTime);             document.getElementById("btnStart").className = "label label-evenr";             replayStarted = 1;         }               }          function doReplay() {              if (indexReplay < mapDataJson.MapData.length) {                  var pointReplay = new google.maps.LatLng(mapDataJson.MapData[indexReplay].lat, mapDataJson.MapData[indexReplay].long);             var richMarkerContent = document.createElement('div');             var courseValue = mapDataJson.MapData[indexReplay].course;             //alert("course is : "+courseValue+"  "+"idex is : "+indexReplay);             //alert("point is : "+mapDataJson.MapData[indexReplay].lat+"  "+"long is : "+mapDataJson.MapData[indexReplay].long);             //courseValue = 90;              // arrow image             var arrowImage = new Image();             arrowImage.src = 'alertIcon/truck1.jpg';             arrowImage.width = 30;             arrowImage.height = 80;                  //courseValue=0;             // rotation in degree             var directionDeg = courseValue;                  // create a container for the arrow             var rotationElement = document.createElement('div');             var rotationStyles = 'display:block;' +                 '-ms-transform:      rotate(%rotationdeg);' +                 '-o-transform:       rotate(%rotationdeg);' +                 '-moz-transform:     rotate(%rotationdeg);' +                 '-webkit-transform:  rotate(%rotationdeg);';                  // replace %rotation with the value of directionDeg             rotationStyles = rotationStyles.split('%rotation').join(directionDeg);                  rotationElement.setAttribute('style', rotationStyles);                       // append image into the rotation container element             rotationElement.appendChild(arrowImage);                  // append rotation container into the richMarker content element             richMarkerContent.appendChild(rotationElement);                  // create a rich marker ("position" and "map" are google maps objects)                  if (indexReplay == 0) {                 var markerC = new RichMarker({                     position: pointReplay,                          draggable: false,                     flat: true,                     anchor: RichMarkerPosition.MIDDLE,                     content: richMarkerContent.innerHTML                 });                      //markerC.setMap(map);                 markerP = markerC;                 markerP.setMap(map);                  } else {                 markerP.setMap(null);                 var markerC = new RichMarker({                     position: pointReplay,                          draggable: false,                     flat: true,                     anchor: RichMarkerPosition.MIDDLE,                     content: richMarkerContent.innerHTML                 });                      //markerC.setMap(map);                 markerP = markerC;                 markerP.setMap(map);                  }                  indexReplay++;             if (bounds.contains(pointReplay)) {             } else {                 bounds.extend(pointReplay);                 map.fitBounds(bounds);             }         }          }


Iso Cluster tool in script failing to open clip raster

I have been coding in Python for only a few months, so maybe I'm just overlooking a minor detail as a newbie. I have written the script below for a class project. It is supposed to clip two rasters, perform and unsupervised classification with the ISO tool, and then perform a change detection using map algebra. However, as you will see in error code below, the ISO tool is unable to open my clipped rasters. The script runs very fast. It's almost as if the ISO tool is attempting to open the rasters before the clip tool is done creating them. One two occasions, the script actually managed to produce the first classified image and only failed on creating the second one. Any help would be greatly appreciated. The script and error messages are included below:               ## Import Necessary Modules          import arcpy     import os     from arcpy.sa import *          ## Define repeat functions          def clip_it(AOI, raster, date):          """This function clips file raster to supplied AOI file. It always uses            AOI extent for clipping extent. Output file will be a TIF image with the            supplied date as a filename"""         try:             arcpy.Clip_management(raster, '#', '{}clip.tif'.format(date), AOI, '0',     'ClippingGeometry')         except:             print('Clip Failed')             print             print arcpy.GetMessages()             print         return          def classify_it(raster, num_class, min_class, samp_int, date):         try:             outUnsupervised = IsoClusterUnsupervisedClassification(raster, num_class,     min_class, samp_int)             outUnsupervised.save("{}class.tif".format(date))             del outUnsupervised         except:             print('Classify failed')             print             print arcpy.GetMessages()             print              return                    ## Set up workspace          from arcpy import env     env.workspace = "u:/shared/gis/studata/jpdees0754/gitprojects/Final_Project/files"     env.overwriteOutput = True     path = env.workspace          ## Prompt user for AOI and LANDSAT Rasters     ## Promt user for raster data month and year     AOI = 'AOI.shp'     new_image = 'g2011Clip.img'     new_date = '2011'     old_image = 'g2000Clip.img'     old_date = '2000'     num_class = '5'     min_class_size = '20'     sample_int = '10'                    ## Clip both rasters to area of interest          clip_it(AOI, new_image, new_date)     clip_it(AOI, old_image, old_date)               ## Perform unsupervised classification on raster images          classify_it('{}clip.tif'.format(new_date), num_class, min_class_size, sample_int,     new_date)     classify_it('{}clip.tif'.format(old_date), num_class, min_class_size, sample_int, old_date)          ## Perfom change detection on classified rasters          new_class = arcpy.Raster("{}class.tif".format(new_date))     old_class = arcpy.Raster("{}class.tif".format(old_date))          outEqualTo = Raster(old_class) == Raster(new_class)     outEqualTo.save("{}_{}_Change.tif".format(old_date,new_date))      Error Message: > Classify failed > > Executing: IsoClusterUnsupervisedClassification > u:/Shared/GIS/StuData/jpdees0754/gitprojects/Final_Project/files\2000clip.tif > 5 > u:/Shared/GIS/StuData/jpdees0754/gitprojects/Final_Project/files\isocluster6 > 20 10 # Start Time: Tue Jul 29 22:10:23 2014 Running script > IsoClusterUnsupervisedClassification... ERROR 999999: Error executing > function. Failed to open raster dataset Failed to execute (MLClassify). > > Error in executing Iso Cluster Unsupervised Classification. Completed script > IsoClusterUnsupervisedClassification... Failed to execute > (IsoClusterUnsupervisedClassification). Failed at Tue Jul 29 22:10:25 2014 > (Elapsed Time: 2.00 seconds)


Dojo ComboBox problems on iPhone5 - ArcGIS JS API

I have a website that I am trying to adapt to work with iOS. It uses a Dojo ComboBox from Dojo version 1.8.3(through the ArcGIS Javascript API version 3.4). This works fine on a desktop, but on an iPhone (testing with iOS6), when I click the dropdown menu arrow, the screen view jumps, and the keyboard opens, blocking the dropdown list. I then cannot select anything from the list. I see this has been an issue with Dojo (http://grokbase.com/t/dojo/dojo- checkins/132kx1h9jj/dojo-toolkit-16730-combobox-long-drop-down-lists-broken- on-ios)..but I don't see a resolution here. Has anyone come up with a solution or a workaround?


Z value (height,altitude) from 3D multipoint shapefile in QGIS

Is there a way to get Z value/height/altitude from 3D multipoint shapefile in QGIS? All I found is way through SpatiaLite or PostGIS as explained here: http://faunaliagis.wordpress.com/2013/08/14/transfer-3d-shapefiles-z-values- to-the-table-of-attributes/ But conversion multipoint to point using _Vector/Geometry tools/Multipart to singlepart_ drops the Z value. I opened DB manager, select DB and run SQL command in SQL window: **update tablename set columnname = st_z(st_pointn(geom,1)** In my case: update lidar_pts set z= st_z(st_pointn(GEOMETRY,1)) First there was missing ")" at the end, second: _no such column: geom_. So I changed it to "GEOMETRY" which end up running but all z values become Null. Is there a better/other way in QGIS 2? Or at least is there a way to convert multipoint to point directly in SpatiaLite so it will keep z geometry?


Dynamically Plot Markers Based on Zoom Level

I am new to the forum and to OpenLayers. I did a search of this forum and looked at some examples, but I could not quite figure out the answer to my question - please forgive me if I have overlooked a pre-existing answer. My goal is to plot a large number (tens to hundreds of thousands) of markers on a map. For performance reasons, I would like to be able to send the boundaries of the current view to my external database, query the database for the points within those boundaries, and then construct a KML file to send back to OpenLayers to display on the map. This seems to me to be pretty similar to what is done when OpenLayers determines which tiles to display, and I was wondering if anybody could point me to where I might start looking in order to implement this. Note: I would like to adopt the above approach due to performance issues I encountered while testing a similar idea with the Google Maps API - managing that many points in the browser's memory seemed to be very slow. Thank you for any suggestions you may have, I very much appreciate the help! -Rob


Are there any books about the psychology of cartography?

I have the daunting task to do a seminar about the psychology of cartography. I have zero training in this field and would like to ask if anyone has ever tackled this angle?...I would like to generalize this somewhat and start with the fact that humans think in images, and then maybe narrow it down to symbology, meaning and perception of colour and shape, symbolism and also maybe iconography...but I may be going too deep. If anyone knows of any good site, literature, YouTube links etc. which could inspire me, I would be most grateful.


Exporting to KML

I'm attempting to export a series of points that cover the continental U.S. as well as some of it's territories to KML. When I export to KML and open it in Google Earth, the data loads in, what seems to be, an intermediate location between the regions. However, I want the data to load/zoom in on the continental U.S. Can I change the load point/center point in ArcGIS before exporting to KML or would I have to change the load point within the KML code? Any help would be greatly appreciated.


Cannot add the PostGIS raster layer with QGIS

I've imported some raster data in PostGIS database with the following command:               raster2pgsql -s 31468 -I -C -M -t 50x50 /home/stefan/Quantum\ GIS/Neumarkt/NM_NW.tif public.demelevation | psql -U postgres -d landslide -h localhost -p 5432      Everything runs fine without error. But when I add the PostGIS raster layer with the plugin in QGIS, it shows the following error:               Could not load PG: dbname=landslide host=localhost user=postgres password=... port=5432 table= mode=2      I've heard about creating a vrt with gdalbuildvrt and then adding this as a raster layer. But I want to use the PostGIS raster layer plugin.


How to work with .lyr files in ArcGIS Engine

I want to be able to load .lyr files created in ArcMap and ArcGIS Engine and save any updates in symbology in ArcGIS Engine back to the .lyr file. What APIs should I use the only method I found so far is MapControl.addLayerFromFile() but the MapControl only let's me load a .lyr file? I found an API during writing the question so I add an answer myself so it can be a wiki.


Tiling/Caching Image Services with ArcGIS Server

The company I work for uses online map services while working with our clients. We publish map documents as well as image services and have had no issues until recent. We are able to publish/create a service for map documents containing vector data only with no issues but are now having issues with our raster services. We are having two seperate problems: 1 - We have geodatabases with raster mosaics of LiDAR data which we can successfully publish however they will not tile/cache; and 2 - We have a geodatabase with a raster mosaic of imagery which we can't publish or tile. When publishing we get the error "Packaging Succeeded, Publishing Failed" I've tried to do run both situations from various computers in the office as well as directly off the server and nothing seems to work. This issue only started a few weeks ago. Any suggestions on what might be the issue? Thank you


Can't get CRS transformations to work with scalie

No matter what I do I can,t seem to be able to transform several shape files (all vector) to a CRS that works. What is recommended for British Columbia for forestry purposes is NAD83 BC Albers. When I use that in both the settings- Project Properties area and project the layers individually I don't get the work on the composer screen. The size info etc. show normally but nothing comes on the screen. With WGS84 everything looks fine on the canvas but measuring tools measure in mm and the composer scale bar is way out to lunch. This is qgis 1.8. Any suggestions?


Change Measure Tool units through ArcObjects

I'm activating the measure tool through code by using the ControlsMapMeasureToolClass. I want programmmatically to change the default length units of tool. How do do that?


Different in distance measurements in MapBasic/MapInfo

I am trying to make a custom ToolButton but I am having some problems getting correct measurements. I have drawn a line (using the normal line tool) and set its length to 1000m. (Double-clicking it and measuring it with the ruler tool both show it to be exactly 1000.00m) However when I use my tool and drag from one end of the line to the other it gives a distance of 999.8892m. I'm guessing it's some kind of projection issue but I'm using the same settings throughout the system... **Where am I going wrong?**               Include "mapbasic.def"     Include "icons.def"          Declare Sub Main     Declare Sub LineTool     Declare Sub ExitProg          Sub Main       Alter ButtonPad "Drawing"         Add            Separator           ToolButton             Icon MI_ICON_ARROW_19             HelpMsg "Click on map to draw a line"             Cursor MI_CURSOR_CROSSHAIR             DrawMode DM_CUSTOM_LINE             Calling LineTool         Show            Alter Menu "Tools" Add         "Close Line Tool" Calling ExitProg     End Sub          Sub ExitProg       End Program     End Sub          Sub LineTool       Set Distance Units "m"       Set Coordsys Earth            Dim x, y, x2, y2 as float            x = CommandInfo(CMD_INFO_X)       y = CommandInfo(CMD_INFO_Y)       x2 = CommandInfo(CMD_INFO_X2)       y2 = CommandInfo(CMD_INFO_Y2)       print x & ", " & y & ", " & x2 & ", " & y2             If x <> x2 and y <> y2 Then         print Distance(x, y, x2, y2, "cm")       Else         print "That wasn't a line."       End if     End Sub


Why Intersect gives ERROR 999999: Error executing function Invalid Topology [Too many lineseg endpoints]?

I am trying to run an Intersect process in arcgis 10 sp 3 with 2 file sets (aspect and slope) from up to a 1m DEM across an area of 65,000sq km. The aspect has 9,930,384 records and the slope has 31,435,462 records (approx 12GB total in 2 file geo-databases). I have run repair geometry about 3 times and now the datasets do not report any errors (each time took over 30h). Now I get > Executing (Intersect): Intersect > "D:\SCRATCH\Projects\106\data\7_asp_Merge.gdb\asp_HghstRez_M_rep #" > D:\SCRATCH\Projects\106\data\working\working.gdb\AsSl_Int ALL # INPUT Start > Time: Sun Oct 23 02:19:10 2011 Reading Features... > > Processing Tiles... > > ERROR 999999: Error executing function. > > Invalid Topology [Too many lineseg endpoints.] > > Failed to execute (Intersect). > > Failed at Sun Oct 23 04:09:12 2011 (Elapsed Time: 1 hours 50 minutes 2 > seconds) Is this really a topology issue or a file size issue? I have tried to use the ArcINFO SPLIT tool but it fails even with over 1TB of free space on the drive and on smaller file set causes jagged edges. I can’t use DICE as the areas to intersect between the asp and slope must be exactly the same. I understand that on large datasets ESRI cracks (automatically tiles) the datasets –can this be introducing issues? Is there any more info I can provide to problem solve. The spec of the machines is more than ESRI minimum –we have 16GB RAM, Intel Xeon, Windows 7, 64-bit, 2 x One TB disks and more than 1.2TB free on the drives. All files used in the process are on the local drives. Thanks for your help, === just found this explanation (July 2nd, 2012) that gives a lot of helpful hints on resolving the issues. http://blogs.esri.com/esri/arcgis/2010/07/23/dicing-godzillas-features-with- too-many-vertices/


Converting Microsoft Visio 2007 .vsd file to xml workspace document (without the macro)

I was just editing my geodatabase schema in Microsoft Visio and noticed that it is the new 2007 version, rather than 2003 which had a handy export tool, therefore I downloaded the ESRIExportToXML macro, however when I use it, it comes up with the following error: Run-time error'-2032465751 (86db08a9)': The line of code which it breaks on is the following:               Set pAO = Application.Addons.Item("UML Background Add-on")      I have tried to fix the code or find other tools to export it to xml from visio but have virtually given up. Therefore I was wondering if I could do something along the lines of export it to pdf then, using acrobat pro save as an xml (I have tried this but it created an invalid xml file), or convert it in excel? Therefore is there a way round or alternative route for converting an .vsd file to xml file? Apologies for the lengthy/inarticulate explanation. Cheers, Duncan


How to release the lock on a gdb?

I have problems to release my gdb in ArcGIS10. My tool works with an local gdb, but I failed to release it after the process. In Ag9.3 I can release it simply by Marshal.ReleaseComObject(workspace), but this doesn't work in AG10. Also releasing all FeatureCursors doesn't help. Only closing the whole application "deletes" the lock. Does anyone know how to release my gdb and "delete" the lock without closing the application?


Find areas of overlap

Apologies if this question has been asked (I suspect it has or is so simple that people havent needed to ask it) but I am extremely inexperienced with GIS software and need it to find out some information. Basically I am going to have about 300 shapefiles representing the range of different species in the wild. What I want to be able to do is find areas where the most species occur to highlight areas where many of these species exist. Is there a simple way to do that in arcgis 9. Any help guys would be greatly appreciated


ArcMAP Clear Cache - Function

Do any of you use the Clear Cache function much OR upped your cache from the default 100mb? We export PDFs from MXDs and it has been reported to us by a few that upping this number or clearing the cache helps generate PDF exports successfully - I dont find much documentation on this in HELP and was wondering if any one had any thoughts on this: You can find it : ArcMAP (931) > Tools > Options > Data Interoperability > Cache "CLEAR CACHE" Found a thread on the ESRI forums: http://forums.esri.com/Thread.asp?c=93&f=982&t=235621


Add polygons to PostGres to be queried by Nominatim

I'm trying to build out a geocoder that also returns the correct legislative district information from this data: http://www.census.gov/geo/maps- data/data/tiger.html I've got OSM data imported into a PostGres database and I'm using Nominatim to query that information, but I cannot figure out how to lay the above information on top of that and return it via Nominatim. After reading a lot, I'm assuming it would make sense to layer the legislative district information as polygons. I'm not looking for the polygon to be mapped as the usage will be strictly API. What type of geodata file do I need to download? And how would I go about getting it included in the queried elements of Nominatim?


Unable to process "subbasin parameters from raster"

I was wondering why do i have a different interface for subbasin parameters from raster window. . i image is displayed below. ![enter image description here](http://i.stack.imgur.com/ByrP8.png) instead of this. . ![enter image description here](http://i.stack.imgur.com/eWIsv.png)


global pseudo true color landsat mosaic available for download?

Is there a global pseudo true color Landsat mosaic available for download at no charge? Something that was derived from the GeoCover 2000 data set? It doesn't have to be 15 m, 30 m would work, 60 m would work too. Just looking for close to natural colors as opposed to the original data set which is available at no charge from landsat.org


How can I find the segment of a line that lies within a polygon using Postgis?

Given a "road", represented by a line, that crosses a "state", represented by a polygon: What is the SQL query I can use to find the segment of the road that is within the state? A concrete example. I have a single line representing Route 66 which traverses the USA. I also have polygons for each state. I want to find the segment of Route 66 that lies within Texas.


How are labels dynamically placed on a line or polygon?

I was wondering if anyone knew the math involved, or resources for learning the math involved, in finding the ideal position, scale, and rotation of a label for a line or polygon on a map? The most I've got so far is finding the centroid for a polygon (though it's not ideal for concave polygons).


How to get create new object right in postgresql

I created a .shp in QGIS successfully and now i want to move on this to postgis db, following this command               shp2pgsql -s 2964 roads.shp lakes_new | psql qgis_db      but i got this error how to solve this.               Shapefile type: Arc     Postgis type: MULTILINESTRING[2]     SET     SET     BEGIN     ERROR:  permission denied for schema public     ERROR:  current transaction is aborted, commands ignored until end of transaction block     ERROR:  current transaction is aborted, commands ignored until end of transaction block     ERROR:  current transaction is aborted, commands ignored until end of transaction block     ERROR:  current transaction is aborted, commands ignored until end of transaction block     ROLLBACK


Field calculator script not working

I am trying to do the following in the field calculator in ArcGIS 10               if  [IncdStDir] = " " then [IncdStNo] &" " & [IncdStName] &" " & [IncdStSfx]          else  [IncdStNo] &" " & [IncdStDir]&" " & [IncdStName] &" " & [IncdStSfx]          end if      I keep getting an error when I try to run this. I am new to Vb so any help would be appreciated.