Resources for Learning 508 Compliance/Accessibility Requirements for GIS Figures

Does anyone know of any quality resources (books, papers, presentations, websites) for learning about 508 Compliance/Accessibility requirements in relation to cartography (GIS figures and templates)? This is also in relation to colorblindness and visually-impaired end users.


Change coordinate system in multiple MXDs ArcGIS 9.3 using Python

I have to loop through some folders which may contain *.mxd files and change their coordinate system. I already found this piece of Python which should do the trick for ArcGIS 10.x (from here):               prjFile = prjPath + "/" + "NAD 1983 UTM Zone 10N.prj"     sr = arcpy.SpatialReference(prjFile)     for DF in MAP.ListDataFrames(MXD):         DF.spatialReference = sr      However, it looks like there is nothing similar to the arcpy.mapping module in 10 available in 9.3. I need to access the MXD file and then the dataframe(s) it contains, in order to change the coordinate system. I could not find anything useful so far, although I assume that other people may have similar issues. My question therefore, is there any (simple) workaround to this using Python (arcgisscripting) in ArcGIS 9.3?


MapGuide with RDBMS database design guidelines

I'm brand new to GIS programming and I am designing a GIS application and I think I want to use MapGuide because of its user selection features (Digitizing and Redlining - or can I do this easily with MapServer and OpenLayers?). I am reading through documentation/tutorials and I can't seem to find any guidelines to designing a spatial database for use with MapGuide. Can I design it in any way as long as I keep query optimization in mind? It looks this way from the diagrams, but I want to be sure. What should I store in my separate DB and what in the MapGuides server repository in .shp files? Edit: MapGuide stores Thanks


How to overwrite a Shapefile

I want to be able to overwrite a shapefile if it exists. I think my code needs some tweaking. I am using v10. I am able to delete the actual .shp file but the .dbf, .shx, etc still remain, so if I try to overwrite again, I get an error. How can I remove all the files associated with the shapefile?               DoesItExist = True     geometry_type = "POLYGON"     print "Your shapefile is being generated."     out_path = raw_input("Enter in path to save shape file: ")     out_name = raw_input("Enter in name of shape file: ")          while DoesItExist == True:          if (os.path.exists(os.path.join(out_path, out_name))):             print "This file already exists. Do you wish to overwrite it?"              choice = raw_input("Y/N:")         if (choice == 'Y' or choice == 'y'):             print "File will be over written"             os.remove(os.path.join(out_path, out_name))             #arcpy.CreateFeatureclass_management(out_path, out_name, geometry_type)             DoesItExist = False         else:             print "Choose new file name/location!"             out_path = raw_input("Enter in file path: ")             out_name = raw_input("Enter in file name: ")          else:         print "Shapefile created in: " + str(os.path.join(out_path, out_name))         arcpy.CreateFeatureclass_management(out_path, out_name, geometry_type)         DoesItExist = False


Install the Pgadmin3 shapefile importer plugin on a Mac(10.8)?

I'm new to GIS related things and I'm setting up a Postgre/Postgis database for geospatial queries. I'd like to import various shapefiles into the database and I found that Pgadmin3 has a shapefile importer. How do I install the shapefile import plugin for pgadmin3 (I'm on Mountain Lion 10.8)? Right now, the plugin menu is empty, and I have the very latest of Postgres and Postgis. See my comment below about what I've seen elsewhere on this topic.


Breaking apart a polygon layer by unique values, creating many new layers

I have a large dataset of habitat information that I need to calculate distances from animal locations to the closest polygon of each habitat type. The way to do this, that I understand, would be to create Euclidean distance rasters for each habitat type. But in order to do this I need to break apart the original layer into many different parts. I can do this by "Select by attribute" and create a new layer for each one, but I was wondering if there was a tool that automates that and breaks apart a layer into multiple smaller layers by unique values in a column. If not, oh well, I'll get down to selectin' and creatin'. Thanks in advance. Ayden


sdequery.exe: When using functions as column names (-C parameter), how do you escape the comma for functions with parameters?

Using sdequery, I'm specifically trying to return `sys_context('USERENV', 'SESSIONID')`. `user` and `sysdate` work fine. Functions with single parameters work fine. But as soon as I use a function with multiple parameters, I get: Error: Stream not found (-107). The SDEINTERCEPT shows the query columns as 2 columns (split at the comma). Makes sense since the comma is usually a column delimiter, but how do you escape commas that aren't delimiters? I've tried preceding the comma with a backslash. Double commas. Wrapping the entire thing in double quotes. Wrapping the comma in various quote combinations. **UPDATE**   `USERENV('SESSIONID')` works and gives me what I need, but I'd still like to know if/how you can escape the comma for future reference.


Drag zoom in Quantum GIS missing?

There are like ten zoom-tool icons but no one seems to do what I look for - to zoom to a rectangle that will be created by dragging mouse from top left corner of it to bottom right corner of the rectangle. Can you please tell me how to achieve this in Quantum GIS? I am using the latest 1.8.0-Lisboa version.


What is the correct way to merge adjoining raster images?

I am trying to create a raster base layer from NAIP ortho imagery. Unfortunately for me, the area of interest is very near the intersection of four image files. I have tried a few approaches to combining them into a single map layer:   * Naively grouping them together in a GeoServer Layer group   * Combining them with GeoServer's ImageMosaic plugin   * Merging them with gdal_merge.py In all cases, the result has the same visual problem of ragged black lines where the images meet. See the example image, below. The black lines appear at the edges of each of the individual files, they are not merely an artifact of merging the images, so in a sense this isn't a surprising outcome -- just annoying. What is the correct procedure to join these orthoimages into a reasonably seamless layer? Is this even a practical thing to do? ![Ugly black seams](http://i.stack.imgur.com/IIog2.jpg) A few more details:   * The imagery came from the USDA Geospatial Data Gateway, National Ag. Imagery Program Mosaic listing   * The files were in MrSID format, but I've also created GeoTIFF copies for the gdal_merge.py approach   * In addition to the MrSID files, the data set included shape and prj files.   * The images use projection NAD83 / UTM 16N, so I've been using EPSG 26916   * I'm a programmer, not a GIS expert, so my knowledge of this area is pretty limited


tool to find the routing distance between two latitude/longitude points using OSM data

I need a tool to find the distance between two points whose longitude and latitude are given. I am making an application so it will require bulk queries, so i cannot use google maps distance matrix API that could tell me the distance via road, airways or any other. So I turned up to OSM data, i downloaded the OSM data and then pgrouting tool. But I am unable to find the distance via road between two points from this data stored in postgres table. Any help regarding how to fetch this data from the postgresql db or any other resource you know that can accomplish my goal will be greatly appreciated.


How to resize shapefile features proportionally in QGIS?

In Quantum GIS (1.8.0-Lisboa) on Windows (OSGeo4W Install), how exactly would you resize a feature proportionally. The only way I've found to do this is by hand using either the Freehand Editing (0.2.6) plugin or the Reshape Features button. Neither of these provides a means to uniformly scale (as in resize) the selected feature up or down. For example, I want to increase the features size by 130% so that you retain the shape of the feature but expand the area of the shape itself proportionally in all directions?


How to open a .k format (I think it is made with IDRISI product) with open source software

I just received a `.k` file which I know it was made with a IDRISI software (I do not know which). I searched the web and I did not find many information on this format apart for a very essential page with few useful info. It seems from what I read that this could be a kind of container for the IDRISI raster files? Am I wrong? I tried (of course not successfully) to import it (with the raster import functions) in QGIS, GRASS GIS, SAGA GIS. GRASS and QGIS returned this message: > D:\XXXXXX\RESULTAT_TAYMA_4500.K is not a supported raster data source > Ungridded dataset: At line 4, X is 4.000000, where as 1.000000 was expected I work on Windows 7 with open source software (mainly QGIS, GRASS and SAGA).   Does anybody have some tips about this file format?


building larger polygons from smaller ones *without* a common id in PostGIS

I am looking for a means, using PostGIS, of reconstituting a set of polygons from tens of thousands of smaller polygon 'pieces'. This is a simplified example, with the pieces shaded:![Polygon pieces](http://i.stack.imgur.com/bTRzU.png) Unfortunately the pieces do not have a common ID or other attribute of the larger polygons that would allow me to group them. In some cases I have the grid that was used to cut the pieces, but in other cases I do not. The only approach I've been able to devise -- and I haven't been able to make it work yet -- is to use ST_BuildArea on pairs of intersecting pieces in an iterative process as follows (renaming 'composite' to 'pieces' between iterations):               SELECT p1.id,ST_BuildArea(ST_Collect(p1.the_geom,p2.the_geom)) AS the_geom     INTO composite     FROM pieces p1 LEFT OUTER JOIN pieces p2         ON (ST_DWithin(p1.the_geom,p2.the_geom,1))     WHERE ST_Intersects(p1.the_geom,p2.the_geom) AND     p1.id < p2.id;      Of course this generates larger and larger composite pieces, but lots of them (nearly 1300 after three iterations on the example), and they come increasingly to overlap. It seems to me that to go much further I'd need a means of paring down the results each iteration. (I'm also getting side location conflicts on the fourth iteration, but that may be a separate problem.) Thank you in advance.


Cropping with GDALWarp in QGIS

I followed this post, the first answer, to clip a USGS Quad in order to remove the borders so that I can tile them. Basically it utilized the lat/long at the corners in a .txt file to import a rectangle using "add delimited text layer". I then reproject the rectangle to match the CRS of the USGS quad. After I clip it I get black edges, see image. ![black corners](http://i.stack.imgur.com/iVlfl.png) I offered the error as a comment in the aforementioned post and it was answered that its likely from re-projecting the rectangle and that I should use -dstalpha or -dstnodata to make it white. When I use those two options, I just get a colored rectangle. I actually want that area transparent for when I tile multiple USGS Quad maps. I even tried to re-project the quad map to the CRS of the rectangle. Does anyone know how I can clip the USGS quad without having the black corners for tiling pruposes? FYI... I am using QGIS 2.2 on Windows 7. **EDIT:** The mask that I have compiled using the delimited text layer matches the area that I would like to clip perfectly. So I dont think that I have an error. I downloaded the Newburgh and the Cornwall on Hudson Quads. Reading the corner coordinates I developed the following two .txt files: Newburgh > Nr;WKT 1;POLYGON((-74.00 41.5, -74.125 41.5, -74.125 41.625, -74.00 41.625, > -74.00 41.5)) Cornwall on Hudson > Nr;WKT 1;POLYGON((-74.00 41.375, -74.125 41.375, -74.125 41.5, -74.00 41.5, > -74.00 41.375))


How can I get shape filename in attribute field using field calculator with VBA?

I want to store ths shapefile name in an attribute field using the field calculator and visual, but can't find the way to do it. Can anyone help me, please? Thanks!!!


Drive Times issue with Rendering Graphics

I am trying to consume the Esri Drive times geoprocessing service within a Flex application, based around the v2.2 Flex API. I have seen the sample on how to do this.   - However, mine is a bit more based on ActionScript over MXML.   - I should also point out that I am fairly new to Flex/Esri API development, so lamens terms would be great :) My application seems to be hitting the GP service ok, and I think I am getting the features returned from the Esri servers, however I am having some **difficulty setting up a renderer** for the results: ![enter image description here](http://i.stack.imgur.com/kZA5g.png) I get these 'call to a possible undefined method' a fair bit, but not too sure on how I can tweak this to work. I have been following the samples provided for symbolising graphics with renderers. If it helps, I have recorded a short screencast to show the rest of my code. _**---EDIT-----_**   I am getting the features returned to me from the gp service, and I have tried to mimic the Esri Flex sample for drive times, but the graphics are not rendering.   * Here is a new screencast to give you more details.    * Here is the code in a text file.   * i have added a small bounty. Winner will be one who helps spot what ive done wrong and gets my results to render in graphics layer (let me know if you need more info).    * bonus points on suggestion to streamline the code. _**---EDIT2---_** Been investigating the requests/responses made from my app and the Esri sample. (links have more info) So, looking at the response, im getting it in WKID 4326, when it should be 102100.   Im now using the same basemap as the Esri Sample.   I have also hard-coded the output spatial reference to be 102100.   Still no joy. My App GET request: > > http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Network/ESRI_DriveTime_US/GPServer/CreateDriveTimePolygons/execute?f=json&Drive%5FTimes=1%202%203&Input%5FLocation=%7B%22features%22%3A%5B%7B%22geometry%22%3A%7B%22x%22%3A%2D13629847%2E781785995%2C%22y%22%3A4548460%2E945559423%2C%22spatialReference%22%3A%7B%22wkid%22%3A102100%7D%7D%7D%5D%7D Esri Sample GET request: > > http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Network/ESRI_DriveTime_US/GPServer/CreateDriveTimePolygons/execute?f=json&env%3AoutSR=102100&Input%5FLocation=%7B%22features%22%3A%5B%7B%22geometry%22%3A%7B%22x%22%3A%2D10608048%2E003182963%2C%22y%22%3A4721388%2E810494098%2C%22spatialReference%22%3A%7B%22wkid%22%3A102100%7D%7D%7D%5D%7D&Drive%5FTimes=1%202%203


Built QGIS installer with own GUI

I would like to build/compile a QGIS installer with my own customized GUI. Does anybody of you has some experience with it or some help material (links, documents, ...). Is it possible to create a own .ini file with the QGIS customization and use it for building a new installer? I'm completely new to this things but I have to start somewhere :) Thanks for your help!


multiple data atach with shape file in GIS-regarding

I have different sampling data of one location that is a point so, multiple data how to join with single point. after joining i need quries by select attribute in GIS.


Google Maps with shapefile/WMS - get feature info problem

I've just created my first Geoserver "portal". For this I created 2 .js files. In first .js file I have Google Maps API and in the second .js file I have my shapefile. Directly from Geoserver I can get the feature info by clicking the feature. But in my page I can't do that. I think the problem is Google Maps. Is there a way to put the shapefile "on top" of Google Maps? I think this is the solutions. For get feature info I have copied the code from Geoserver page. The code for the 1st js file is:                   var Maps = (function() {              var filterList = {};              return {             loadGoogle: function() {                      var myLatlng = new google.maps.LatLng(45, 25);                 var myOptions = {                     zoom: 6,                     center: myLatlng,                     mapTypeId: google.maps.MapTypeId.ROADMAP                 }                 var map = new google.maps.Map(document.getElementById("map-canvas"), myOptions);                      var customParams = [                     "FORMAT=image/png8",                     "LAYERS=adi:intabulat_vladaia"                 ];                      //Add query string params to custom params                 var pairs = location.search.substring(1).split('&');                 for (var i = 0; i < pairs.length; i++) {                     customParams.push(pairs[i]);                 }                 loadWMS(map, "http://localhost:8080/geoserver/adi/wms?", customParams);             }              } // return: public methods      })();          // Jquery Document.onLoad equivalent     $(document).ready(function() {         Maps.loadGoogle();      }); // end JQuery document ready      And for the second file is:                   /*           */          function bound(value, opt_min, opt_max) {         if (opt_min != null) value = Math.max(value, opt_min);         if (opt_max != null) value = Math.min(value, opt_max);         return value;     }          function degreesToRadians(deg) {         return deg * (Math.PI / 180);     }          function radiansToDegrees(rad) {         return rad / (Math.PI / 180);     }          function MercatorProjection() {         var MERCATOR_RANGE = 256;         this.pixelOrigin_ = new google.maps.Point(             MERCATOR_RANGE / 2, MERCATOR_RANGE / 2);         this.pixelsPerLonDegree_ = MERCATOR_RANGE / 360;         this.pixelsPerLonRadian_ = MERCATOR_RANGE / (2 * Math.PI);     };          MercatorProjection.prototype.fromLatLngToPoint = function(latLng, opt_point) {         var me = this;              var point = opt_point || new google.maps.Point(0, 0);              var origin = me.pixelOrigin_;         point.x = origin.x + latLng.lng() * me.pixelsPerLonDegree_;         // NOTE(appleton): Truncating to 0.9999 effectively limits latitude to         // 89.189.  This is about a third of a tile past the edge of the world tile.         var siny = bound(Math.sin(degreesToRadians(latLng.lat())), -0.9999, 0.9999);         point.y = origin.y + 0.5 * Math.log((1 + siny) / (1 - siny)) * -me.pixelsPerLonRadian_;         return point;     };          MercatorProjection.prototype.fromDivPixelToLatLng = function(pixel, zoom) {         var me = this;              var origin = me.pixelOrigin_;         var scale = Math.pow(2, zoom);         var lng = (pixel.x / scale - origin.x) / me.pixelsPerLonDegree_;         var latRadians = (pixel.y / scale - origin.y) / -me.pixelsPerLonRadian_;         var lat = radiansToDegrees(2 * Math.atan(Math.exp(latRadians)) - Math.PI / 2);         return new google.maps.LatLng(lat, lng);     };          MercatorProjection.prototype.fromDivPixelToSphericalMercator = function(pixel, zoom) {         var me = this;         var coord = me.fromDivPixelToLatLng(pixel, zoom);              var r= 6378137.0;         var x = r* degreesToRadians(coord.lng());         var latRad = degreesToRadians(coord.lat());         var y = (r/2) * Math.log((1+Math.sin(latRad))/ (1-Math.sin(latRad)));              return new google.maps.Point(x,y);     };          function loadWMS(map, baseURL, customParams){         var tileHeight = 256;         var tileWidth = 256;         var opacityLevel = 0.60;         var isPng = true;         var isbaselayer=true;         var minZoomLevel = 2;         var maxZoomLevel = 28;              //var baseURL = "";         var wmsParams = [         "REQUEST=GetMap",         "SERVICE=WMS",         "VERSION=1.1.1",         "BGCOLOR=0xFFFFFF",         "TRANSPARENT=TRUE",         "SRS=EPSG:900913", // 3395?         "WIDTH="+ tileWidth,         "HEIGHT="+ tileHeight         ];              //add additional parameters         var wmsParams = wmsParams.concat(customParams);              var overlayOptions =         {             getTileUrl: function(coord, zoom)             {                 var lULP = new google.maps.Point(coord.x*256,(coord.y+1)*256);                 var lLRP = new google.maps.Point((coord.x+1)*256,coord.y*256);                      var projectionMap = new MercatorProjection();                      var lULg = projectionMap.fromDivPixelToSphericalMercator(lULP, zoom);                 var lLRg  = projectionMap.fromDivPixelToSphericalMercator(lLRP, zoom);                      var lUL_Latitude = lULg.y;                 var lUL_Longitude = lULg.x;                 var lLR_Latitude = lLRg.y;                 var lLR_Longitude = lLRg.x;                 //GJ: there is a bug when crossing the -180 longitude border (tile does not render) - this check seems to fix it                 if (lLR_Longitude < lUL_Longitude){                   lLR_Longitude = Math.abs(lLR_Longitude);                 }                 var urlResult = baseURL + wmsParams.join("&") + "&bbox=" + lUL_Longitude + "," + lUL_Latitude + "," + lLR_Longitude + "," + lLR_Latitude;                      return urlResult;             },                  tileSize: new google.maps.Size(tileHeight, tileWidth),                  minZoom: minZoomLevel,             maxZoom: maxZoomLevel,                  opacity: opacityLevel,                  isPng: isPng         };              overlayWMS = new google.maps.ImageMapType(overlayOptions);              map.overlayMapTypes.insertAt(0, overlayWMS);              map.setOptions({             mapTypeControlOptions: {                 mapTypeIds: [                 google.maps.MapTypeId.ROADMAP,                 google.maps.MapTypeId.TERRAIN,                 google.maps.MapTypeId.SATELLITE,                 google.maps.MapTypeId.HYBRID                 ],                 style: google.maps.MapTypeControlStyle.DROPDOWN_MENU             }         });     }                 // support GetFeatureInfo                     map.events.register('click', map, function (e) {                         document.getElementById('nodelist').innerHTML = "Loading... please wait...";                         var params = {                             REQUEST: "GetFeatureInfo",                             EXCEPTIONS: "application/vnd.ogc.se_xml",                             BBOX: map.getExtent().toBBOX(),                             SERVICE: "WMS",                             INFO_FORMAT: 'text/html',                             QUERY_LAYERS: map.layers[0].params.LAYERS,                             FEATURE_COUNT: 50,                             Layers: 'adi:intabulat_vladaia',                             WIDTH: map.size.w,                             HEIGHT: map.size.h,                             format: format,                             styles: map.layers[0].params.STYLES,                             srs: map.layers[0].params.SRS};                              // handle the wms 1.3 vs wms 1.1 madness                         if(map.layers[0].params.VERSION == "1.3.0") {                             params.version = "1.3.0";                             params.j = parseInt(e.xy.x);                             params.i = parseInt(e.xy.y);                         } else {                             params.version = "1.1.1";                             params.x = parseInt(e.xy.x);                             params.y = parseInt(e.xy.y);                         }                              // merge filters                         if(map.layers[0].params.CQL_FILTER != null) {                             params.cql_filter = map.layers[0].params.CQL_FILTER;                         }                          if(map.layers[0].params.FILTER != null) {                             params.filter = map.layers[0].params.FILTER;                         }                         if(map.layers[0].params.FEATUREID) {                             params.featureid = map.layers[0].params.FEATUREID;                         }                         OpenLayers.loadURL("http://localhost:8080/geoserver/adi/wms", params, this, setHTML, setHTML);                         OpenLayers.Event.stop(e);                     });                           // sets the HTML provided into the nodelist element                 function setHTML(response){                     document.getElementById('nodelist').innerHTML = response.responseText;                 };                // build up all controls                     map.addControl(new OpenLayers.Control.PanZoomBar({                         position: new OpenLayers.Pixel(2, 15)                     }));                     map.addControl(new OpenLayers.Control.Navigation());                     map.addControl(new OpenLayers.Control.Scale($('scale')));                     map.addControl(new OpenLayers.Control.MousePosition({element: $('location')}));                     map.zoomToExtent(bounds);                     map.events.on;                          function setWidth(size){                     var mapDiv = document.getElementById('map');                     var wrapper = document.getElementById('wrapper');                          if (size == "auto") {                         // reset back to the default value                         mapDiv.style.width = null;                         wrapper.style.width = null;                     }                     else {                         mapDiv.style.width = size + "px";                         wrapper.style.width = size + "px";                     }                     // notify OL that we changed the size of the map div                     map.updateSize();                 }      And I have a htm file wich calls the two js files. In the second file the part from "GetFeatureInfo" is from geoserver OpenLayer page. I am new in this and I don't understand why it's not working. It's not working because of Google Maps or is something else wrong? The problem is when my mouse pointer is over a feature it is the hand drag tool. I can drag the google map from left to right, top to bottom. I think wher my pointer is over a feature it should transform to a marker pointer. Thank you


Arcmap 10 project: Finding best site for a new powerplant

I'm an electrical engineering student taking GIS introductory course as an elective. i have learned the basics of Arcmap 10 like adding data, creating maps, editing shapefiles etc. Now, i'm required to do a project using arcmap 10. i decided to do something relating to my field: Finding the best site for a new powerplant in a small town. i thought i knew how to use arcmap, but ever since i decided on this project, i can't seem to get a thing done. i've been cracking my brain for the past three days. All i need is for someone to tell me where to begin. what is the first thing i need to do and what other things do i need to have? what should my input datasets be and how do i get them? if i can gather these information, i'm sure i can put together my project in no time. please help if you can. i would really appreciate that.


How can I make a leaflet control open by default?

I'm using leaflet to display a map. I have a control section that I'd like to be open by default, but I can't find a way to do it through the API. Is there a way to do this?


Orthophoto in QGIS to georeference for use in Sketchup 8, or how to match it with Sketchup 8 pictures?

I have a high resolution orthophoto of an area I want to rebuild in sketchup and therefore want to lign it up (georeference it properly), but all the scaling and everything I tried so far did not help matching it exactly up with the sketchup 8 provided google earth pictures. I figured out, that it must be due to the fact, that my pictures are in the ETRS89 UTM32N date and the sketchup photos in another, I assume it should be Google Mercator as I researched so far. (I tried and succeeded matching it using the openlayers plugin in QGIS and the on the fly function, but when I zoom in, everything is out of order again.) And even if I would not have the zoom in problem, how could I export the layer with the new projection? I think it´s not possible in QGIS, since you can only save project files. So is there a nother capable freeware I could use? Please help me, any hints very much appreciated. Thank you for your help, Os


Interactive PDF Map with Photos

I am looking to create a PDF using Arc10 that contains locations for our site. At each of these locations you would be able to click the point and you can then see the photos for the area. Is this possible? I am thinking something like Google Earth's functionality for shared photos. I feel like this is feasible. Thanks! Tony


Is it possible to make OGC WMS/WFS look like a ArcGIS Server layer, including functionality?

ESRI contacted me about this question. After a good talk the conclusion was that it is not wise to build a wrapper around WMS/WFS because of possible changes to the REST interface of ArcGIS Online later. If we want to use ArcGIS Online fully, we just have to use ArcGIS Server. Too bad that we also use OGC- services from external parties. Found no solution for that yet... ----original question---- Our organisation is interested in using ArcGIS Online. We already serve our spatial data using the OGC standards WMS/WFS using Mapserver. Unfortunately, ArcGIS online only works great if you use ArcGIS Server to serve your data. ArcGIS Online only supports the mapping funcionality of WMS, but not the 'GetFeatureInfo' functionality. WFS is not supported by ArcGIS Online at all. Because migrating all our maps (800+) to ArcGIS Server will be time consuming and expensive I am searching for an alternative. Do you know of any method to disguise our WMS/WFS services as if they were ArcGIS Server services? I'm thinking about a wrapper of some kind. In theory ArcGIS Online should than be able to use these services as if they were ArcGIS Server services. Please let me know your thoughts! Cheers! Mark


Export to a Shapefile and maintain Domain Coded Values

I maintain a complex parcel fabric that uses coded value domains for a few fields. These are short integer fields with values from 1 - 6. These values represent say 1:Integrated Registered Survey Plan, 2:Survey Plan, 3:Geo- Referenced Air Photography, 4:Government Provided, 5:Expert Knowledge, 6:Unknown. So I have several data requests and they need to be provided in Shapefile's. When I export my parcel fabric the fields obviously make no sense since they are numeric values representing accuracy codes from domains. Is there any way to convert this field from a coded numeric field to its domain value? I know I can do this with some python programming, but I wonder if ESRI already has a solution for this. Also I am managing the Parcel Fabric in a File Geodatabase.


Qgiscloud upload problems

Uploading a map to Qgiscloud seems to work fine. But uploading data presents two problems. Qgiscloud complains that my version of OGR/GDAL is outdated. And if I try to upload data, qgis complains that it is unable to open datasource. I'm using Linux Mint 13 and both Qgis 1.8.0 and 1.9.0 on different computers. OGR/GDAL is 1.7.3 and I see no way to update that. Any suggestions? Thanks.


OpenLayers WMS - TypeError: this.resolutions is undefined

I'm trying to setup a map with WMS and WFS Layers by using Geoserver. However, when I'm combining WFS and WMS (with some Google basemaps) together in one map I got following error in Firebug: TypeError: this.resolutions is undefined which is located in the http://openlayers.org/dev/OpenLayers.js JS-file Then I can see the WFS layer but not the WMS layer, furthermore also navigating in the map becomes very difficult... The WFS Layer look like this:                      var tracks = new OpenLayers.Layer.Vector("Tracks", {         strategies: [new OpenLayers.Strategy.BBOX()],         styleMap: style,         protocol: new OpenLayers.Protocol.WFS({             version: "1.1.0",             url: "http://localhost:8080/geoserver/wfs",             featureNS: "http://shapes.net/shapes",             featureType: "tracks",             geometryName: "the_geom",         })     });      Well, thise works quite good but as soon as I'm adding also a WMS Layer into the map i got the Error               var corine =  new OpenLayers.Layer.WMS( "OpenLayers WMS",                     "http://vmap0.tiles.osgeo.org/wms/vmap0",                     {layers: 'basic'} );      It doesn't matter if I take a WMS from my Geoserver or from an other external source (like in the code here), I always got the error when I'm activating this layer. Btw. if the layers are not combined the works fine... My assumption is that there could be a problem with the projection. Both layers are defined in Geoserver with EPSG:4326. In the `init.js` I'm using this projects here:               projection: new OpenLayers.Projection("EPSG:4326"),     displayProjection: new OpenLayers.Projection("EPSG:900913"),      Any ideas?


Geocoding Multiple Addresses using ArcGis JS API

I am new to using the ArcGIS JavaScript API. I am currently trying to develop an application but I am having troubles with it. The application I am developing uses a .csv file with a bunch of locations. The fields for each location are the address, zipcode, county, city, and state. It then geocodes each location and returns another .csv file with all the the address, zipcode, county, city, state, latitude, and longitude. Using a .csv file to geocode the addresses isn't the important part, I could convert the .csv file into something else if necessary, what I am having trouble with is with the geocoding. I looked at the samples online and the tutorials but did not find any that would geocode multiple addresses and that would return a file instead of just placing a mark on the map. Could anyone please give me an idea of how this could be accomplished using the API? Tutorials/Samples would be extremely helpful.


Problem Joining FAA raster charts

I am new to GIS and I am trying to place the North and South Salt Lake City aeronautical charts in QGIS. The problem I'm having is that there is a black section where the two charts should touch. Am I missing something when I add the raster layers in QGIS? How do I get the maps to join without the black band in the middle? Sectional charts are supposed to have a small overlap between the North and South sides of the map but that doesn't seem to be the case. Can anyone help me fix this? Thanks in advance


Propose a new location for Watch Tower using Viewshed Analysis

![enter image description here](http://i.stack.imgur.com/mY61l.jpg) I want to suggest location for new watch tower in a forest area, but i am confused , on what criteria i can propose a best location. If i am taking DEM , slope and distance from existing tower , then how can i propose a best location in terms of GIS. I don't want to select points mannualy and check viewsheds , again a new point and its viewshed, until I get a maximum visible area.I want to utilize gis tools. I tried with dem ,slope, proximity from existing tower and there reclassification into 10 classes and then weightage overlay with more percentage to dem, then distance from existing tower and least to slope.But I couldn't get desired results. Please suggest me a solution, I will be very thankful to you friends. Friends today I have proceeded with given problem as follows: I want to locate a watch tower to monitor forest fire:---- 1) First Criteria: Distance From Roads and Drainage ( 200 meter and 500 meter Buffer respectively), and Intersect them to find suitable areas . 2) Then I have made slope file from SRTM DEM and taken less then 6 degree as criteria (using Raster Calulator) , and I got almost 85 % study area comes under this range. DEM ranges from 400 to 763 for my study area, and using Raster Calculater I got new layer with elevation > 500 (ROUGHLY). And Converted both slope layer and DEM to polygon. 3) ROAD_DRAINAGE_BUFFER is now INTERSECTED with SLOPE_DEM Layer. And I got fewer Polygons, but Still many. Now if I am trying to get Viewshed at highest possible point , then again viewshed from this point, is not giving me maximum visible area. Still I am getting big area to analyse. How to get reduce my area. Still a problem. I don't want to make you uncomfortable , asking same problem. Please If you still give some clues, I will be thankful. Thank You Friends.,....for giving most precious .thing......(TIME)........


String comparison expression failing in Mapserver when including fieldname

Within classes I'm able to match strings using CLASSITEM, but not when including the field name in the expression, for example (inside a layer declaration):               CLASSITEM "myfieldname"     CLASS         EXPRESSION "sometext"     END      Works fine, but               CLASS         EXPRESSION ([myfieldname] = "sometext")     END      Doesn't return any data The second method is fine when working with integers, e.g.               CLASS         EXPRESSION ([myintegerfieldname] = 10)     END      I've tried enclosing the strings with single quotes, double quotes, using a regex instead. The same behaviour occurs when the source data is a shapefile or a postgis layer. Using CLASSITEM is obviously a good work-around, but it would be useful to know what I'm doing wrong with the direct comparison. Thanks!


How to use ITransform2D on dimension features (arcobjects)

I am trying to move a dimension feature inside a personal geodatabase using ArcObjects VBA. I was able to move other types of features using similar code as shown below. However it is not working for dimension features. Can someone help me on this?               Sub AdjustDimensionFeature()     Dim pMxDoc As IMxDocument     Set pMxDoc = ThisDocument          Dim pmap As IMap     Set pmap = pMxDoc.FocusMap          Dim pFtrLyr As IFeatureLayer     Set pFtrLyr = pmap.Layer(0)          Dim pFC As IFeatureClass     Set pFC = pFtrLyr.FeatureClass          Dim pFtr As IFeature     Set pFtr = pFC.GetFeature(8362)          Dim pTransform2D As ITransform2D     Dim pPolygon As IPolygon     Set pPolygon = pFtr.ShapeCopy          Set pTransform2D = pPolygon          pTransform2D.Move 20, 20          Set pFtr.Shape = pPolygon          pFtr.Store          End Sub


OpenLayers controls keyboard shortcuts

I'd like to hook up keyboard shortcuts to my map controls e.g. holding down 'z' will activate the zoombox tool etc. I can't seen anything relevent in the API for doing this. Is it easily done? My controls are sat beneath dojo toggle buttons and menu items like so:               // zoom tool     zoomBoxTool = new OpenLayers.Control.ZoomBox();     map.addControl(zoomBoxTool);          // zoom button     var zoomBoxButton = new dijit.form.ToggleButton({         label : "Zoom",         iconClass: "zoomIcon",         showLabel : false,         onChange : function(val) {             toggleTool(val, zoomBoxTool, this)         }     });


ERDAS 2011 and OpenOffice

Is it possible to connect ERDAS 2011 with tools of OpenOffice instead of Office tools? I need to send a map composition made in ERDAS to Presentation of OpenOffice. I don't have Word or Power Point and I don't want to install it. I use OpenOffice. Or is there other any way to send/export my map composition from ERDAS to OpenOffice. I sent my map to JPEG, it works but resolution is bad to print it out and even to have it as the image in jpeg. Thanks a lot.


C# library for bounds based geometry search

I am searching for C# library which has code that builds spatial index in memory based on geometry bounds and enables fast searching for all geometry inside given bounds. I prefer free library.


Dissolve or unsplit lines on common attributes in PostGIS or GRASS?

I have a road centerline shapefile that has roads split at every intersection. However, I would like to join LINESTRINGs that have a common set of attributes into a single LINESTRING. So long as the name, speed limit, etc, do not change, I want to merge them together. This is for eventual conflation into OpenStreetMap. Esri's ArcGIS for Desktop software seems to allow this with the Dissolve command and the UNSPLIT_LINES option. I also found a Dissolve command in QGIS but it seems to only work on polygons and single fields. Assuming nothing exists for QGIS, does anyone know how to do it in PostGIS or GRASS?


Best practices for multiple admins on ArcGIS Server and IIS

What are best practices for having multiple Administrators of ArcGIS Server? I ask in terms of one admin starting and stopping services while another admin is deleting/creating/stopping different services and other similar situations? If best, line out scenarios to avoid and best practices. Thanks.


How do I use DynamicCacheLayerManager in ArcEngine to connect to a previously created cache

I am trying to load a cacheDataset that was created using the MapCookerClass as shown in the Multithreaded MapCruncher example at the URL below. In arcMap it is possible to connect/add this cache using the Add Data dialog. The ArcEngine Add Data dialog does not seem to support this structure so I am trying to do it programmatically. Does anyone have a working workflow/sample that I could go on? I've started in many directions, all of which are wrong. A similiar post mentions that this is possible, but not how. Similiar post How to connect to bundle files? Mapcruncher sample: http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Sample_Multithreaded_MapCruncher/000100000mmm000000/


Making Labels Scale Correctly

I asked a question before about whether it was possible to scale labels and I was correctly pointed to the IAnnotateLayerTransformationProperties.ReferenceScale property. What would like to know now is: does anyone have pointers on the correct algorithm to use to calculate that number (the reference scale) and the font size in order to best match the bounds of your layer and map? (I want to automate the labeling process as much as possible without asking the user questions that they probably can't answer (like me now.))


Openlayers ajax loading works on FF but doesn't work on Chrome. Any idea why?

I'm using this ajax loading panel http://thisiscontext.com/tools/jQuery- showLoading And I have the following code :               jQuery('#map').showLoading();      var request = OpenLayers.Request.POST({             url: "service.asmx/DeleteStopPoint",             data: "{'TripId':'" + currentTrip + "','PointId':'" + feature.attributes.PointId + "'}",             async: false,             headers: { "Content-Type": "application/json; charset=utf-8" },             callback: refreshMap         });      jQuery('#map').hideLoading();      what happens is that in FF I do see the loading panel appearing before the request is made and hidden once its over... but in chrome it doesn't happen. it looks like the panel appears and immiedtly disappear (because if I comment out the hideLoading function , it appears AFTER the POST) any idea why ?


Why isn't enabling on the fly projection reflected in raster? QGIS 1.8.0

I have imported a map from the Ordnance Survey Open Data website. It is a 50k Street View raster. I have also created a new shapefile layer in which I have created a polygon overlay for the raster map. I have enabled "On the fly projection" in the Settings menu and also selected OSGB1936 CRS for both layers. However, it is apparent from the co-ordinates displayed at the bottom of the map pane that this CRS is not activated. What do I need to do to apply the desired CRS?


Save a MapControl map to an MXD

I used to know how to do this, but I must have lost the code. I tried this:               IMxdContents mxdcontents = mapControl.Map as IMxdContents;     IMapDocument doc = new MapDocumentClass();     doc.ReplaceContents(mxdcontents);     doc.SaveAs("C:\\test.mxd");       But I got a "data is not ready to complete operation". How can I save my ArcEngine mapcontrol map as an .mxd?


I want to create my own topographic map

I need to create topographic maps for scales between 1:100,000 and 1:500,000. This is due to the fact that the official topographic maps in my country are offered in 5k, 10k, 25k, 50k, 100k and 500k. I really need to have a topographic data for cartographic work in 200k and 300k. I am looking at Maperative, Tilemill and OSM vector data, but would like to know if anyone has any experience or tips with this. Thanks for any replies, Robert


Editor Extension in ArcGIS Engine 10 Application

How can I find the Editor extension in an ArcGIS Engine application (i.e. no access to the IApplication object)? There is an example method at http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#//0001000004nn000000 ...               private void GetEditorExtension(IApplication application)     {         //Find extension by CLSID or ProgId.         UID extensionID = new UIDClass();         extensionID.Value = "esriEditor.Editor";              //{F8842F20-BB23-11D0-802B-0000F8037368}.         IExtension editExtension = application.FindExtensionByCLSID(extensionID);     }      However, IApplication is only available for code that runs directly in ArcMap, not stand-alone apps. If it helps, I'm writing this inside a custom tool, so I also have acces to the HookHelperClass.


Python, shapely library: is it possible to do an affine operation on shape polygon?

I am trying to create a rotated rectangle in lat/lon coordinates. Basically I have the coordinates of the center and rotation angle around the center. Is it possible to do using, shapely or gdal, or something else? thanks


What is the PostGIS function for retrieving buildings by road side?

I want to get information of buildings by the road side only. Assuming that the building table has multi-polygon geometry and the road table has multi- linestring geometry, what would be a pgSQL Query to achieve the goal? Thanks a bunch.


Performance of dataset iterator over a network

I have a copy of the same folder on two (separate) network drives. I'm using a dataset iterator in a model to collect all the paths of files containing `*_road*`. There are a few dozen files in the folder, and a few subfolders as well. Drive #1 is managed by my department, so we all have direct access to it, as far as the IT dept is concerned it does not exist (though it does bother them). Drive #2 is the main drive where everybody puts their work and is strictly controlled by IT. When I run the the model on the folder on Drive #1, it appears to be executing nothing for ten minutes (just shows the processing dialog) and only the iterator appears to be executing once. It then speeds through the rest of the execution, collects the values and gives me the result. It's a bit weird, but it's fine as it gives me my result. Running the model on Drive #2 gives very inconsistent results. At first, I had my file extensions limited to CAD only, but that crashed ArcCatalog after hanging for 15 minutes. I then took all the restrictions off, even my wildcard, so I could just get a multivalue of all the files in the folder. I ran the model in this form 4 times (twice in the morning, when few people are here, once at midday and once in the afternoon). The results were inconsistent. Twice it simply crashed after 15 minutes, and twice it hung for 10 minutes, iterated through the folder but did not advance to `Collect Values` so it just ended the execution. What I would like to know is: _Is going through the security on Drive #2 would be enough to impact the performance of the (basic) model, as I'm assuming for each iteration it would have to get through it?_ Update: I've now created a small folder containing 4 CAD files, and a subfolder with 1 CAD file on my C drive. I then restricted the iterator to only look at CAD files as that is what my final model will have to do. To my surprise, it ran for about a minute, then ending the execution without collecting values, as if it didn't find the CAD files (which are the only files in the folder). When I run it without the restriction of only CAD files, it finds them. This seems to be a separate issue now.


QGIS CSV file sorts low numbers as high

So I have numbers that range from 5 to above 50, and when I sort these from least to greatest, the numbers less than 10 are treated as higher than anything else. It also does the same when I try to symbolize by category, and treats the less than 10 numbers as higher than the actual higher integers. I am a total noob an have no idea what I am doing in QGIS or how to begin to solve this problem. Thanks for reading.


Restricting dataset types does not work correctly in a dataset iterator

I need to obtain a list of all the CAD drawings within a specified folder (and subfolders). I initially tried using a `Files Iterator` in ModelBuilder, but when I specified the extension, it prompted me to use the `Dataset Iterator` as the CAD extensions are recognised datasets. After creating a test folder of four CAD files and a subfolder with one CAD file, I ran the model with a `Collect Value` to get the list of the full pathname for each file. ![enter image description here](http://i.stack.imgur.com/KuVkj.png) It ran for about a minute before "completing" the model without advancing to collect the values. As I had restricted the dataset type, this meant that it did not find any CAD files. I then removed the restriction and ran it again. This time it quickly returned the CAD files. I then restricted the dataset type to `FEATURE`. It returned a list of the CAD files, when it should not have returned anything. Does the dataset iterator not recognise CAD files properly (whereas the files iterator does, and therefore does not allow me to use it)?


Why is Field Calculator Returning NULL for $x and $y?

I am trying to include XY coordinates in the attribute tables of several of my vector files. I have tried two methods; first I used $x and $y in the field calculator (which I've used before and worked well). When this returned NULL, I tried saving the file as a .CSV and using the methods described in this post: http://gis.stackexchange.com/a/8846/19798 (top answer describes using "GEOMETRY=AS_XY" in the 'save as' window). Neither of these methods are working; they aren't returning errors, they just aren't returning values. I have tried re-importing my shapefiles, I have changed the CRS they occupy to try and force QGIS to recognize the location with no luck. I'm using Windows 7, QGIS 1.8.0 Lisboa. Any help would be appreciated.


How to move all elements of PageLayout to left (right, right, up, down..) 5 cm (C#) ?

Are there anyone know how to move all element (text, line,) of a PageLayout (in GraphicsContainer) to left (or right, up...) 5 cm using C# ? Thank you very much !


Open source tool to view DTED and DEM raster-data

I am new to GIS field. Is there any open source GIS tool to view DTED and DEM tiff-files? **Update 1** I have some DTED files and DEM files. I want to open and see those files using some open source GIS tools. Can I use MapWindow GIS or QGIS for this? Are there any other tools available? Please advise.


Surveying software with geocoding abilities

My company is a market research firm looking for an integrated surveying software that has the potential to geocode on-the-fly via tablet device. Requirements:   -Ability to collect rider questionnaire-type surveys on several bus routes   -Also a map feature that allows us to record several origin and destination points for each survey   -The map feature must be searchable (i.e. by intersections, addresses, or major place names)   -Ability to turn on/off layers in the map (bus routes for reference)   -Ability to work offline (optional, but preferred)


Error when importing vector layer into GRASS

I am trying to import a vector layer into GRASS, but I keep receiving the same error. The values in the vector layer are important because I would like to use them to create a heatmap. What could I be doing wrong? Yesterday I managed to import the layer into GRASS, but it had discarded all the values. ![The error message received when trying to import a vector layer into GRASS](http://i.stack.imgur.com/LXVkP.jpg)


When to store geometries using SQL-server geometry datatypes or ArcSDE?

With the release of SQL Server 2008 Microsoft added geometry data types. So geometries can now in an ESRI enviroment be either be stored using SQL-Server datatypes or ArcSDE datatypes. A colleague of mine asked today when should we choose one product over the other? We already have business databases in SQL-Server and in ArcSDE, if we need to create a new database, what options do we have? Are there any advantages/disadvantages to storing data in one way or other? **Refrased, Old Question is here:** " _With the release of SQL Server 2008 Microsoft added geometry data types. So geometries can now either be stored in SQL-Server or ArcSDE. A colleague of mine asked today when should we choose one product over the other? We already have business databases in SQL-Server and in ArcSDE, if we need to store a new polyline, is there any reason to promote one place over the other?_ "


Export 3D Shapefile Polygon to DWG as Polygon

I am looking for a way to export my 3D polygon shapefile to a .DWG polygon. I have used the Conversion Tools - Export to CAD tool in ArcToolbox, but it will only export the polygon to line features. Is there a setting or option that I am missing that will export as a polygon? Thanks...


Network Analyst does not analyses my own created roundabouts in geofabrik shp file

I am trying to digitized the shape file data (attached) that i downloaded from geofabrik, to new roads in my region. The network anaylst does not work beyond rounds abouts, that I create new ones. It solves the route till round about see pic 1, but beoyond that it fails. and gives me error. Warning: No route from location "Graphic Pick 1" to location "Graphic Pick 2". Error: No solution found. ![when it works](http://i.stack.imgur.com/qHc7j.png) ![when it gives error](http://i.stack.imgur.com/7yYuO.png) ![Roundabout in editor mode](http://i.stack.imgur.com/SxjYk.png) then i removed the round about from same position, it work, so something wrong with round about, can anybody help. ![roundabout removed](http://i.stack.imgur.com/UnTfV.png)


OpenLayers 3: Refreshing OSM layer upon resolution change

Upon changing the resolution of my Map's view with `View.setResolution`(API doc), the map zooms as expected, but the OSM layer which is included in the Map does not refresh the tiles according to the new resolution level. Manually (e.g. with the mouse wheel) zoomin in and out once shows the OSM layer as expected. How can I tell the map (or the OSM layer) to refresh? I already tried to `dispatchChangeEvent()` on the OSM layer but it did not change anything.


Cost Path: multiple pairs of sources and destinations

I have seen many questions related to this problem but very few answers. I am very new to scripting and using ModelBuilder, but I am trying to calculate the cost path for 200 polygons with a single source and a single destination for each polygon. So far, I have successfully calculated the Cost Distance and Backlink for all these polygons and their respective source, but now I would like to select the right destination, cost distance and backlink to calculate the cost path for each polygon. All three inputs needed for Cost Path should therefore have the same number incorporated in their name related to the polygon they belong to (eg: Desti_001, CostDis_001, Backl_001) and use these three inputs to calculate cost path. My questions are: - how do I select these three inputs based on the number is their names? - how do I create a loop to calculate the cost path of all polygons? I use ArcGIS 10.1


Georeferencing window won't open QGIS 2.4

I had the georeferencer window open in QGIS 2.4 while project was running, I accidentally closed the Qgs document with the georeferencing window open (worked absolutely fine till then). When I opened QGIS again and clicked the georeferencing plugin, the window doesn't open. I tried closing and opening the Qgs doc, deleting temp files, opening QGIS 2.2, restarting computer, but the problem persists. I don't see any error logs in QGIS when I try to open the window. Any help or possible error checklist is welcomed. **Update** I've tried a quick re-install of QGIS 2.4, still no luck. looks like a complete purge is needed. **Update 2** I created a new user on my computer, it already has QGIS installed, and the georeferencer plugin works fine.


How to recreate the 'standard deviation' option for a raster layer in Mapserver?

In mapserver is there any way to recreate the 'standard deviation' option available in Arc's symbology for a stretched raster layer?


Does France have addressing products similar to British AddressBase?

In Britain people can license the Ordnance Survey's AddressBase product, which provides a list of almost all the country's addresses, with good building location accuracy even for remote country buildings. This is obviously useful for address suggestion and geocoding applications! Like all geodata products it's got some errors and omissions, but it's generally good (if expensive to license) I'd like to broaden my horizon beyond just the UK. What's the best data available for France, and how good is it?


Joining nearest neighbor small polygons using R

The figure shows a plot of numerous polygons (zoom in) made from a raster file by               require(sp)     require(raster)     pol100 <- rasterToPolygons(r, fun=function(x){x==1}, dissolve=FALSE)      There polygon has 2059 features               > pol100     class       : SpatialPolygonsDataFrame      nfeatures   : 2059      extent      : 254358.6, 268808.1, 2619318, 2642087  (xmin, xmax, ymin, ymax)     coord. ref. : +proj=utm +zone=46 +datum=WGS84 +units=m +no_defs      nvariables  : 1     names       : value      min values  :   1      max values  :   1       Each of the small polygons can be explored/plotted individually               #if want to plot a particular polygon     plot(pol100[[1]][[500]])     #if want to know the area of a particular polygon (say polygon#100)     #(all polygons are in fact of same size)     pol100@polygons[[100]]@area      I want to know if there is any automated way to merge the nearest neighbor polygons? Looking at the figure tells that the process will create approximately 15-20 large polygons, for instance. Thanks in advance.


How to make a shortest path code in mapbasic?

I have a column table that consist of 2 points (from / to), i wanted to have a dialog box that will show all possible path from source to destination from a list box and show the shortest path with length value on a different text box. Any one have tried to code this. Thanks!


Visualizing information when click in polygon - Spatial join

I am new to cartodb, right now I am trying to do something similar to the cartodb tutorial: Create your first map with CartoDB.js, but with polygons using my own map. For example: I did a spatial join with two tables, one has the coordinates and the other one the polygons, once I do the spatial join, three or two polygons appear in the screen of the map, one of them containing 10 rows from the table and the other 20 rows. I want to visualize the count based on this after I click the polygon. I was wondering if you could help me with some information or tutorial to be able to visualize it? Thanks a lot. Best regards, Walter


How to visualize Map/matching result in QGIS 2.0?

I want to visualize this map-matching results in QGIS 2.0. http://download.osgeo.org/pgrouting/forum/pgrouting.postlbs.org/browser/trunk/core/sql/matching.html I load my network in QGIS 2.0 and I want to visualize the output of matching_line_as_linestring.sql.


What PostGIS [topology] provided tools may be used for data quality assurance?

I'm learning about techniques to ensure GIS data quality. Googling around, I've found a few papers about theory and best practices (here and here), and a couple of short presentations about the topic using ESRI tools (here and here) For example, the concepts of "tolerance" and "precision" are globally defined in ArcGIS (I didn't know it), and I think Oracle globally manages the concept of "tolerance" too. On the other hand, as far as I know, PostGIS doesn't expose the user-defined precision model supported by GEOS, and simply uses the full precision of floating point numbers. So, my question is: what PostGIS [topology] provided tools may be used for data quality assurance? Has anyone experience with this topic? Or maybe I'm just selecting the wrong tool for this. Anyway, many thanks in advance.


Shortest distance from polygon centroids to a line in QGIS

To get the distance of each polygon centroid from a line, I have tried the `Distance to nearest hub` algorithm from the `Processing Toolbox`. The distances I got from the algorithm did not seem correct, upon checking manually. I later tried the `v.distance` GRASS command from within the Toolbox with the following settings: ![v.distance settings](http://i.stack.imgur.com/FbQkf.png) It could be that I am not specifying the options correctly - for example, my "To" layer is a line and I have set the "Column where values specified by ' upload'..." to the "Descriptio" field. If this means that the calculated distances will be uploaded into the field then it could be the source of the issue. However, there is no option to create a new field to hold the distances (besides, a new layer is anyways created so I dont quite understand this setting). Nevertheless, running this command gives an error and QGIS stops working: ![v.distance error](http://i.stack.imgur.com/YFAD0.png) I dont know what the error is referring to. Is there some other plugin/algorithm that I can use? Alternatively, what are the correct settings for `Distance to nearest hub` and `v.distance`? I would like to achieve this entirely within QGIS, but am open to using R as well. PS: I am running the latest version of QGIS (2.4 Chugiak) on Win 7 x64. I have already referred to the following questions on GIS SE: Shortest distance from point to line (big dataset) Measuring the distance between lines and points in QGIS **UPDATE:** I could not get this to work from within QGIS despite trying several permutations of the GRASS `v.distance` settings. I finally used the `gDistance` function from the `rgeos` R package to obtain the result. However, while I have solved my problem for now, I would still like to know if one can do this is QGIS.


Why does GeoServer/OpenLayers show only points from my PostGIS?

I am reading the PostGIS in Action book now and I have a problem with one example:   * I have created a table: CREATE TABLE my_geometries (id serial NOT NULL PRIMARY KEY, name varchar(20));   * I have added some points to this table:  SELECT AddGeometryColumn('public','my_geometries', 'my_points',-1,'POINT',2); INSERT INTO my_geometries (name,my_points) VALUES ('Home',ST_GeomFromText('POINT(0 0)')); INSERT INTO my_geometries (name,my_points) VALUES ('Pizza 1',ST_GeomFromText('POINT(1 1)')) ;   * And some linestrings as well: SELECT AddGeometryColumn ('public','my_geometries', 'my_linestrings',-1,'LINESTRING',2); INSERT INTO my_geometries (name,my_linestrings) VALUES ('Linestring Open', ST_GeomFromText('LINESTRING(0 0,1 1,1 -1)')); INSERT INTO my_geometries (name,my_linestrings) VALUES ('Linestring Closed', ST_GeomFromText('LINESTRING(0 0,1 1,1 -1, 0 0)')); The problem is that for some reason I do not see the linestrings in the OpenLayers window of GeoServer, but all the points are on their place. The GeoServer's 'Edit layer' page for my_workspace:my_geometries shows Feature Type Details having both my_points and my_linestrings columns. What is the problem here? How can I see both points and linestrings that I have added to my database in GeoServer's OpenLayers window?


Setting parameters in Script Tool using Python

I hate to bug you all with the same problem over and over again but I run into a new problem everytime I make a slight change to the code. All I did to the code below was to replace field names to match the original feature class. Now it doesn't work. It gave me `<type 'exceptions.RuntimeError'>: ERROR 999999: Error executing function. Failed to execute (Script).` I tried adding Try/Except to the code which didn't give me any error messages but didn't give me any results either. I'm not sure what's going on? Any help to figure this out will be very much appreciated. Thanks Sam               import arcpy, os     Try:     roadpath = arcpy.GetParameterAsText(0)     tablepath = arcpy.GetParameterAsText(1)          datapath = os.path.split(tablepath)[0]     tablename = os.path.split(tablepath)[1]     rows = arcpy.SearchCursor(roadpath,"FROMLEFT <> 0 AND TOLEFT <> 0","","STREET_NAME_ID;FROMLEFT;TOLEFT","STREET_NAME_ID A;FROMLEFT A;TOLEFT A")     arcpy.env.workspace = datapath          if arcpy.Exists(tablename):         arcpy.DeleteRows_management(tablename)     else:         arcpy.CreateTable_management(datapath,tablename,roadpath)         arcpy.DeleteField_management(tablename,"SHAPE_Length")          irows = arcpy.InsertCursor(tablename)     first = True     for row in rows:         if first:             first = False         else:             GISID = row.GIS_ID             stid = row.STREET_NAME_ID             fl = row.FROMLEFT             tl = row.TOLEFT             if stid == prev_stid and fl <= prev_tl:                 irow = irows.newRow()                 irow.GIS_ID = prev_GISID                 irow.STREET_NAME_ID = prev_stid                 irow.FROMLEFT = prev_fl                 irow.TOLEFT = prev_tl                 irows.insertRow(irow)                 del irow                 irow = irows.newRow()                 irow.GIS_ID = GISID                 irow.STREET_NAME_ID = stid                 irow.FROMLEFT = fl                 irow.TOLEFT = tl                 irows.insertRow(irow)                 del irow         prev_GISID = row.GIS_ID         prev_stid = row.STREET_NAME_ID         prev_fl = row.FROMLEFT         prev_tl = row.TOLEFT     del rows, irows     except:     print arcpy.GetMessages()


What Geotransformation (NAD27 to WGS84) should I use for Gulf of Mexico?

![enter image description here](http://i.stack.imgur.com/xqbRI.png) I'm working with datasets that are spread out across the northern part of the Gulf of Mexico, stored in NAD 27. I've been told the polygons shown above were obtained from BOEMRE (formerly known as MMS). I'm projecting it into Web Mercator (WGS 84), and would like to choose the most suitable geotransformation. Arcmap presents a long list of choices, but I'm not sure which one would be the overall best fit. Is there a map somewhere showing how the error varies for various geotransformations? Better yet, is there an industry standard geotransformation for GoM whose parameters I could plug into a custom geotransformation?


Optimal placement of a shape on a polygon layer based on an attribute

I am using ArcGIS and I have a layer of polygons that has an attribute. I would like to overlay a circle (or other shapes in theory) of a specified size such that it would encompass the maximum amount of the attribute from the polygons. For example, placing a circle with a diameter of 5 miles over census tracts (that have a population density attribute) so that the circle will encompass the maximum population possible. I understand that preferably the shape I'm overlaying will be large enough not to get stuck in the middle of a single polygon. I also realize that calculating a maximizing function might not be entirely straightforward as there will be partial overlaps. I imagine that there is something already out there that does this but I'm not having any luck with searching. I don't know what this sort of analysis would be called either so that doesn't help. If ArcGIS isn't the appropriate tool for this I'm open to other suggestions. Thanks in advance for any help you can provide!


How to apply bounding box filter in leaflet WMS?

There is a working example in leaflet site for adding WMS Layer in leaflet map at : http://leafletjs.com/reference.html#tilelayer-wms. But I don't see methods to provide the filter for bounding box. Is there a way to provide bounding box filters for Leaflet WMS ?


Annotation doesn't update when features are inserted via FME

What I'm trying to accomplish is take two Feature Classes - one the current FC, the second with updated data. I want to merge the changes into the original FC so its updated. I want to update vs. completely replace the original FC because updating preserves the annotation I have placed. I have been able to get FME to update a Feature Class in a File Geodatabase with the ChangeDetector transformer just fine, and it places a new annotation for updated/new features. However, it doesn't follow the label expression that is set. For example, I have a few multi line expressions set, but only the part of the expression before "vbnewline" is populating in the annotation. Using a versioned geodatabase is not an option for this application. The editing behaviors have been set in ArcCatalog under the annotation tab on the annotation feature to the following: -Create annotation when new features are added. -Update annotation when feature's shape is modified. If I manually add a new feature to the original feature class in ArcMap, the annotation generates automatically as expected. I can also go in and manually create new annotation for the features modified or inserted via FME and the annotation generates as expected. Its only appears to be happening when FME does the leg work. I am running the latest version of FME (2013 SP1), as well as ArcMap 10.0 SP2 at the ArcInfo level.


GDAL does not ignore NoData value

I am trying to calcualate the statistics of a TIFF. The script should ignore the NoData value, but doesn't. What causes this?               import gdal     from gdalconst import *          # register all of the drivers     gdal.AllRegister()          # open the image     ds = gdal.Open('test_slope.tif', GA_ReadOnly)          # get raster band 1     band = ds.GetRasterBand(1)          # set NoData value     band.SetNoDataValue(-3.4028230607371e+38)          # Calculate and print Statistics     stats = band.GetStatistics(0,1)     print stats      The results look like this               >>>      [-3.4028230607371e+38, 126.5991897583, -4.6432918375055e+37, 1.1680875238428e+38]     >>>


number of arcgis server users for CAL-based backends

The licenses for our organization's MS SQL and ArcGIS Server are such: MS SQL: CAL ArcGIS Server: enterprise Are the number of users that can be served still limited to the number of CALs present in MS SQL? Thanks!


export WebMap in a different projection than the WebApi

I am quite new to the Flex WebApi world. I am using the Flex WebApi and have set up map templates to print maps out to my own template as a PDF. In my template I have the Map grid set. When I eport the WebMap it is displayed in Web Mercator Auxilliary Sphere as it is the set coordinate system in the WebApi (using BingMaps). Does anybody know a way to export this WebMap in a different coordinate system , so that my mapgrid on my map is displayed in the right projection??? Please ask if you have any more questions as I am really struggling with it. People in my company are using GDA94 and when they print a map they also want to have these coordinates displayed on their PDF map and not the Web Mercator coordinates. Cheers Bart


Counting and Storing Event Data Contained Within a Polygon (Using Python)

I have a fairly large project and I would like to automate some tasks using Python. Problem is, I don’t have any experience with Python for ArcGIS. And I rarely use ArcGIS until something big like this comes up, and usually I am under some time constraint (smh) I am looking for some guidance (such as python syntax to use, methodology, etc.) to help me achieve the following, using the screenshots as a reference…   1. The red dots denote multiple events that overlap each other (contain multiple records) that fall within the polygon buffer points (labeled A and B, respectively): ![Screenshot 1](http://i.stack.imgur.com/Sy5h5.png)   2. The events are part of a shapefile specific to a road corridor, so that each corridor shapefile may contain several event points, representing motor vehicle crashes at an intersection. Each event contains a field “YEAR” that has either 2007, 2008, 2009, or 2010 in the field.: ![enter image description here](http://i.stack.imgur.com/KpqfL.png)   3. The polygon buffer shapefiles have a separate field for each year listed above. Most corridors have about 6-10 rows, representing checkpoints along the corridor. ![enter image description here](http://i.stack.imgur.com/HZ5BT.png) * * * What I wish to accomplish is to:   1. Count all the events that fall within in the polygon points.   2. Populate the polygon fields for each year with the corresponding counts of the “YEAR” field in the event shapefiles to the “CNT_20XX” fields in the polygon shapefiles   3. Example: Polygon A has a total of 10 events within it. The counts for each year are 2007= 3, 2008= 1, 2009= 2, 2010= 4; so the Polygon for point A would have its corresponding “CNT_20XX” fields populated with the sum of the counts for each year in the events shapefile. So...can this be accomplished in python? Is there a non-python way to accomplish the same thing? I have 16 corridors, and so the idea of having to do these without some assistance from a python script seems inane **and** insane. At this point I would just be happy with some advice, let alone a actual solution. Many thanks in advance!


ArcGIS: applying different formulae based on a raster's VALUE field

(using ArcInfo 10.0 sp3) As part of the creation of a cost-map for a cost- distance analysis, I need to create map _A_ that is based on the following on two formulae, where S stands for slope in degrees:   1. `20.9 tan(S)^2 + 4.18 tan(S) + 1.38` (-60 < S < -6)   2. `52.1 x 103 tan(S)^2 + 10.4 tan(S) + 2.65` (-6 < S < 60) In other words, for every VALUE between -60 and -6, `1` should be run, for every VALUE between -6 and 60, `2` should be run, resulting in one, combined map. I have a slope map ready. What I do not know, is how to translate this if/then statement to the Model Builder. My knowledge of Python is almost zero, so I sadly do not possess the skill to adjust the similar-but-different Python scripts which I found by search. Any ideas? Thanks in advance.


How to select and export points interactively by drawing polygons?

Does anyone know how to select a large number of addresses by basically highlighting areas on a GIS map you need names & addresses for and exporting them onto a spreadsheet?? Maybe there's no such thing but it'd sure be nice to know!


Historical US zip code allocations and locations?

**Is there a data source available that has the full history _(right back to the 1960's)_ of each US zip code?** By history I mean, for each zip code:   * the date it was created, if later than 1 July 1963,   * the date it ceased to exist, if it no longer exists   * any splits/merges/swaps/renumbering of any part of the zip code, and the date it happened   * the named places (primary and alternate) for the zip code (or any other way to locate it), and the dates of any changes Even better (for GIS) if it has:   * the center point (geographic or population) of the zip code, _on a given date or range of dates_   * the pseudo “boundary” of the zip code (or closely related polygons like ZCTAs, in recent years), again for a specific date or period. The project I'm working on is attaching locations to historical data from **the 1960's, 70's and 80's** (and beyond), where the locations are identified by the zip code _as it existed at the time_. In most cases, these are are same as today, but especially in faster-growing states it can be wrong to assume that a zip code covers the same area 20-50 years later, and there have been many other changes including renumbering. Knowing the extent of each zip code decades ago is also useful for long- running social and medical studies, where a zip code (from the period) is often the only geographic identifier available (despite being unsuitable for this purpose). I've researched this for a while and believe I can reconstruct a large part of the history from primary sources I've located. I think that it would be useful to many others, and I'd release the results as open data. But it's a sizable task, I don't want to reinvent the wheel. There are some commercial sources that might go back to the 1990's, but my main interest is the earlier period, and I want the results to be open data that I can share, so they're unlikely to be suitable or have the right license. **So, does a history of every US zip code (from the 1960's on, not just recent years), ideally with geographic co-ordinates, already exist, in a form that can be re-used?**


How to get the altitude of the vector shapes from DTM raster layer?

I have a vector layer containing thousands of vector shapes/polygons and a raster layer with DTM. Every shape has its own OBJECTID in attribute table. I would like to get the altitude of every shape, weighted mean of the altitude would be the best. I suppose there should be used a script or something similar to count weighted mean of altitude of all pixels inside the polygon. I use Qgis 1.7.3. Thanks in advance.


ArcScene 2D export

I'm submitting a paper to PlosOne, and have been using ArcScene to produce my 3D mapping. However, I'm struggling to comprehend quite how to meet their image requirements (http://www.plosone.org/static/figureSpecifications#resolution) They require images to be between 300-600ppi and 6.83 inches wide in Tiff format. I just cant get my head around what settings I need to use to set the Resolution, Width, Height and view size parameters within the 2D export option. Any suggestions? It cant just be me who has these issues, with ArcScenes 2D export issues but have had little luck searching through previous questions! Many thanks


What Xubuntu release is OSGeo-Live based on

Does anyone know where to find a list of parent Xubuntu releases for each OSGeo-Live version, and where there is a roadmap for future releases? I was able to find this out for OSGeo-Live 7.0 only by running it and querying the release from the command line:               user@osgeolive:~ $ lsb_release -a     No LSB modules are available.     Distributor ID: Ubuntu     Description:    Ubuntu 12.04.3 LTS     Release:        12.04     Codename:       precise      Since OSGeo-Live 7.0 is less than one year old, I assume that the older version of Xubuntu means that as a rule the project only bases on LTSes. I'm asking because I'm considering when and whether to upgrade, and I wouldn't want to do so until OSGeo-Live is based on Xubuntu 14.04.


how to remove the color formed on the edge of satellite image?

my AOI requires two scene of satellite image but when I try to mosaic the images using ERDAS imagine, the color of the edge is seen forming black line after mosaic! so please how can I remove the image edge color?


Why GeoServer is blocked during restarting when its GWC had seeded a large quantity of cahce file(PNG)

There are a large quantity of layers have been published in our GeoServer, considering the performance, we have seeded the cache PNG files for these layers using GWC, but right now we restart GeoServer, it is always blocked at the moment of code '[storage.DefaultStorageFinder] - _*_ Found Java Environment GEOSERVER_DATA_DIR set to PATH , using it as the default profix'. I am not sure if this is blocked or that It needs a long time to take to complete some tasks during restarting.


Open source solutions for Landsat-8 mosaicing and correction?

I am familiar with the major commercial remote sensing packages (ENVI, IDRISI ERDAS, etc), but I haven't previously had the opportunity to utilize open- source solutions. I have a several new Landsat-8 images that I would like to mosaic for both simple display and analysis (land cover classification). Is there a go-to open source software for this, or are there many options? A tutorial would also be excellent.


Should We Be Using a GIS?

I'm actually a graphic designer - the manufacturing company I work for wants to develop a map with layers for Regional Sales Managers territories, Internal Sales Associates territories, Local Rep territories - each with accompanying contact info. Our product is essentially specialized plumbing products, so we'd like a map layer displaying plumbing code territories, and another layer for Authorities Having Jurisdiction (the people responsible for determining plumbing codes, reviewing/planning projects). So there's going to be a several layers describing territories, likely a few layers with point locations, and a fair amount of related contact information, plumbing codes, etc. I'm also working on setting up some interactive web pages which will feed information into a database for easy retrieval of select info for customers visiting our website and/or integration into the maps we develop. We're trying to figure out which mapping software and DBMS to use. My supervisor started up a trial run using ArcGIS a few months ago, and I've been fooling around with MySQL for a database, which I have up and running (albeit a very simple test version). I've been looking at some other online mapping programs like Geometrx, eSpatial, build-a-map - not true GIS. I also fooled around with QGIS a bit, and while its definitely capable of everything we'd like to do, its seems like something geared more for a GIS expert - and doesn't have some of the basemaps readily accessible with ArcGIS like population density, vector based county and city boundary maps - I'm sure they exist, but I'd have to hunt them down/purchase them separately or create them from scratch. So my real questions here are: Are we on the right track if we go with ArcGIS and a MySQL database? Is there a better mapping program to use for our particular needs? Are we better off keeping our database and maps separate, and manually updating one when the other changes? This is essentially a request for consultation! I'm having a hard time finding someone knowledgable within this realm that doesn't have a vested interest in pushing their own particular software solution. If anyone reading this is or wants to be a consultant, or knows one that we should be talking to, please let us know!


CMYK Lines and Fills in QGIS

In QGIS, you can apply CMYK to text, using the CMYK sliders palette. However, I can only find an RGB colour picker for lines and fills. Is there a way to apply CMYK to these elements? Thanks. Sean.


How to change the projection of a UTM-georeferenced raster in Quantum?

I have a project file in Quantum which contains some shapefiles and rasters that are properly georeferenced. However, I have started using GeoTiffs which are in UTM - WGS84 that don't seem to be projecting properly. When I import the GeoTiffs, Quantum reads their X,Y (Eastings, Northings) coordinates like they were lat,lon. How can I convert these X,Y values into lat,lon coordinates? I have set all the layers in the project file to the same coordinate system and I have also enabled on the fly CRS transofrmation to no avail. Thanks for you help!


Why is the plugin list so short?

i have installed QGIS with GRASS and QDAL complete... I followed the instructions for additional QDAL configuration (adding usr/bin to the QDAL path). When i try to "fetch plugins" my list is short and does not include geocoding. I have downloaded a plugin from the main repository but it sits on my desktop undetected by QGIS How do i access these plugins?


Alignment/Projection issue when opening a shapefile in ArcMap that was created from DotSpatial code

I have a number of Polyline and Point features stored in a SQL Server 2012 database. I am using a website with C# and DotSpatial to create and export a shapefile of any one of these features successfully, however when I import the file into ArcMap, the points are mis-projected onto the map (they are all about 6.6 miles to the northwest of where they should be, to be exact). I have checked some of the individual points by converting them to lat/lon, and they are exactly what they should be. I've checked the shapefile's projection information (NAD83 State Plane Oklahoma North feet), and it looks good:               PROJCS["NAD_1983_StatePlane_Oklahoma_North_FIPS_3501_Feet",     GEOGCS["GCS_North_American_1983",     DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],     PRIMEM["Greenwich",0.0],     UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],     PARAMETER["False_Easting",1968500.0],PARAMETER["False_Northing",0.0],     PARAMETER["Central_Meridian",-98.0],     PARAMETER["Standard_Parallel_1",35.56666666666667],     PARAMETER["Standard_Parallel_2",36.76666666666667],     PARAMETER["Latitude_Of_Origin",35.0],UNIT["Foot_US",0.3048006096012192]]      I have a different shapefile of the same points that was created using a different third-party tool that is displaying in ArcMap correctly. I've checked the projection information for both files and they both have the above projection information. Any ideas as to why they aren't projecting right in ArcMap? It seems like the projection may just not be working at all, and not have to do with the specific State Plane coordinate system, because when I use WGS 84 I still have the same problem. Here is the C# code I use for exporting the shapefile. Thanks!               var featureSet = new FeatureSet(FeatureType.Point);     var dt = _dataAccessLayer.GetTableByFeature(shapeFileName);          // Copy all of the columns from the database table to the feature set     for (int colIdx = 0; colIdx < dt.Columns.Count; colIdx++)     {         var col = dt.Columns[colIdx];         featureSet.DataTable.Columns.Add(new DataColumn(col.ColumnName,              col.DataType));     }          int rowIndex = 0;     foreach (DataRow row in dt.Rows)     {         // Convert the projection from Spherical Mercator to          //   NAD1983 State Plane Oklahoma North (feet)         var vertices = new double[2];         vertices[0] = Convert.ToDouble(row[COL_X_COORD]);         vertices[1] = Convert.ToDouble(row[COL_Y_COORD]);         var z = new double[1];              Reproject.ReprojectPoints(vertices, z, KnownCoordinateSystems             .Projected.WorldSpheroid.Mercatorsphere, KnownCoordinateSystems.Projected             .StatePlaneNad1983Feet.NAD1983StatePlaneOklahomaNorthFIPS3501Feet, 0, 1);         featureSet.AddFeature(new Feature(new Coordinate(vertices[0], vertices[1])));              // Add the rest of the attributes to the feature set         for (int colIdx = 0; colIdx < dt.Columns.Count - colOffset; colIdx++)         {             featureSet.DataTable.Rows[rowIndex][colIdx] = row[colIdx + colOffset];         }         rowIndex++;     }          featureSet.Projection = KnownCoordinateSystems.Projected         .StatePlaneNad1983Feet.NAD1983StatePlaneOklahomaNorthFIPS3501Feet;     featureSet.SaveAs(shapefilePath + shapeFileName, true);


Point shapefile is not displaying.

I have created a point shapefile in ArcGIS 10.0 that has a geographic projection, but it will not display/draw. When I view the properties it has no "extent" information. Is this the problem? Thanks in advance!


ArcGIS JS Modular Feature Layers? Possible?

My ultimate goal is a map which can toggle the visibility of layers on an ArcGIS map. However the data I need to use is not available as a feature service, I have to build it programatically from feature collections. I want to make AMD modules that will return FeatureLayers to a script that is in control of the map. I also want the FeatureLayers to contain events. Does anyone have any advice on how to accomplish this? Can I setup the events and map markers without access to the map object? Maybe pass the map object to the FeatureLayer constructor? Any advice is greatly appreciated. EDIT: This is what the code that calls my modules looks like.               require(["dojo/parser", "dojo/_base/array", "dojo/request", "dojox/layout/TableContainer", "dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dijit/layout/AccordionContainer", "esri/map", "esri/layers/FeatureLayer",                  "esri/dijit/Popup", "esri/tasks/query", "dgrid/Grid", "dojo/json", "js/cbibsModule", "dojo/domReady!"],                        function (parser, array, request, TableContainer, BorderContainer, ContentPane, AccordionContainer, map, FeatureLayer, Popup, query, Grid, JSON, cbibsModule) {                     function init(){                         _map = new map("mapDiv", {                           basemap: "oceans",                           center: [-77.0357, 38.7877],                           zoom: 7                         });                         var cbibs = new cbibsModule();                         var fl = cbibs.requestCBIBS(_map);                         console.log(_map);                     }                     dojo.ready(init);                   }                 )      `cbibs.requestCBIBS(_map)` should not only return a Feature Layer object, but should also pass the `_map` variable by reference so the Feature Layer can attach events to it. This is not working. I don't get any errors but the map does not display. **UPDATE: This is my updated code but my markers are still not drawing on the map, nor am I getting any errors. I build the Graphic objects in a module and return them in an array. I then add them to the Graphics Layer and add it to the Map (at least I think that's what's going on). Any suggestions??**                         function (parser, ready, array, request, TableContainer, BorderContainer, ContentPane, AccordionContainer, map, GraphicsLayer, Popup, query, Grid, JSON, cbibsGfxModule, crwoModule) {                 var Map, gfxLayer;                 function init(){                     Map = new map("mapDiv", {                       basemap: "oceans",                       center: [-77.0357, 38.7877],                       zoom: 7                     }),                     dojo.connect(Map, "onLoad", addGraphics);                 };                      function addGraphics(){                     gfxLayer = new esri.layers.GraphicsLayer();                     var gfxContainer = []; // Store array returned by cbibsGfxModule.getAllCurrentReadings()                     var cbibs = new cbibsGfxModule();                     gfxContainer = cbibs.getAllCurrentReadings();                     array.forEach (gfxContainer, function (item, i) {                        gfxLayer.graphics.push(item);                      });                                         Map.addLayer(gfxLayer);                     console.log(Map);                 };               dojo.ready(init);               }


How to generate overlapping polygons from lines output from Table To Ellipse tool?

I have a feature class of line-based ellipses generated by the **Table to Ellipse** tool that looks like this: ![enter image description here](http://i.stack.imgur.com/6PgKe.png)   What I want is polygons of the individual ellipses, however tools like **Feature to Polygon** will create a polygon for every intersection. My solution to this right now is a **Search Cursor** in Python that makes a layer from each line ellipse and then runs the **Feature to Polygon** tool on that layer. This is extremely slow and means I have a feature dataset with hundreds (soon to be thousands) of individual polygon feature classes in it instead of one file. I saw from this question that there is a Python package, _Shapely_, that might run much faster than the arcpy tool in a loop. I can't believe, however, that there isn't some way to do this in ArcGIS. Can anyone think of a better solution?


Buffer in QGIS/R is 650-670 m wide instead of 500 m

I am trying to make a 500 m buffer for my polyline layer. Unexpectedly, I receive buffer varying from 650 to 670 m, depending on location. As many resources recommend to use UTM before making a buffer, I use UTM projection for zone 31N - EPSG:23031 - ED50 / UTM zone 31N (actually, the layer is already provided in this CRS). Whole polyline layer is located in Catalunya (SE Spain). Even the buffers placed near in the very SE of Spain, which is right in the middle of the zone 31N (where no distortion should happen), are 650 m! ![enter image description here](http://i.stack.imgur.com/VF9gC.png) PS: I did this in QGIS and also in my script in R, receiving exactly the same result in both cases. ## EDIT: using QGIS measure line tool (View > Measure > Measure line) ![enter image description here](http://i.stack.imgur.com/Lir9i.jpg)


Migration from ArcSDE (SQL Server) to PostGIS (PostgreSQL)

We've got all the geospatial information of our company within an ArcSDE Database (over SQL Server):   * points (locations of the antennas),    * lines (elevation, rivers),    * polygons (protected areas, houses).  We consume these data with ArcGIS Desktop and with ArcGIS Server. We are planning to migrate all the information to PostGIS (over PostgreSQL), and wonder if there is any documentation/webpage to follow some steps, and some considerations to keep in mind. Is it very hard to export the Data Model? I've been investigating and been doing some tests with GDAL-Python scripts to read from SDE and write into PostGIS, but any experience will be appreciated. By the way, we plan to consume the information from PostGIS with ArcGIS Desktop (along with QGIS) and GeoServer. Thank you very much in advance.


Adding Layer in current session using ARCPY

I wanted to add a layer through the toolbox using arcpy. The below script works fine through the python console in ArcMap, but does not when executed through the toolbox. The layer flashes for a second in the layer management window and disappears. This looks very unlikely and I am not able to figure out how it could not work in the toolbox. Let me know if I had missed something.               import arcpy     mxd = arcpy.mapping.MapDocument("CURRENT")     df = arcpy.mapping.ListDataFrames(mxd, "*")[0]     sourceLayer = arcpy.mapping.Layer('C:/WIP/Shape files/KARTHIK.TEST_TABLE.lyr')     arcpy.mapping.AddLayer(df,sourceLayer,"TOP")     arcpy.RefreshActiveView()


How to upload shapefile to PostGIS using cURL and GeoServer REST API

The GeoServer REST API docs here does not detail how to do this. I'd like to create a PostGIS table and corresponding featureType in GeoServer using the REST API, without having to chain requests. For now I can upload a shapefile to geosever, but not to PostGIS. I can also create a PostGIS data store in a separate request. Unfortunately, its not possible to use an existing PostGIS data store when uploading a new shapefile. Anyone with experience on how to achieve, please assist.


Debugging CalculateField_management ERROR 000623: Invalid value type for parameter field?

I am trying to select records in my table that have certain words in the "Name" field and then code them as 0 (not pharmacy) or 1 (pharmacy) This is just a test searching for two words to select non-pharmacies. I am getting a: > ExecuteError: ERROR 000622: Failed to execute (Calculate Field). Parameters > are not valid. ERROR 000623: Invalid value type for parameter field. I don't know which variable is invalid. Any thoughts? I also do not know if the Calculate Field will work on only the records selected. I cannot get far enough to check that.               # import system modules     import arcpy     import random          # set workspace environment     myWorkspace = arcpy.env.workspace = "C:/PharmacyProtocol/tables"     arcpy.env.overwriteOutput = True          # set variables     out_table = "VT_TRL_DLC.dbf"          # set field variables     fieldList = arcpy.ListFields(out_table)          for field in fieldList:         if field.name == "Name":             nameF = field         elif field.name == "Pharmacy":             pharmF = field          #create list of words that are NOT pharmacies     noPharmWords = ['AMERICAN LEGION','BAR']          expression = 0          #find words in Name field, code Pharmacy as "0" if not already coded     for codeWord in noPharmWords:          #create SQL text clause     fldName = '"Name"'     endClause = "%'"     SQLstr = fldName + " LIKE '%" + codeWord + endClause          #select records from table with codeWord     cursor = arcpy.da.SearchCursor(out_table, ["Name"], SQLstr)          arcpy.CalculateField_management(out_table, pharmF, expression)          del cursor


how to increase request feature speed?

I use Geoserver with Oracle DB. Amount of records in DB is less than 4000, but feature request takes 5-6 seconds. How can I speed up this? P.S. Native JAI is false in my Geoserver **UPDATE:** I have view which joins two tables. int view sdo.geometry is polygon with 12 points. when I open it from layer preview from there is takes from 5 to 6 seconds. **UPDATE 2** I removed view and joins and it works great. I had to copy columns from one table to another for reading directly from table all fields. If someone knows solution when using views or joins please share :) Thanks.


nx_spatial does not read all shapefile features

I have a polyline shapefile for a road network. The roads are split at every intersection (node), e.g. if two roads intersect at one point, then they are split into four links(edges). So using the attribute table of the shapefile, I know this shapefile has 600 edges. But when the shapefile is read in `nx_spatial`, total edges found is only 497. I would like to know why it is missing other 103 road links (edges). Thanks               import nx_spatial as ns          roads = ns.read_shp(path)   #path = path to polyline shapefile     roads.number_of_edges()     #output = 497      Hope these info helps: Windows7, Python 2.7 Anaconda 64bit, Eclipse. The problem is related to nx_spatial. But I could not create such tag for low reputation.


How to set pen width of rivers based on scalerank attribute (QGis 2.2)?

I have a Vectorlayer from NaturalEarth.com with riverdata that includes "scalerank" information. Now I want to display these with different pen width based on their scalerank, like this: scalerank 1 = 0,5 mm pen width scalerank 2 = 0,3 mm and so on. I guess you do this in the Layer Properties. I selected the "Simple Line" and opened the "data defined properties". Here I selected "pen width" to the left, under "field" i selected "scalerank" and then I don´t know how to build the expression. Were my steps even correct up to this point? It would be really great if someone could describe in detail how I would proceed or point me towards a simple guide for beginners. I already read through the "Symbology" and "Classification" Chapter of the Training manual but they focus on the fill element there :(