title: Openlayers can't get KML layer to work

text: I'm trying to load multiple KML layers with this example project from openlayers.org I can make the KML work in almost all other examples but somehow this code doesen't load. It even breaks the code and displays nothing at all. What I want to do is:   * remove the complete "sprinters" layer and code (for now I just remove the layer reference)   * load multiple KML files (each in its own layer)   * load the icon image from the KML file (each KML file/layer had its own icon image) Here's my code:               // API key for http://openlayers.org. Please get your own at     // http://bingmapsportal.com/ and use that instead.     var apiKey = "AqTGBsziZHIJYYxgivLBf0hVdrAk9mWO5cQcb8Yux8sW5M8c8opEC2lZqKR1ZZXf";          // initialize map when page ready     var map;     var gg = new OpenLayers.Projection("EPSG:4326");     var sm = new OpenLayers.Projection("EPSG:900913");          var init = function (onSelectFeatureFunction) {              var vector = new OpenLayers.Layer.Vector("Vector Layer", {});              var sundials = new OpenLayers.Layer.Vector("KML", {                     projection: map.displayProjection,                     strategies: [new OpenLayers.Strategy.Fixed()],                     protocol: new OpenLayers.Protocol.HTTP({                         url: "kml/sundials.kml",                         format: new OpenLayers.Format.KML({                             extractStyles: true,                             extractAttributes: true                         })                     })                 });              var sprintersLayer = new OpenLayers.Layer.Vector("Sprinters", {             styleMap: new OpenLayers.StyleMap({                 externalGraphic: "img/mobile-loc.png",                 graphicOpacity: 1.0,                 graphicWidth: 16,                 graphicHeight: 26,                 graphicYOffset: -26             })         });              var sprinters = getFeatures();         sprintersLayer.addFeatures(sprinters);              var selectControl = new OpenLayers.Control.SelectFeature(sprintersLayer, {             autoActivate:true,             onSelect: onSelectFeatureFunction});              var geolocate = new OpenLayers.Control.Geolocate({             id: 'locate-control',             geolocationOptions: {                 enableHighAccuracy: false,                 maximumAge: 0,                 timeout: 7000             }         });         // create map         map = new OpenLayers.Map({             div: "map",             theme: null,             projection: sm,             numZoomLevels: 18,             controls: [                 new OpenLayers.Control.Attribution(),                 new OpenLayers.Control.TouchNavigation({                     dragPanOptions: {                         enableKinetic: true                     }                 }),                 geolocate,                 selectControl             ],             layers: [                 new OpenLayers.Layer.OSM("OpenStreetMap", null, {                     transitionEffect: 'resize'                 }),                 new OpenLayers.Layer.Bing({                     key: apiKey,                     type: "Road",                     // custom metadata parameter to request the new map style - only useful                     // before May 1st, 2011                     metadataParams: {                         mapVersion: "v1"                     },                     name: "Bing Road",                     transitionEffect: 'resize'                 }),                 new OpenLayers.Layer.Bing({                     key: apiKey,                     type: "Aerial",                     name: "Bing Aerial",                     transitionEffect: 'resize'                 }),                 new OpenLayers.Layer.Bing({                     key: apiKey,                     type: "AerialWithLabels",                     name: "Bing Aerial + Labels",                     transitionEffect: 'resize'                 }),                 vector,                 sundials                // sprintersLayer             ],             center: new OpenLayers.LonLat(0, 0),             zoom: 1         });              var style = {             fillOpacity: 0.1,             fillColor: '#000',             strokeColor: '#f00',             strokeOpacity: 0.6         };         geolocate.events.register("locationupdated", this, function(e) {             vector.removeAllFeatures();             vector.addFeatures([                 new OpenLayers.Feature.Vector(                     e.point,                     {},                     {                         graphicName: 'cross',                         strokeColor: '#f00',                         strokeWidth: 2,                         fillOpacity: 0,                         pointRadius: 10                     }                 ),                 new OpenLayers.Feature.Vector(                     OpenLayers.Geometry.Polygon.createRegularPolygon(                         new OpenLayers.Geometry.Point(e.point.x, e.point.y),                         e.position.coords.accuracy / 2,                         50,                         0                     ),                     {},                     style                 )             ]);             map.zoomToExtent(vector.getDataExtent());         });              function getFeatures() {             var features = {                 "type": "FeatureCollection",                 "features": [                     { "type": "Feature", "geometry": {"type": "Point", "coordinates": [1332700, 7906300]},                         "properties": {"Name": "Igor Tihonov", "Country":"Sweden", "City":"Gothenburg"}},                     { "type": "Feature", "geometry": {"type": "Point", "coordinates": [790300, 6573900]},                         "properties": {"Name": "Marc Jansen", "Country":"Germany", "City":"Bonn"}},                     { "type": "Feature", "geometry": {"type": "Point", "coordinates": [568600, 6817300]},                         "properties": {"Name": "Bart van den Eijnden", "Country":"Netherlands", "City":"Utrecht"}},                     { "type": "Feature", "geometry": {"type": "Point", "coordinates": [-7909900, 5215100]},                         "properties": {"Name": "Christopher Schmidt", "Country":"United States of America", "City":"Boston"}},                     { "type": "Feature", "geometry": {"type": "Point", "coordinates": [-937400, 5093200]},                         "properties": {"Name": "Jorge Gustavo Rocha", "Country":"Portugal", "City":"Braga"}},                     { "type": "Feature", "geometry": {"type": "Point", "coordinates": [-355300, 7547800]},                         "properties": {"Name": "Jennie Fletcher ", "Country":"Scotland", "City":"Edinburgh"}},                     { "type": "Feature", "geometry": {"type": "Point", "coordinates": [657068.53608487, 5712321.2472725]},                         "properties": {"Name": "Bruno Binet ", "Country":"France", "City":"ChambÃ©ry"}},                     { "type": "Feature", "geometry": {"type": "Point", "coordinates": [667250.8958124, 5668048.6072737]},                         "properties": {"Name": "Eric Lemoine", "Country":"France", "City":"Theys"}},                     { "type": "Feature", "geometry": {"type": "Point", "coordinates": [653518.03606319, 5721118.5122914]},                         "properties": {"Name": "Antoine Abt", "Country":"France", "City":"La Motte Servolex"}},                     { "type": "Feature", "geometry": {"type": "Point", "coordinates": [657985.78042416, 5711862.6251028]},                         "properties": {"Name": "Pierre Giraud", "Country":"France", "City":"ChambÃ©ry"}},                     { "type": "Feature", "geometry": {"type": "Point", "coordinates": [742941.93818208, 5861818.9477535]},                         "properties": {"Name": "StÃ©phane Brunner", "Country":"Switzerland", "City":"Paudex"}},                     { "type": "Feature", "geometry": {"type": "Point", "coordinates": [736082.61064069, 5908165.4649505]},                         "properties": {"Name": "FrÃ©dÃ©ric Junod", "Country":"Switzerland", "City":"Montagny-prÃ¨s-Yverdon"}},                     { "type": "Feature", "geometry": {"type": "Point", "coordinates": [771595.97057525, 5912284.7041793]},                         "properties": {"Name": "CÃ©dric Moullet", "Country":"Switzerland", "City":"Payerne"}},                     { "type": "Feature", "geometry": {"type": "Point", "coordinates": [744205.23922364, 5861277.319748]},                         "properties": {"Name": "Benoit Quartier", "Country":"Switzerland", "City":"Lutry"}},                     { "type": "Feature", "geometry": {"type": "Point", "coordinates": [1717430.147101, 5954568.7127565]},                         "properties": {"Name": "Andreas Hocevar", "Country":"Austria", "City":"Graz"}},                     { "type": "Feature", "geometry": {"type": "Point", "coordinates": [-12362007.067301,5729082.2365672]},                         "properties": {"Name": "Tim Schaub", "Country":"United States of America", "City":"Bozeman"}}                 ]             };                  var reader = new OpenLayers.Format.GeoJSON();                  return reader.read(features);         }          };


title: QGIS print composer error due to Java script problem!

text: I've been experiencing a problem with the QGIS print composer. I am working on a Linux Ubuntu platform (Release 12.04 (precise) 64-bit) and I am using QGIS 2.0.1 Dufour. I need to export a number of maps I have recently created, in either JPG or PDF format (in both 300 and 600 dpi), however, while I am trying to export them using the QGIS print composer the whole system crashes and shuts down immediately! A pop out window appears and the the error it gives me is the following: **Java script problem: The script on this page appears to have a problem. Do you want to stop the script?** Whenever I choose -NO- (Not to stop the script) nothing is functioning, unless I choose the option -YES- (To stop the script) so apparently my QGIS project/ workspace immediately shuts down! Could you please give me any hints on how I could fix this problem? I have already tried to export my maps using much lower dpi (100 and 150, etc.) but unfortunately it still gives me this error (!) I have already checked previous posts/ replies and I have to mention that I have checked my labelling already. In QGIS 2.0.1 Dufour there is no 'old' and 'new' labelling. I do use however transparency and shadow in my labels. Any help would be very much appreciated. Looking forward to hearing from you.. Cheers, Mina * * * I just figured out what the problem is! I've been using as background the Google Satellite OpenLayers Plugin, which uses the EPSG code:3857. My population density raster layer is in WGS84, and I have set the CRS of my QGIS Project (from the Project Properties) to be WGS84. So when I was trying to export it using the Print Composer my whole system was crashing! What I still have to figure out though is how to make my population density raster look better in terms or pixelization. When I set my Project's CRS as WGS84 (EPSG:4326) my raster image looks absolutely fine but crashes if I try to export it as PDF/JPG, on the other hand if I set the CRS of my project as WGS84 Pseudo Mercator (EPSG:3857), my raster seems to pixelate when I make it large. Any ideas on how to visualise it properly? Thanks!


title: Geowebcache without Geoserver

text: I know that this is a real beginner question - non the less I need to ask it somewhere. I have a Geoserver(gs) and an stand-alone geowebcache (gwc). I seeded the gwc from the gs and pointed my clients to the gwc - everything works fine. What I want to do now, is to remove the geoserver and just take the gwc with me. Is that even possible ? Can I run a gwc without a gs ? If this is not possible - what would be the easiest possibility to "clone" one or two layers from an existing gs and run it without the source gs ? What I want to do, is to clone two layers from a company internal gs and carry these two layers around with me (use them in a demo system that has no connection to the source gs). Thx a lot ! Greets edit: Our client requests the map data via WMS.


title: Is it possible to remove parameter values from the Python Window when running a script in ArcGIS?

text: When I run a python script in ArcGIS Desktop 10.1 the values from the parameters will be written to the Python Window (marked with red in the picture below). Does anybody know if it is possible to remove the parameter values or the other lines like the time stamp? ![enter image description here](http://i.stack.imgur.com/JZZHo.png)


title: Debug target is missing - how to set in VS 2010 Express?

text: I updated ArcGIS from 10.1 to 10.2 and recompiled all Addins with ArcObjects 10.2. I am having an issue with 1 addin that accesses a custom tool in a toolbox and want to debug the project. However, when i hit run I get a "...the debug target '' is missing" erro message. The path is still set to the Desktop10.1 target - **HOW DO I RESET IT to Desktop10.2 in VS 2010 EXPRESS.** I only found instruction on how this can be dine in the full version if VS but this option is not avaialble in the express version. ![enter image description here](http://i.stack.imgur.com/6CFlB.jpg)


title: How do I project a Azimuthal Equidistant global map into a circle in QGIS?

text: I'm fairly new to QGIS/GIS stuff in general, so I apologize if this is too simple of a question, and I'm just bad at finding my answer. I have a shapefile of all the countries in the globe I downloaded from Natural Earth. I'm needing to create two hemisphere maps (similar to these guys I found on Wikimedia) in a azimuthal equidistant projection: ![enter image description here](http://i.stack.imgur.com/m3Xq1.png)   However, I need the western hemisphere to have most of Europe and the US and the Eastern projection to include Asia and Australia. Basically, the center of the map would be the middle of the Atlantic. I narrowed down the problem to it's my proj language in the CRS, but I'm not sure how to pair the project to a circle. Any insights for a newb?


title: Offsetting Points by location

text: Sorry If you've read this before - I've tried to change the content so that it reflects what I need a little better. This question was marked as a duplicate although I read the the answer to the other question and it didn't answer my query, so was advised to re-post. I've created thiessen polygons for point data I have in ArcGIS 10.1. Unfortunately the data locations are post-code centroids, and about half of the records are lost due to the fact that they fall in the same post-code centroid as other points. What I'd like to do is offset same-location points, within the bounds of areas defined by polygons that are in a different layer. I don't want to generate points, as the sampling points already exist. I would prefer the points to be set apart by area or by polygon length/width - I'd basically like them to be reasonably regularly spaced in relation to the polygons. This is so I can then create thiessen polygons from all of my data points, as it won't consider overlapping points. I would prefer that non- overlapping points be left where they are. _I want each of the stacked points to be evenly dispersed within the bounds of each postcode, but the dispersed points to remain in a separate layer from the post code boundaries._ Otherwise if there are any other interpolation methods which would allow me to offset data points or cope with two points in the same location it would be great to know what they are. I expect this could be problematic as each of the points can have different data, which would then become quite difficult to display / visualize as they'd overlap. I'm having huge difficulties with this and would really, really appreciate your help. EDIT: I've found a new tool called Disperse Markers - this sounded promising until I discovered you can't limit dispersal by polygon bounds from another layer.


title: Can QGIS open folder with "run feature action" tool?

text: Is possible to open folder with "run feature action" tool? I can open specific file like .dwg, but don`t know how open folder in specific location. This folder contain multiple .dwg files and when user click this action, folder open in another window. Does is possible in QGIS 1.8.0, and how do it? Thanks!


title: Matching vector network to slope raster dataset in ArcGIS for Desktop Advanced 10.1

text: I am trying to calculate the average slope of a rivers network. Each part of the network is broken up into individually numbered segments. I have a high resolution slope raster and thought I could match this to the river network. Is there an appropriate way to achieve this? Help and answers fully appreciated. Thank you ![River network and slope raster](http://i.stack.imgur.com/7up6V.png)


title: What's the difference between Spatial Join Tool and Spatial Join Function in ArcGIS?

text: I am curious to know if anyone can shed some light on the difference between ArcGIS' Spatial Join geoprocessing tool (found in Analysis -> Overlay toolbox) and the Spatial Join 'wizard' (found by right-clicking a layer -> Join -> then selecting "Join data from another layer based on spatial location" from the first drop-down). There have been multiple times where the tool has worked and the other has failed and vice versa, especially when using ModelBuilder and Python. Any clarification would be much appreciated. thanks,


title: Is installing Web Adaptor mandatory/important with ArcGIS for Server?

text: If I am using ArcGIS for Server for my web application is it mandatory or important to install the ArcGIS Web Adaptor? I am facing a proxy page configuration issue.


title: Rasters stored in folder: Is there a limit at 5,000?

text: I have a python script that creates batches of ~6,000 cost distance rasters. These rasters are intermediate data that will be summarized in another process. Output is stored in plain old folders. However, at output raster 5000, my python script stops with the error msg something like: 'forcible close by a remote host.' If I redirect the output for files 5000+ to a new folder, all works as before. I'm not sure if it's a folder size limit, since I can add shapefiles or other folders to the output folder (already containing 5000 rasters) without issue. The error is repeatable with different output and different folder locations. Has anyone had this issue before and does anyone know where to change the folder limit?


title: Can't get the openlayer plugin to operate

text: I can't get the openlayer plugin to run. I've got QGIS V1.8 on Windows 7. I've tried various repo's recommended on different sites; http://plugins.qgis.org/plugins/plugins.xml & http://build.sourcepole.ch/qgis/plugins.xml but when I try to add a layer & connect to one of the sites I get long error messages. Any help appreciated (hope I've given enough info).


title: Is there a Cluster convex hull implementation in OpenLayers?

text: In this leaflet example. When hovered over a cluster marker, it shows the bounding area of the clustered features which is known as convex hull. Is there a way to reproduce it with OpenLayers?


title: How to add a ITable (Table object) to the current map (or document)?

text: I created an in-memory results ITable and I need to add it to the current ArcMap document/map to see the generated data. How can I do it?


title: How to update polygon field with point count for multiple rows? (Temporal point-in-polygon)

text: I have a shapefile with several regions. It contains basic info like `ID, Code, Name1, Name2, etc.` It is overlaid with a shapefile of points (nearly 200k). Each point represents an event with a type and a day (YYYYMMDD). The table for the point layer looks like:               ID  DAY        STAT1  STAT2   STAT3 ....     01  20010901   23.45  53.12   12.34 ....     02  20010901   43.35  13.56   31.84 ....     03  20010902   35.01  21.61   11.47 ....      What I would like to do is:   1. Iterate through the point data for each day (one day may have one or several rows).   2. For each day, count the points in each polygon region.   3. Update the polygon table with a new column for that day with the point count as its value. Ideally then, the final result would be a polygon feature with a table that resembles:               ID Code Name1 Name2 01 02 03 04 ... 198721     01 abc  ABC   A01   14  2 86 12 ...     27     02 xyz  XYZ   XZ7   66 47 23 88 ...     19      I'm using QGIS and believe this can be done w/ Python but I am not sure a) exactly how b) if another method might be more ideal. Any help, pointers, or suggestions are greatly appreciated!


title: Using arcpy to set field values for all features within each polygon of a separate feature class

text: I am trying to set a field value in one feature class (TRU) based on the value of a field in a separate feature class (DerivedBoundaries) that contains the first, using python in ArcGIS 10.1. I have written a script that iterates through each site boundary, selects all of the TRU features inside of it, and does that pretty well. However, I cannot seem to get my head around how the arcpy.CalculateField_management() function operates.               #Build an array and fill it with all the TempIDs numbers present in the data table     rows = arcpy.SearchCursor(lyr_DerivedBoundaries)     row = rows.next()          TRU_rows = arcpy.UpdateCursor(lyr_TRU)     TRU_row = rows.next()          while row:         a = row.TempID         TempIDs.append(a)         row = rows.next()              #Set Count equal to the length of the array created in the while loop         Count = len(TempIDs)          while Position < Count: #iterate through each individual feature by using a definition query         query = "[TempID] = " + "'" + TempIDs[Position] + "'"         lyr_DerivedBoundaries.definitionQuery = query              #center on feature         df.panToExtent(lyr_DerivedBoundaries.getSelectedExtent())              #Select all of the TRU Cells within the active Site Boundary         arcpy.SelectLayerByLocation_management(lyr_TRU,"COMPLETELY_WITHIN",lyr_DerivedBoundaries,0,"NEW_SELECTION")              #Set [Assoc_Site] equal to lyr_DerivedBoundaries.[TempID]         hopper = '""""' + str(TempIDs[Position]) + '""""'         arcpy.CalculateField_management("TRU","Assoc_Site",hopper,"VB","#")      I have been attempting to make the third argument in the CalculateField function operate based on the syntax I am seeing from copying a successful CalculateField operation as a python snippet from the results window in ArcMap. Any help is greatly appreciated, I'm open to the possibility that I am going about this is a roundabout way and that there is a better way. Thanks! Edit: Just in case, here is the text of the error message I get when the script hits the line with the CalculateField function on it: > Runtime error Traceback (most recent call last): File "", line 43, in File > "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\management.py", line > 3129, in CalculateField raise e ExecuteError: ERROR 999999: Error executing > function. Expected end of statement Failed to execute (CalculateField).


title: How to change all values in a field in one operation?

text: I am setting up a couple of shapefiles with text x, text y, text rotation and text size fields in order to utilize the labeling toolbar where I can move and rotate labels. I would like the values for all the records in the text size field to be 8. Is there a way to change them all at once, so they don't have to be done individually?


title: Column exists in DatabaseMetaData, but does not exist in relation?

text: I am using JDBC to query a PostgreSQL database. And I want to populate a column called wiki_url based on the value of another column, level which will determine which value of 5 columns to concatenate to a value in wiki_url. I think the big issue is setting null values to something other than null programmatically without postgresql as the null value expression to not null was a common problem that caused my same error. From print statements I also figured out that the handleEntries function seems to be stuck on name3 and continually repeating. However I still don't want to use another sql query to check values because it might cause a transaction lock. I am trying to perform batch updates without using a connection pool to prevent deadlocks so I am using only 1 prepared statement. The control flow will be first checking if the wiki_url doesn't have anything after a slash and then populating it, else checking for duplicate entries after that slash and making them unique. I am fairly certain that I probably don't have the batch updates correctly coded, but I would like to resolve the error I stated in the question first. I have tried changing the columns to lower case, but it doesn't seem to work. The error and my code is below. The only relevant debug assisting statement I get is:               UPDATE adminboundaries SET WIKI_URL = 'http://127.0.0.1/mediawiki/index.php/null'      Which continues over and over again till it hits a certain number of rows. Its not supposed to have null at the end.               SQLState C: 42703 java.util.logging.Logger@28ca1c     VendorError C: 0     Dec 18, 2012 1:16:11 PM Shapefile_Repair main     SEVERE: Batch entry 0 UPDATE adminboundaries SET WIKI_URL = 'http://127.0.0.1/mediawiki/index.php/null' was aborted.  Call getNextException to see the  cause.org.postgresql.util.PSQLException: ERROR: column "wiki_url" of relation "adminboundaries" does not exist     Position: 28          public static void handleEntries(Long level, PreparedStatement w_ustmt,             String base_url, String name5, String name4, String name3,             String name2, String name1, String name0) throws SQLException {         String wiki_url_entry = "";         try {             if (level.equals((long) 5)) {                 // wiki_url = wiki_url + name5;                 wiki_url_entry = base_url + name5;                 w_ustmt.setString(1, wiki_url_entry);                 w_ustmt.addBatch();                 System.out.println(w_ustmt.toString());             } else if (level.equals((long) 4)) {                 // wiki_url = wiki_url + name4;                 wiki_url_entry = base_url + name4;                 w_ustmt.setString(1, wiki_url_entry);                 w_ustmt.addBatch();                 System.out.println(w_ustmt.toString());             } else if (level.equals((long) 3)) {                 // wiki_url = wiki_url + name3;                 wiki_url_entry = base_url + name3;                 w_ustmt.setString(1, wiki_url_entry);                 w_ustmt.addBatch();                 System.out.println(w_ustmt.toString());             } else if (level.equals((long) 2)) {                 // wiki_url = wiki_url + name2;                 wiki_url_entry = base_url + name2;                 w_ustmt.setString(1, wiki_url_entry);                 w_ustmt.addBatch();                 System.out.println(w_ustmt.toString());             } else if (level.equals((long) 1)) {                 // wiki_url = wiki_url + name1;                 wiki_url_entry = base_url + name1;                 w_ustmt.setString(1, wiki_url_entry);                 w_ustmt.addBatch();                 System.out.println(w_ustmt.toString());             } else {                 // wiki_url = wiki_url + name0;                 wiki_url_entry = base_url + name0;                 w_ustmt.setString(1, wiki_url_entry);                 w_ustmt.addBatch();                 System.out.println(w_ustmt.toString());             }             w_ustmt.addBatch();         } catch (SQLException ex) {             Logger lgr = Logger.getLogger(Shapefile_Repair.class.getName());             lgr.log(Level.SEVERE, ex.getMessage());             while (ex != null) {                 System.out.println(ex.getNextException());             }             // System.out.println("SQLState: A " + ex.getSQLState());             // System.out.println("VendorError A: " + ex.getErrorCode());         }     }          /* this function will handle all the urls which have same entries */     public static void handleDups(String wiki_url, String base_url,             String name5, String name4, String name3, String name2,             String name1, String name0, PreparedStatement w_ustmt) {         String wiki_url_entry = "";         try {             if (wiki_url.toString().equals(base_url + name5)) {                 wiki_url_entry = wiki_url + " (" + name0 + "." + name1 + "."                         + name2 + "." + name3 + "." + name4 + ")";                 // rewriting here, yet it is only printing ?, ?                 w_ustmt.setString(1, wiki_url_entry);                 w_ustmt.addBatch();                 System.out.println(w_ustmt.toString());             } else if (wiki_url.toString().equals(base_url + name4)) {                 wiki_url_entry = wiki_url + " (" + name0 + "." + name1 + "."                         + name2 + "." + name3 + ")";                 w_ustmt.setString(1, wiki_url_entry);                 w_ustmt.addBatch();                 System.out.println(w_ustmt.toString());             } else if (wiki_url.toString().equals(base_url + name3)) {                 wiki_url_entry = wiki_url + " (" + name0 + "." + name1 + "."                         + name2 + ")";                 w_ustmt.setString(1, wiki_url_entry);                 w_ustmt.addBatch();                 System.out.println(w_ustmt.toString());             } else if (wiki_url.toString().equals(base_url + name2)) {                 wiki_url_entry = wiki_url + " (" + name0 + "." + name1 + ")";                 w_ustmt.setString(1, wiki_url_entry);                 w_ustmt.addBatch();                 System.out.println(w_ustmt.toString());             } else if (wiki_url.toString().equals(base_url + name1)) {                 wiki_url_entry = wiki_url + " (" + name0 + ")";                 w_ustmt.setString(1, wiki_url_entry);                 w_ustmt.addBatch();                 System.out.println(w_ustmt.toString());             }             w_ustmt.addBatch();             // System.out.println(w_ustmt.toString());         } catch (SQLException ex) {             Logger lgr = Logger.getLogger(Shapefile_Repair.class.getName());             lgr.log(Level.SEVERE, ex.getMessage());             System.out.println("SQLState: B " + ex.getSQLState());             System.out.println("VendorError B :" + ex.getErrorCode());         }     }     public static void main(String[] args) throws InstantiationException,             IllegalAccessException, SQLException {         // TODO Auto-generated method stub         Connection conn = null;         // use the log4jdbc4 wrapper for the connection object         // conn = new net.sf.log4jdbc.ConnectionSpy(conn);         Statement stmt = null;         ResultSet rs = null;         try {             // conn = makeConnection(args[0], args[1], args[2], args[3], "");             String host = args[0];             String port = args[1];             String database = args[2];             String user = args[3];             String password = args[4];             String sql_query = "SELECT \"NAME_0\", \"NAME_1\", \"NAME_2\", \"NAME_3\", \"NAME_4\", \"NAME_5\", \"WIKI_URL\", \"LEVEL_DEPT\" FROM"                     + " AdminBoundaries WHERE \"WIKI_URL\" IN(SELECT \"WIKI_URL\" FROM AdminBoundaries"                     + " GROUP By \"WIKI_URL\" HAVING (count (\"WIKI_URL\") > 1)) ORDER BY \"WIKI_URL\";";             Class.forName("org.postgresql.Driver").newInstance();                  String url = "jdbc:postgresql://" + host + ":" + port + "/"                     + database;             conn = DriverManager.getConnection(url, user, password);             // if(conn.equals(null)){             // System.err.println("Connection complete");             // }             DatabaseMetaData meta;             try {                 if (conn.isClosed()) {                     System.out.println("closed");                 }                 System.out.println(conn.getWarnings());                 meta = conn.getMetaData();                 System.out.println("Does database support batch processes?:"                         + meta.supportsBatchUpdates());                 // after checking the table, adminboundaries was in fact                 // evident, so the issue now is changing the sql queries to                 // lower case                 /*                  * ResultSet tables = meta.getTables(null, null, "%", null);                  * while (tables.next()){                  * System.out.println(tables.getString(3)); }                  */                 // trying to check if column exists, which it turns out does                 // not?                 ResultSet columns = meta.getColumns(null, null,                         "adminboundaries", "%");                 while (columns.next()) {                     System.out.println(columns.getString(4));                 }                 ResultSetMetaData rsmd = columns.getMetaData();                 int numCol = rsmd.getColumnCount();                 for (int i = 1; i < numCol + 1; i++) {                     while (columns.next()) {                         if (rsmd.getColumnName(i).equals("WIKI_URL")                                 || (rsmd.getColumnName(i).equals("NAME_0"))) {                             System.out.println(columns.getString(4));                         } else {                             System.out.println("Did not find column");                         }                     }                 }             } finally {                 System.out.println(conn.getTransactionIsolation());                 System.out.println(sql_query);                 stmt = conn.createStatement();                 System.out.println(stmt.getFetchSize());                 stmt.setMaxRows(555);                 System.out.println(conn.getTypeMap());                 // stmt.addBatch(sql_query);                 rs = stmt.executeQuery(sql_query);                 // batch_counter is for the row count of the SQL statements                 // executed                 // int batch_counter = pstmt.executeUpdate();                 // update dup_sql's arguments being set as it will vary                 // String wiki_sql =                 // "UPDATE AdminBoundaries SET \"WIKI_URL\" = ?";                 PreparedStatement w_ustmt = conn                         .prepareStatement("UPDATE adminboundaries SET WIKI_URL = ?");                 // int counter = 0;                 // for (counter = 0; counter < 1000; counter++) {                 conn.setAutoCommit(false);                 // stmt.addBatch(sql_query);                 // stmt.setQueryTimeout(30);                 System.out.println(rs.getFetchSize());                 SQLWarning resultsetWarning = rs.getWarnings();                 System.out.println(resultsetWarning);                 // consider changing tables/columns to lower case as sources say                 // to do                 while (rs.next()) {                     String base_url = "http://127.0.0.1/mediawiki/index.php/";                     String wiki_url = rs.getString("WIKI_URL");                     Long level = rs.getLong("LEVEL_DEPT");                     String name0 = rs.getString("NAME_0");                     String name1 = rs.getString("NAME_1");                     String name2 = rs.getString("NAME_2");                     String name3 = rs.getString("NAME_3");                     String name4 = rs.getString("NAME_4");                     String name5 = rs.getString("NAME_5");                     // use 127.0.0.1, not ncsirad-pc b/c wiki_urls are coming                     // back 127.0.0.1                          // TO DO: rethink this if statement to include in function                     // and execute                     // both functions without conditionals above. So it will run                     // through first                     // then run through second.                          if (wiki_url.toString().equals(                             base_url)) {                         // Savepoint savepoint1 =                         // conn.setSavepoint("wiki_entry");                         // w_ustmt.setQueryTimeout(30);                         // System.out.println("Getting into duplicates loop");                         handleEntries(level, w_ustmt, base_url, name5, name4,                                 name3, name2, name1, name0);                              // add to batch                         // w_ustmt.addBatch(wiki_sql);                         // int counts2[] = w_ustmt.executeBatch();                         // make sure to try the below                         // w_ustmt.executeUpdate();                         // conn.rollback(savepoint1);                     } else {                         handleDups(wiki_url, base_url, name5, name4, name3,                                 name2, name1, name0, w_ustmt);                         w_ustmt.setQueryTimeout(30);                         // dup_pstmt.addBatch(dup_sql);                         // int count3[] = dup_pstmt.executeBatch();                     }                      }                 int counts[] = w_ustmt.executeBatch();                 System.out.println("here is " + counts);                 conn.commit();                 conn.setAutoCommit(true);                 // counter = 0;                 // }             }             System.out.println("finished queries");             rs.close();              } catch (ClassNotFoundException e) {             e.printStackTrace();             // System.exit(1);         } catch (SQLException ex) {             Logger lgr = Logger.getLogger(Shapefile_Repair.class.getName());             lgr.log(Level.SEVERE, ex.getMessage());             System.out.println("SQLState C: " + ex.getSQLState() + " " + lgr);             System.out.println("VendorError C: " + ex.getErrorCode());             if (ex != null) {                 System.out.println(ex.getNextException());             }         } finally {             try {                 if (rs != null) {                     rs.close();                 }                 if (stmt != null) {                     stmt.close();                 }                 if (conn != null) {                     conn.close();                 }             } catch (SQLException e) {             }         }         // conn.close();     }      }


title: How to trace SQL queries sent by ArcGIS Server (ArcSDE) to Oracle database?

text: I'd like to generate a log file containing all SQL queries sent by ArcGIS Server (ArcSDE) to Oracle database. Is there a way to do so? I'm using Oracle 11g and ArcGIS Server 10.0 on Windows. ArcSDE is used in direct connection.


title: Developing a Slope Map of India

text: I am working on developing a Slope map of India (for my research), where I collected DEM from Bhuvan and tried to mosaic and then perform terrain analysis. But I am unable get the output since the file is very big and taking a very long time for computation. Can any one suggest me the best way to resolve this issue.


title: how to judge the side from a point to a linestring

text: I'm working with NTS (NetTopologySuite), I get point geometry and a directed linestring, how to judge the side of the point locate with the linestring? one the left side, right side, or just on the linestring?


title: Download Airports from OSM

text: Is there any way to download all airports in Europe from OSM? What I'm looking for is the Airport perimeter, (lines or polygons, dosn't matter) I know that I could download all Europe, and then filter by attributes, but what I ask is if is there any way for do it directly. Some kind of 'where', where I can ask for download ONLY the data 'where column Aeroway is not null' Thanks


title: How to set parameter filters in ToolValidator?

text: I am populating `parameter[2]` using validation code provided by ESRI. How can I modify this code to repeat for `parameter[3]` what was done for `parameter[2]`? To elaborate...param[0] is a user supplied feature class. param[1] is fields from provided feature class. param[2] provides sorted values from selected field, and i would like to provide and sort these same values again in param[3]...               import arcpy     class ToolValidator(object):       """Class for validating a tool's parameter values and controlling       the behavior of the tool's dialog."""            def __init__(self):          """Setup arcpy and the list of tool parameters."""         self.params = arcpy.GetParameterInfo()         self.fcfield = (None, None)            def initializeParameters(self):         """Refine the properties of a tool's parameters.  This method is         called when the tool is opened."""         return            def updateParameters(self):         """Modify the values and properties of parameters before internal         validation is performed.  This method is called whenever a parmater         has been changed."""         if self.params[0].value and self.params[1].value:           fc, col = str(self.params[0].value), str(self.params[1].value)           if self.fcfield != (fc, col):             self.fcfield = (fc, col)             self.params[2].filter.list = [str(val) for val in                                         sorted(                                           set(                                             row.getValue(col)                                             for row in arcpy.SearchCursor(fc, None, None,                                                                           col)                                               )                                            )                                       ]         if self.params[2].value not in self.params[2].filter.list:           self.params[2].value = self.params[2].filter.list[0]            def updateMessages(self):         """Modify the messages created by internal validation for each tool         parameter.  This method is called after internal validation."""


title: ArcMap 100k meters square identification - double?

text: ArcMap - 1:50.000 - 5x3 meters - MGRS I put on a grid defined with the standard 1:50.000 grid style in ArcMap. I tick the box for "100,000 meter grid square identification", but it makes it double... See image. I never intended to do it double, I just want one set of grid square identifications. ![Grid Square Identification Problem](http://i.stack.imgur.com/qgRwv.png)


title: Is there a mapping between OGR and python data types?

text: I'm writing a shapefile using OGR in python, creating fields on-the-fly from a python data source. Creation of a new field requires an OGR data type, is there a mapping between OGR and python data types? For example, this would be the norm:               new_field = ogr.FieldDefn('MYFLD', ogr.OFTInteger)      Ideally:               ogr_datatype = get_ogr_data_type(python_data)     new_field = ogr.FieldDefn('MYFLD', ogr_datatype)      Currently my conversions are hard coded (e.g. int = ogr.OFTInteger), but this is a bit of a pain and relies on me coding all possible data types. Thanks.


title: Is it possible to add a command to the ArcMap Find dialog context menu?

text: I think I already know the answer to this... which is "no", but I wrote this up so I'll ask anyways. Is it possible using ArcObjects to extend/customize the ArcMap Find tool/dialog by adding a command to the context menu that appears when you right-click a search result? The command would also need to know the location of the item that was right-clicked. ![Find tool dialog](http://help.arcgis.com/en/arcgisdesktop/10.0/help/00s5/GUID-C9E0B5A4-DE8A-43DB-9B24-CC3FDB8CAD8A-web.png) I see that there is an `IFinder` interface one can implement to create a new find dialog but I just want to add a menu item to the existing one. My goal is to provide an address lookup using a user-specified geocoding service (i.e. what the "Locations" tab does), and directly run a custom identify command at the location of the user's chosen search result. If I can't use the existing functionality to do this then it's not worth reinventing the wheel as it would just eliminate an extra step or two for the user. I'm also doing this within an ArcMap add-in, so implementing interfaces, registering component categories, etc. is out.


title: How to write a (memory) layer from QGIS to PostGIS?

text: I am looking for an "elegant" solution to write, from a python script, a layer from qgis and into a new table of a PostGIS database. I thougth that this might be solved by `QgsWriteVectorLayer`, but I could not find any hint that this is supported. I only found the solution that this can be done e.g. with Qtsql, but then one has to:   1. analyse the layer (field names, field datatypes, srid, ... )    2. create the table and    3. fill the table with date.  Question: Does pygis offers a "simple" solution to write a complete layer directly into a new PostGIS table?


title: how to apply same color ramp to two line symbols?

text: Working in 10.2. I want to show two different line feature classes, one with just plain lines and the other with arrow-headed lines. The feature classes have the same categorical field I use to symbolize. I want to maintain the different line symbols, but use the same color assignments. If I save one FC's symbology out as a layer, this (obviously) resets the actual line symbol. I've then messed w/changing `Properties for All Symbols` for back to the arrow at end line but can't seem to propagate that back to all symbols in the FeatureLayer. ![enter image description here](http://i.stack.imgur.com/wbkEK.png) Been reading up on layers, but don't see a clear path. Any thoughts appreciated!


title: How to add randomly distributed points within boundaries of zip codes?

text: I’m creating a map to show the distribution of students in my school’s department. I have a .shp file from the US Census displaying zip code areas in the vector layer. Now I have an Excel spreadsheet that lists how many students are in each zip code per academic major. I was wondering if there was a straight forward way to create a vector layer displaying the appropriate number of points evenly distributed throughout each zip code. I tried to join the student data converted to a .cvs file to the Census zip code vector layer. But nothing appeared to have happened. Thanks.


title: QGIS convert attribute table to point shape

text: I have imported an attribute (whith no spatial information) table from MySQL. Fortuantly it has two colums with Longtitude and latitude taken from google maps. Is it posible to use those values to make a point shape file? How? The matrix looks like this ID,long,lat,...... What is the CRS google maps use?


title: Remove inner polygons postgis

text: I'm trying to remove inner polygons with postgis. I've created a routine, that resumes in: From a polygon table, with a unique id: -Create a linestring table from polygon -Import to postgis -Get the length of each line Now I have a table with, for example, 5 linestrings for each id, each linestring was a polygon, and I want to get ONLY the longest line from each ID. ![enter image description here](http://i.stack.imgur.com/EFElB.png) For this, I have a select, but I dont know how to group the geometry, to get ONLY the longest line               select  id, geom as length from esp_lines group by id      I have to group it by other field, but I don't know which one. The other solution I've found is:               select  id, max(geom) as length from esp_lines group by id      but max(geom) doesn't give me the expected result (the longest linestring) Does anybody know if is there any function to get the longest linestring of a group? Thanks


title: Topology validate error

text: ![enter image description here](http://i.stack.imgur.com/i1UVj.png) Im using Arcmap 10.1 version.I don't know where i made mistake my database. I have attached an example image to show the Error Report.


title: Aggregate Tool input format - Feature layer

text: I want to consume Aggregate Polygons (Cartography) tool for doing some spatial operations using sliverlight application. This tool takes input Feature Layer and returns feature class as output. In my sliverlight application I have list of geometries, how do i convert geometries/featureset to feature layer ?. This tool as expects input as a feature layer only. second, I require output as feature set (sliverlight), how to convert feature class to feature set? Please help me on this Where Can I get a source code for this aggregate tool? http://help.arcgis.com/en/arcgisdesk...0000000s000000


title: Length of Feature

text: I have a shapefile which renders a map. I want to calculate and preferably store length of each feature in the shapefile either using QGis or through programmatic means. What is the best way to get this task done?


title: How can i identify this error? Must not connect point more than one line feature

text: ![enter image description here](http://i.stack.imgur.com/vCLrK.png) I have attached an example image to show the problem: This is electrical network data sigle service point to connect more than one Service pole. Is it available any topology rules? I would like some suggestions regarding this error .


title: Openlayers vector layer markers disappear near dateline

text: See demonstration of the bug here: http://jsfiddle.net/3ECSb/4/ I have seen and solved similar problems before with OpenLayers but the usual "three world" concept isn't fixing it this time so I'm putting this out there in case the slight differences can help someone identify the problem. I have a bunch of points I am adding to my vector layer.               var point = new OpenLayers.Geometry.Point(result['longitude'], result['latitude']);     point.transform(map.displayProjection, map.getProjectionObject());          var feature = new OpenLayers.Feature.Vector(             point,             {lakeData:result}         );     vectorLayer.addFeatures(feature);      The map is centered on New Zealand and the points appear. I zoom in one step and they are gone. Then I pan the map so NZ is almost off the map on the right (the important part is the antimeridian is gone) and the points reappear. If I click and drag the map around the points stay on the screen. However if I release the mouse when the antimerdian is still to the right of center the points disappear. I can then center the map on the Chatham Islands (-176 Longitude) and the points reappear and will stay on screen even if I go back to the previous position when they were not visible. So to clarify. If I am centered at 179 latitude the points are only visible if I was previously centered at a negative latitude since the last time the antimeridian was brought on to screen from the right. I have sphericalMercator and wrapDateLine set on every layer, I'm using Google layers as my basemaps, I have tried adding copies of the points at +/- 360 from their original places. But nothing has worked.


title: PostGIS or SQL 2008 ? (For the newbie GIS programmer but familiar with .Net)

text: I've been using MS SQL for years. Starting now to develop GIS application and it is required to do queries and store vectors created in OpenLayers in DB. Assuming I'm developing over .Net , What will be the most convenient way to use a DB in GIS app? MS SQL 2008 or PostGIS ? (I'm using the express edition of 2008) and will be using open source WMS , probably MS4W (or GeoServer). If there is any tutorial for beginners combing DB with GIS based APP I'll be happy to see. Thank you.


title: How to project ECW with FME?

text: I would like to project ECW + MITAB with FME to Geodatabase. For example, i have the header MiTab: > !table !version 300 !charset WindowsLatin1 Definition Table File > "7007_0652_0656_A08.ecw" Type "RASTER" (381028.028, 5255481.97) (0,0) Label > "NWCor", (381028.028, 5253732.95) (0,11660) Label "SWCor", (382131.9, > 5253732.95) (7359,11660) Label "SECor", (382131.9, 5255481.97) (7359,0) > Label "NECor" CoordSys Earth Projection 8, 33, "m", -69, 0, 0.9996, 500000, > 0 Bounds (-7745844.29605, -9997964.94315) (8745844.29605, 9997964.94315) > Units "m" How to project the ecw raster to Geodatabase ? Thanks.


title: How to convert date to an arbitrary format in FME Workbench?

text: My source dataset is DWG and destination is GDB. The source dataset has Date attributes as Char in DD-MM-YYYY. The corresponding destination attributes have to be of Date datatype, that too in M/D/YYYY format. I tried DateFormatter transformer, with output date format string as **FME Date (%D)** , I got the error as `The date 'FME Date (05/14/1981)' is not valid. Valid forms for a date type are YYYYMMDD, YYYYMMDDHHMMSS, or HHMMSS` For format string as **%D** , I got error as: `The date '05/14/1981' is not valid. Valid forms for a date type are YYYYMMDD, YYYYMMDDHHMMSS, or HHMMSS` For format string as **%m"/"%e"/"%Y** and **%m/%e/%Y** , again the above error message. As from the error, I cannot perform the desired formation. Is there a transformer available in FME Workbench to perform desired format conversion? Or should I try something like using **`SubstringExtractor`** and then **`StringConcatenator`**? I need to read the documentation thoroughly to see if I can get it working. Thanks


title: How Do I Debug QuickExport Parameters in the Data Interoperability Extension for ArcGIS 10 to Exporting to Postgres

text: I tried to configure the QuickExport parameters by examining the log file after I used the QuickExport tool itself. The only things I changed from the log file are the parameters as I want the user to be able to input the parameters to connect to a postgres database after they create it and pass in a layer. Any suggestions on debugging this? I didn't get any syntax errors, but if the tool didn't work I made it throw an exception.               arcpy.QuickExport_interop(layer, POSTGIS, dbname,"RUNTIME_MACROS,""HOST,%s,PORT,%d,USER_NAME,%s,PASSWORD,%s,GENERIC_GEOMETRY,no,\     LOWERCASE_ATTRIBUTE_NAMES,Yes"",META_MACROS,""DestHOST,%s,DestPORT,%d,DestUSER_NAME,%s,DestPASSWORD,%s,DestGENERIC_GEOMETRY,no, \     DestLOWERCASE_ATTRIBUTE_NAMES,Yes"",METAFILE,POSTGIS,COORDSYS,,__FME_DATASET_IS_SOURCE_,false" %((server),(portnum),(usrName),(passWord),(server),(portnum),(usrName),(passWord)))


title: ArcGIS Geoprocessing Services - Don't work if 'Run python script in process' not checked

text: I have a standard geoprocessing toolbox that I am exposing as a geoprocessing service. The tools in this toolbox are plain 'ol python scripts. All of this is being done in ArcGIS 9.3.1. As a standalone toolbox run in the desktop environment, all of the tools execute flawlessly. However, as soon as I try to execute the same 'tools' as exposed through the geoprocessing service, all type of weird stuff happens. Among other things, the script stops executing abruptly, without throwing any type of error. In turn, the client never gets a notification of success or failure... After many days of head scratching, I have become aware of a property of script tools - the 'Run Python script in process' option. From ESRI's standard web help: > Running in-process requires that all modules loaded with the Python import > directive have the necessary logic to enable them to run in-process. All > standard Python libraries, such as os, string, and time, have the necessary > logic. However, non standard modules obtained from third parties may not > have the necessary logic to run in-process. If you are experiencing > unexplainable problems when your script runs, try unchecking the in-process > option and running your script again. If the problem goes away when running > out-of-process, then there is most likely an issue with one of the modules > you imported. In this case, leave the option unchecked. Sure enough, my scripts do make use of 3rd party libraries, so I was thinking I finally figured it out - uncheck that option and all my problems should disappear. Well, if I uncheck the option and expose tool as gp service - it fails immediately with the "Error Executing Task Error Code 500". Instead of making half-way through the script - it just bombs immediately. Does anyone know if it is possible to run geoprocessing services "out of process"?


title: Why is the map content not displayed when I reopen Print Composer?

text: I just updated from QGIS 1.7 to 2.0 on Mac. When I now open a project and create a map in the print composer the content of the map is lost when I open the project again later. The settings of the stored print are still ok, but the map content is not displayed. Instead it just says "Karte wird hier gedruckt" which means "map to be printed here" in English. Does anybody have an idea what the problem could be? It always worked fine with 1.7. Thanks a lot in advance!


title: Geoserver cut off symbols close to tile edges

text: When I use specific icons for point display using geoserver, several icons are cropped automatically. This is may be because of tile size or else. Please provide details, how to resolve this. ![IMG](http://i60.tinypic.com/ezmi3d.jpg)


title: Interactive Exports from GIS

text: I'm looking for suggestions of interactive exports from GIS software. The need for this research is that many of our customers either do not have access to GIS or the knowledge to use it. One method I have explored is the use of Interactive PDFs. But the set up of these is particularly difficult as the outputs contain a huge number of layers! Do you know of any other exports which for example have points linked to table of data when clicked on?


title: WFS layer seems not work with Geoserver 2.2 RC1 and openlayers - updated

text: I have a Openlayers+Geoserver application. Now I'm trying to move the application on a new server with the new GEOSERVER 2.2 RC1. With the Geoserver ver. 2.1.0 i was able to show the WFS-T layer, while now, there is something different and with GeoServer 2.2 the WFS-T Layes seem not to work propertly: i can't load the layer at all. I use the following code in the openlayers map.js file:                //wfs-t editable overlay      var v1497_shp = new OpenLayers.Layer.Vector("v1497_shp", {          strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy],          //projection: new OpenLayers.Projection("EPSG:26910"),          protocol: new OpenLayers.Protocol.WFS({              version: "1.1.0",              // loading data through localhost url path              url: "http://151.12.58.246/geoserver/wfs",              featureNS :  "http://www.opengeospatial.net/cite",              maxExtent: mapextent,              // layer name              featureType: "v1497pol_wgs84",              // geometry column name              geometryName: "the_geom",              schema: "http://151.12.58.246/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=cite:v1497pol_wgs84"          })     });      if i browse to:                http://151.12.58.246/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=cite:v1497pol_wgs84      i have the result:               <xsd:schema xmlns:cite="http://www.opengeospatial.net/cite" xmlns:gml="http://www.opengis.net/gml" xmlns:it.geosolutions="http://www.geo-solutions.it" xmlns:nurc="http://www.nurc.nato.int" xmlns:sde="http://geoserver.sf.net" xmlns:sf="http://www.openplans.org/spearfish" xmlns:sitap="http://151.12.58.246:8080/geoserver/wfs" xmlns:test_ws="http://test_ws" xmlns:tiger="http://www.census.gov" xmlns:topp="http://www.openplans.org/topp" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.opengeospatial.net/cite">     <xsd:import namespace="http://www.opengis.net/gml" schemaLocation="http://151.12.58.246:80/geoserver/schemas/gml/3.1.1/base/gml.xsd"/>     <xsd:complexType name="v1497pol_wgs84Type">     <xsd:complexContent>     <xsd:extension base="gml:AbstractFeatureType">     <xsd:sequence>     <xsd:element maxOccurs="1" minOccurs="0" name="codvr" nillable="true" type="xsd:decimal"/>     <xsd:element maxOccurs="1" minOccurs="0" name="uso" nillable="true" type="xsd:int"/>     <xsd:element maxOccurs="1" minOccurs="0" name="objectid" nillable="true" type="xsd:decimal"/>     <xsd:element maxOccurs="1" minOccurs="0" name="area__mq_" nillable="true" type="xsd:double"/>     <xsd:element maxOccurs="1" minOccurs="0" name="perim__m_" nillable="true" type="xsd:double"/>     <xsd:element maxOccurs="1" minOccurs="0" name="the_geom" nillable="true" type="gml:GeometryPropertyType"/>     </xsd:sequence>     </xsd:extension>     </xsd:complexContent>     </xsd:complexType>     <xsd:element name="v1497pol_wgs84" substitutionGroup="gml:_Feature" type="cite:v1497pol_wgs84Type"/>     </xsd:schema>      but if i load the map nothing appear. In the firebug console i have no error. When i load the page i can see the POST request loading but after few minutes, it simply stop to charge. Do you know what i have to change (in openlayers or directly in geoserver) in order to let the code work? Thank you * * * UPDATE: i've installed the 2.1 version of Geo Server and i've configured it with the same layer from the db store. Then i've launched the php file test and.. it worked!! This demonstrated that the problem IS NOT the proxy. Now i have to make it working propertly also with the 2.2 version of Geoserver. Do you know if is there something to activate in order to show the wfs layer? maybe there are some configurations in the layer/stores/workspaces? PS: the net-tab of firebug says "502 Bad gateway" (after 10 minutes where you can see only a turning wheel) * * * UPDATE (important): In the new version of Geoserver 2.2 there is a new flag on the workspace definition. The flag is labelled as "enable" and it is under a section called "settings". When you check the "enable" a form with the contact details (?) for the workspace. At the very bottom of the form, there is a field called "Proxy Base URL". If you write there the address of the proxy `(for example: http://localhost/cgi-bin/proxy.cgi?url=)` the wfs layer works fine in localhost. Now the problem is to make the layes working also from a remote pc. i don't understand what i should write in the field "proxy base url" and there are no information in the release note of the GS new version. i've tried to put               http://151.12.58.246/cgi-bin/proxy.cgi?url=       but without results.. if i fill the field with               http://151.12.58.246/cgi-bin/proxy.cgi?url=       or               http://localhost/cgi-bin/proxy.cgi?url=       i receive in the firebug net tab the same message: "Aborted". Any suggestion?


title: How to get location of Milestones from Linear referenced data?

text: I have shapefile of highways, where each segment has the information indicating the starting mile and ending mile. Using these fields, I have created Routes, using the 'Create Route' gp tool from the ArcGIS Linear Referencing Toolbar. From this route, I want to create a shapefile/featureclass indicating the location of each milestone (placed at the integer miles; i.e 5, 6, and so on). How do I do this? The only way I could find was to create a dummy table and then use the 'Make Route Event Layer'; But this requires to enter all the values in the table. Is there a better way to do this?


title: Python batch text replace crashes some ArcGIS10 MXD on reopen

text: In an attempt to teach myself some Python, I am writing a script that will loop through a netwrok directory for all MXDs and when found, replace layout text elements with dynamic text element equivalents (document path and copyright year in this case). My code is below and it does work. However, some (not all) MXDs "serious application error" crash upon reopen. A trip through the MXD Doctor app will fix whatever the critical error is, but I have not identified the issue. These MXDs open without problem before running the Python script. The only potential culprit I can see so far is that the crashing MXDs have a raster layer reference to a network drive letter that no longer exists. This leads to a number of questions on potential stratagies to fix... 1) Should I be using a different Save methodology through Python? 2) Is there a way to create an exception for this (potential) problem? I'm not sure I'm ready to do that - I'm not looking to create code to fix broken links. I just want to repalce layout text. 3) As the depreicated drive letter should noto be a common issue, what are the thoughts on leaving the issue and just fixing any broken MXDs as they arise? Thanks               # Author:  HDG     # Date:    June, 2012     # Version: ArcGIS 10.0     # Purpose: This script will perform a search and replace on page layout text     #          elements to replace old Copyright and Pathname text with new Dynamic text     #          Much code borrowed and edited from Esri ArcPy examples          import arcpy, string, os           #Read input parameters from script tool     folderPath = arcpy.GetParameterAsText(0)          # Existing Map Path is a named text element.  Search for name and replace text value     txtDSName = 'COS_DateTimeStamp'     newDSText = 'Map Document: <dyn type="document" property="path"/>  <dyn type="date" format="short"/>  <dyn type="time" format=""/>'     # difficulties encoding the '©' symbol, so brute force searched for each year - not elegant, but effective     txtCopyright12 = '2012 <Company Name Here>'     txtCopyright11 = '2011 <Company Name Here>'     txtCopyright10 = '2010 <Company Name Here>'     txtCopyright09 = '2009 <Company Name Here>'     txtCopyright08 = '2008 <Company Name Here>'     newCopyright = '<dyn type="date" format="yyyy"/> <Company Name Here>'          try:         #Loop through each MXD file         for filename in os.listdir(folderPath):             fullpath = os.path.join(folderPath, filename)             if os.path.isfile(fullpath):                 if filename.lower().endswith(".mxd"):                     #Reference MXD                     mxd = arcpy.mapping.MapDocument(fullpath)                     mxdName = filename                     #Find the text elements and replace with new Dynamic Text                     for elm in arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT"):                              #Map Path                         if elm.name == txtDSName:                             elmText = elm.text.replace(elm.text, newDSText)                             elm.text = elmText                         #Westwood copyright                         if txtCopyright12 in elm.text:                             elmText = elm.text.replace(txtCopyright11, newCopyright)                             elm.text = elmText                         if txtCopyright11 in elm.text:                             elmText = elm.text.replace(txtCopyright11, newCopyright)                             elm.text = elmText                         if txtCopyright10 in elm.text:                             elmText = elm.text.replace(txtCopyright11, newCopyright)                             elm.text = elmText                         if txtCopyright09 in elm.text:                             elmText = elm.text.replace(txtCopyright11, newCopyright)                             elm.text = elmText                         if txtCopyright08 in elm.text:                             elmText = elm.text.replace(txtCopyright11, newCopyright)                             elm.text = elmText                          mxd.save()                     del mxd              del folderPath, fullpath          except Exception, e:         import traceback         map(arcpy.AddError, traceback.format_exc().split("\n"))         arcpy.AddError(str(e))


title: Java Script API V3.6 displays base maps in a chequered pattern

text: I am currently running ARC GIS for Server 10.1 on an intranet. I have installed the Java Script API V 3.6. I am currently trying to view a cached image service using the Java Script API. When the service loads the tiles do not load in their proper places. Does any one know a fix for this?


title: ArcObjects : How to change layers connection properties without losing joins

text: I'm using arcObjects 9.2.6 java librairies to change connection/path properties within a java prog. This prog aims to change path and connection properties for all layers of an mxd file. It works well with Layers wich use Shape file. It also works well with layers from Database whith no joins. However when a joins to another table exists on layers it does not work. what i do for database layers is :               dataSetName = datasetName.getName();     propertySet = (IPropertySet) new PropertySet();     propertySet.setProperty(SDE_SERVER, properties.get(SDE_SERVER));     propertySet.setProperty(SDE_INSTANCE, properties.get(SDE_INSTANCE));     propertySet.setProperty(SDE_DATABASE, properties.get(SDE_DATABASE));     propertySet.setProperty(SDE_USER, properties.get(SDE_USER));     propertySet.setProperty(SDE_PASSWORD, properties.get(SDE_PASSWORD));     propertySet.setProperty(SDE_VERSION, properties.get(SDE_VERSION));     workspaceNameCible = (IWorkspaceName2) new WorkspaceName();     workspaceNameCible.setWorkspaceFactoryProgID(SDE_SOURCE_ID);     workspaceNameCible.setConnectionProperties(propertySet);     datasetName.setWorkspaceNameByRef(workspaceNameCible);     if (dataSetName.contains(".")) {       datasetName.setName(dataSetName.replaceAll(dataSetName.substring(0, dataSetName.indexOf(".")), properties.get(SDE_USER).toString()));     }      This correctly changed the connection information of the layer but not the joins. For example if my layer contains a join on a table identified by sde_user.my_table and i execute the code to change the sde_user to sde_user2, the layer will have sde_user2 but the joins still remains on sde_user.my_table (where i expect sde_user2.my_table). I've searched how to get the joins from the layer and see if it is possible to change their connection properties but i've found nothing. Any suggestions ??


title: proj.4 definition for Moscow GCS_Bessel_1841 to WGS84 convertion

text: I'm developing an app which should show a map using Leaflet framework but i have no luck as the coordinate system on the map server differs from the one used by Leaflet.   1. As a map server i use Arcgis which is accessed by means of REST interface   2. The coordinate system used by the server is GCS_Bessel_1841. WKT definition: `GEOGCS["GCS_Bessel_1841",DATUM["D_Bessel_1841",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",37.5],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",55.66666666666666],UNIT["Meter",1.0]`   3. I use proj.4 to convert GCS_Bessel_1841 to WGS84 (used by leaflet) but can't figure out how to make a correct definition especially how to write +towgs84. The question is how to figure out the values for DX,DY,DZ,RX,RY,RZ. The afterall my proj.4 defitiion looks like: +proj=tmerc +lon_0=37.5 +lat_0=55.66666666666666 +ellps=bessel +towgs84=0,0,0,0,0,0,0 +a=6377397.155 +b=6356078.962818188 +pm=greenwich +k_0=1 +x_0=0 +y_0=0 +units=m +no_defs The Leaflet code: `var crs = new L.Proj.CRS('EPSG:3857', '+proj=tmerc +lat_0=55.66666666666666 +lon_0=37.5 +k=1 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs', { origin: [-5622500.0, 3830200.0], resolutions: [ 305.74811314055756, 152.87405657041106, 76.43702828507324, 38.21851414253662, 19.10925707126831, 9.554628535634155, 4.77731426794937, 2.388657133974685, 1.1943285668550503, 0.5971642835598172, 0.29858214164761665, 0.14929107082380833 ] }); var map = new L.Map('map', { crs: crs }); var tileUrl = 'http://egip.mka.mos.ru/arcgis/rest/services/osnova_wgs_cached/MapServer/tile/{z}/{y}/{x}', attrib = '(C) 2012', tilelayer = new L.TileLayer(tileUrl, { maxZoom: 12, minZoom: 0, continuousWorld: true, attribution: attrib, }); map.addLayer(tilelayer); map.setView([ 55.750984, 37.617571], 0); map.on('mousemove', onMapMouseMove);' `


title: OWSLib vs shp2img output of MapServer Layer

text: I'm working on a map layout engine using Python and ReportLab and have come across a problem and was wondering if anyone can give me some insight. Scenerio: I'm trying to generate an image using OWSLib (see example code). The layer that I'm trying to render has an opacity of 40%. When I generate the image using the sample code the background is transparent but the features are not but if I generate the image using shp2img -m /www/cgi- bin/mapfiles/40e6b3a8.map -o test.png the features are 40% opaque. Any ideas how I can make this work using OWSLib or if I'm doing something wrong? Thank you for any help. **OWSLIB EXAMPLE CODE**               from owslib.wms import WebMapService     wms = WebMapService('http://localhost/cgi-bin/mapserv?MAP=/www/cgi-bin/mapfiles/40e6b3a8.map&', version='1.1.1')     img = wms.getmap(   layers=['vlyr_oqiJw4Ib4U'],         srs='EPSG:26910',         bbox=(685400,5616300,689500,5619500),         size=(800, 600),         format='image/png',         transparent=True     )     print(img.geturl())     out = open('c:/temp/test2.png', 'wb')     out.write(img.read())     out.close()


title: How do I define a bounding box within a WFS-request?

text: I need to get some data from via a WFS connection but due to the sheer size of the data, it takes for ever to load into Qgis or MapInfo. MapInfo has a feature which allows you to restrict the wfs request to 'current mapper' and only get the data the are visible in the current window. I know, that I am supposed to be able to define the Bounding box withing the WFS-url, but I can't get that working. Is there anyone out there that knows how to do that? I hope I made myself clear :)


title: Images in map layouts

text: I wanted to place some images in my map layout but I found that images are not embedded in the MXD files so now, after I deleted them, I've lost the graphics and have to do them again. Is here any way to embed the image in the MXD files itself? If not, where would you suggest I place the images; the geodatabase that comes with the map(s)?


title: Is it possible to query a MySQL database using the results from map.getBounds() with Google Maps API v3?

text: I have a MySQL database that contains a large number of polygons, one for each district on a map. They are all quite complicated and it's unrealistic to simply load them all at once. I've looked into using MarkerManager for Google Maps API v3 and this seems to be working as intended. However I'm not sure how to best go about querying my database for polygons that are in the viewport. I'm thinking that it would be best to store the center of each polygon in a separate column as a simple lat,lng pair so that a query could be run on that - and then return the full polygon. What is the best way to go about this?               SELECT * FROM polygons WHERE [the center of each polygon is within the bounds of the viewport]      Is this even possible? Am I going about this the wrong way? And additionally, is there a simple script I can run on my data to return the center of each polygon?


title: How to rotate polygon

text: how do i rotate a polygon drawn from the Create Features menu?


title: Alternative to RemoveOverlap in Business Analyst

text: Is there an alternative process or function that will remove overlap similar to RemoveOverlap in Business Analyst? I do not have a business analyst license. Thank you


title: Create a band mask based on pixel locations, not in pixel values

text: I have this image loaded in QGIS, with two possible values for the pixels: 1 = orange, 2 = blue![image_loaded_in_qgis](http://i.stack.imgur.com/YZJIY.png) For simplification, assume it represents a province of a country. I want to extract just the part of the image included **inside** the limits of the province. **Regardless the value of the pixels**. I guess I should use a mask for that, but I don't want to mask pixels based on their values. I want to mask the pixels based on their location (inside or outside the limits of the province). The image is not from a real province. So, **I don't know the limits** (in that case, I could spatially intersect the raster with the known limits). One approach would be vectorize this image to get the limits of the fake province as a geometry. That would make things easy. But I'm not sure about how to face that task. So, suggestions are welcome. Many thanks in advance.


title: Stereo 70 where is it?

text: I have ortho photos of Romania in Stereo 70 and GPS data in WGS84 of the same country : I want to associate the two series of data. At the moment, I can't find Stereo 70 in the list of CRS : does it exist ? Thanks for your answer.


title: How do I know the cause of my spatial error?

text: A (probably?) very basic question about spatial error it's about time I knew how to think about and answer correctly. I have some data plotted from XY coordinates. I look at them and it turns out they appear in places where they shouldn't -- but only by a little bit. E.g. in the image below, the points appearing on land along the sides should be in the water.![enter image description here](http://i.stack.imgur.com/2I5xf.jpg) The errors range from maybe 15 meters to 140 meters ... but usually about 30-50 m or so. How do I know why these are off and if there's any way to fix it? Is it: 1). Because I've incorrectly defined my coordinate system somewhere along the way? (I'm not sure if the original coordinate system of the points is known). But then, wouldn't they be astronomically off target, not by just 40 meters? Plus, it doesn't look like shifting them all in the same direction would fix the issue. 2). Because the resolution of the base layer doesn't capture the shoreline well enough and the points end up looking like they're on land? I've tried it with several sources for the background and none seem to match. 3). Error inherent to the GPS unit used to capture the points? I thought 100+ meters was a little high for anything above recreational-grade. How do I know what's causing this? Have I done something wrong (#1) or is this sort of thing inevitable sometimes? How do I adjust for it to represent these points correctly, or verbally state an appropriate caveat about the accuracy?


title: Python and gdalwarp: change resolution of raster

text: I am new to GDAL and have been having some hard time figuring out how to change a raster's resolution and how to align it to another existing raster. I have come to the point where I have a raster made of a numpy array class. I exported it into an ASCII file. It looks similar to this (as an example, this is the ascii file)... test.txt:               ncols 4     nrows 4     xllcorner 20     yllcorner 8.5     cellsize 0.5     nodata_value -9999     0.1 0.2 0.3 0.4     0.2 0.3 0.4 0.5     0.3 0.4 0.5 0.6     0.4 0.5 0.6 0.7      As you can see, it contains no projection information. On the other side I have an existing raster saved on the computer which is in WGS84 UTM32N, and has a different resolution. I tried to google around to find how I can use GDAL to change resolution of the ASCII raster while aligning it to the existing raster on my computer. Does the ASCII raster need to have some projection data or other kind of information? Could somebody explain to me how to use `gdalwarp` with Python?


title: Beginner PostGIS question: getting geometry from multiple tables

text: I am very new to PostGIS, PostgreSQL, and SQL in general. I have 44 tables in my PostGIS database, and each one represents a different layer of vector data. Each was loaded from a separate shapefile, and each has a column that describes the geometry for that layer, called `wkb_geometry` I want to select a specific polygon on one layer, and then retrieve ALL the geometry from a subset of layers that overlap that polygon's bounding box. I'm not feeling picky about the order coming out, but it would be helpful if it was organized by the tables each group of geometry came from. Here's a sample of my SQL statement:               SELECT         ST_AsEWKT(wkb_geometry) /* Some of this data has z values, hence the EWKT */     FROM         table2, table3, table4, table5     WHERE          wkb_geometry &&             (             SELECT                 wkb_geometry             FROM                 table1             WHERE                 ogc_fid = 25             );      which returns an error:               column reference "wkb_geometry" is ambiguous     /* note that every table that I am selecting from has a "wkb_geometry" column */      Clearly I am writing some foolish SQL. What is the right way to do this?


title: Best example of a GIS project gone wrong

text: I would like to know some examples of GIS projects that have gone wrong. i.e. Bad decisions would/were made, based upon the GIS output from that project. I am not looking at naming and shaming anyone, so if it is a company you have worked for, please keep any names out of it, and disguise the story where necessary. I am sure there must be quite a few major public examples? e.g. A disaster mgmt project, gone wrong due to bad or out-of-date data. I admit, it is a fairly subjective question with no right answer. Therefore, I will let the votes do the talking, and if someone could convert to c-wiki if need be. Personally, I will get great benefit from this, and I will be passing the examples on when teaching GIS.


title: ArcGIS- load multiple raster files from list

text: Good morning, Today's question is: how to select and load multiple rasters from one folder in Arc? My situation is probably familiar to some of you. I do have 3 folders with houndreds of maps in it. I do have also overview sheet, which helps me generate list of rasters that I need. How do I select them automatically from houndreds of others? Its an issue which occurs for me from time to time. Manual selection is really inconvenient. Thanks


title: One dimensional map of the world?

text: Bit of a strange question but hope this is OK to ask here. Has anyone heard of a '1-dimensional' projection of the world map - that is mapping all the points on the globe to a single line? I was thinking of doing such a thing - trying to keep cities that are 'close' on the globe 'close' on the line. Before I do this, I wondered what the state of the art might be in this area?


title: Transform polygon to equivalent circle, QGis

text: I have a polygon and I'd like to find the radius of an equivalent circle from a particular point within the polygon. The polygon would have a large (infinite) number of points evenly distributed accross it. I am working in QGis so if there's a solution for this it would be great. Or, to put it another way: What is the average distance from a point in a polygon to every other point within the boundary of the polygon? A circle, I believe, would give the shortest distance, but a rectangle with one long edge and one short edge would give the longest distance. Edit 1: @Whuber - For your edit 2 this is what I picture. I can't see how this is not the area under b between x=1 and x=0. ![enter image description here](http://i.stack.imgur.com/l3Zc6.png)


title: How to open image file saved with JAI in Geotools?

text: I need to find NDVI and other vegetation indices and then find changes in time with tif images. I've been using Geotools for this. I took 2 tiff images, then using QGIS I changed them to PNG because original ones are huge. Then taking those 2 PNGs I created NDVI image using JAI. The problem is that I couldn't show this file with Geotools. You can look at the code here:               private void constructNDVI(File band3File, File band4File)             throws IOException {         PlanarImage iNIR = JAI.create("fileload", band3File.getAbsolutePath());         PlanarImage iVIS = JAI.create("fileload", band4File.getAbsolutePath());         // The pixels on those images must be processed as floating-point         // values!         ParameterBlock pbConvert = new ParameterBlock();         pbConvert.addSource(iNIR);         pbConvert.add(DataBuffer.TYPE_DOUBLE);         PlanarImage NIR = JAI.create("format", pbConvert);         pbConvert = new ParameterBlock();         pbConvert.addSource(iVIS);         pbConvert.add(DataBuffer.TYPE_DOUBLE);         PlanarImage VIS = JAI.create("format", pbConvert);         // Calculate the denominator (NIR-VIS).         ParameterBlock pbd = new ParameterBlock();         pbd.addSource(NIR);         pbd.addSource(VIS);         PlanarImage denominator = JAI.create("subtract", pbd);         // Calculate the numerator (NIR+VIS).         ParameterBlock pbn = new ParameterBlock();         pbn.addSource(NIR);         pbn.addSource(VIS);         PlanarImage numerator = JAI.create("add", pbd);         // Calculate the NDVI.         ParameterBlock pbNDVI = new ParameterBlock();         pbNDVI.addSource(denominator);         pbNDVI.addSource(numerator);         PlanarImage ndvi = JAI.create("divide", pbNDVI);         DisplayNBImage disp = new DisplayNBImage(ndvi);         String filename = new Date().getTime() + ".png";         JAI.create("filestore", disp.getSurrogateImage(), filename, "PNG");         File file = new File(filename);         showNDVI(file);     }      You can find DisplayNBImage here.               private void showNDVI(File file) throws IOException {         AbstractGridFormat format = GridFormatFinder.findFormat(file);         AbstractGridCoverage2DReader reader = format.getReader(file);         ...         final MapContent map = new MapContent();         map.setTitle("ImageLab");         map.addLayer(rasterLayer);         ...         JMapFrame frame = new JMapFrame(map);         ...      I can open the file I've created in constructNDVI method in Windows Photo Viewer or QGis. But 2nd line in showNDVI gives               Exception in thread "main" java.lang.UnsupportedOperationException: Trying to get a reader from an unknown format.      I've tried bmp, tiff but no luck. How can I overcome this? In fact, proposing non-Jai way of the same thing would be awesome.


title: JavaScript library to read data from a WFS server?

text: Is there a JavaScript library available to read data from a WFS server?


title: How to find the nearest city for a POI in a OpenStreetMap/PostGIS database?

text: I'm interested in finding additional data for the POIs in OSM database. Currently I can use the following SQL for getting the name+long+lat for all the POIs               SELECT name,               x(transform(way, 4326)) AS lon,               y(transform(way, 4326)) AS lat       FROM planet_osm_point        WHERE tourism='museum'     UNION       SELECT name,               x(centroid(transform(way, 4326))) AS lon,               y(centroid(transform(way, 4326))) AS lat       FROM planet_osm_polygon        WHERE tourism='museum'      I would also like to have the name of the nearest town/city or the town/city the POI is situated in.


title: Building attribute table from raster in ArcMap 10.1

text: I have a NetCDF file containing the latitude, longitude and porosity for the entire US. I am trying to add another value (wilting point) which depends on the porosity. I wanted to extract the netcdf to a table, add a new field and then use the field calculator to to fill the values on the new field. But when I import it, I only get one set of values on the table. I tried approaching it the other way: extracting the NetCDF to raster (which works fine) and extracting the values from the raster using "build raster attribute table" but i get an error message saying "Only single band integer raster dataset is a valid input". it doesn't make sense as the raster is a single band raster (I double checked the properties> number of bands of the raster). HOw can I build a table containing all the entries in the NetCDF file? Thank you for your help.


title: Personal Geodatabase not recognized when connecting to folder

text: I am trying to connect to a personal geodatabase I created in Catalog. When I navigate to the location of the geodatabase, it isn't displayed. It seems to not be recognized. Any ideas?


title: MgSiteConnection error Autodesk MapGuide 2011 to AIMS 2014

text: I am currently upgrading my project from Autodesk MapGuide 2011 to AIMS 2014(C#,ASP.NET Project, SQL Server 2008R2) I have changed the server site URL from mapguide2011/mapviewerajax/?SESSION=<%=Session["sid"]%>&WEBLAYOUT=<%=Session["layou... to "http://xxxxx.com/ **mapserver2014** /mapviewerajax/?SESSION=<%=Session["sid"]%>&WEBLAYOUT=<%=Session["lay...> and web.config from path from to When I run the application the map loads fine the first time but when I perform a select/get selected feature operation then I run the code                   String mgSessionId = Session["Session"].ToString();         String mgMapName = "map";         String configPath = ConfigurationManager.AppSettings["WebConfigPath"];         MapGuideApi.MgInitializeWebTier(configPath);         MgUserInformation userInfo = new MgUserInformation(mgSessionId);         MgSiteConnection siteConnection = new MgSiteConnection();         siteConnection.Open(userInfo);      the siteConnection.Open(userInfo) throws an error " **Session has expired or is invalid. Please log in again** " Therefore I am unable to get the selected object from the map, Please suggest/guide me as to how I can hadle this Regards Santosh V


title: Batch renaming of shapefiles using ArcPy and folder name where shapefile is stored?

text: I am very new to Python and wondered if anyone had any idea how to do this? I have ~100+ shapefiles named 'land boundary' within the folder of their site name. Is this possible using Python in ArcGIS?


title: Part of layer cut/disappears after exporting to pdf in QGIS

text: This is driving me crazy. The picture says it all: [ http://oi60.tinypic.com/2m5fbd1.jpg ]. You can see whole layer in QGIS browser and Composer, but when i export to pdf some layers are cut. I have tried moving the cut layers to the top of a layer tree, tried disabling labeling, tried to export them one by one, tried exporting to image and everytime the result is same. This somewhy happens to only a few random layers. Why is this happening?


title: How to render overlapping bus trips as one route from OSM?

text: I would like to create bus map for my city from OSM data. I imported data into Postgresql with osm2psql and I can render routes with Mapnik. But the problem is that same route ref is shown multiple times and very close together. I think this is because each bus route is made from multiple trips. For example bus line 4 has 11 different stop combinations but most of them go through same stops only in different order. ![Multiple route names in same route](http://i.stack.imgur.com/iSAj9.png) My question is how to avoid repeating name of the same route multiple times by any means necessary. (preprocessing XML, different SQL, carto css attributes) I found a post aboutOverlapping lines but this are lines from different routes and a different problem. I fixed this a little by select distinct(way) but it isn't great. I found out about ST_DIFFERENCE Postgis function but I don't know how to construct SQL that would create difference of all different trips on same route joined them and represents them as one. I read similar question and added `text-clip:true` and `text-avoid- edges:false` to `#Routes`, `buffer-size:768` to `Map` and changed MetaTile to 8 with no visible differences. I render map with Tilemill with this cartocss:               #Routes {       line-width:1.5;       line-cap: round;       ::labels {         text-name: "[ref]";         text-face-name: "Trebuchet MS Regular";         text-placement:line;       }     }      I select bus routes from DB like that:               (select distinct on (way)   way, ref from planet_osm_line WHERE "route" = 'bus'  order by way, ST_LENGTH(way) DESC) as buses


title: What is the default projection in Leaflet?

text: I've read an API documentation for Leaflet on its site, but I can't realize: what is a default projection to view maps? It was written about spherical and elliptical Mercator and Equirectangular - so which of this three? Or does it depend on tile server I use, or it doesn't depend since leaflet reproject tiles instantly on-the-fly before adding on the screen? Actually i can't understand what projection i need to save geoJSON files in QGIS. To display correctly on the leaflet map, json coords should be lat-long, not x-y. But if i try to save it in Equirectangular - coords will be x-y..?


title: Geoserver store is not displaying

text: After moving the workspace directory from one geoserver to another (Geoserver 2.4.4) I can't able to see my store name. Only workspace is visible. Is there any method to enable store. In store.xml it is enabled !!


title: Problems on startup with GeoServer

text: I hope this is the right place to ask, I was referred here from a topic on SO. The same topic pointed me towards using GeoServer to create maps with overlaid tracks on. I have unpacked the .war file onto my tomcat server but am getting a number of errors as listed in my catalina.out file. Having never used GeoServer before it doesn't really mean much to me at all. Does it make sense to anyone else: http://pastebin.com/JNkWdVER Thanks in advance for any light you can shed and help me get this working.


title: Is it possible to convert map tick into feature class easily?

text: I have to design a lot of map into the following layout for forest carbon inventory survey: --There will be a grid set in the map 30 second by 30 second (these are straight lines crossed) --There will exist points (on the grid intersection) symbolized based on the layer land use type which is another polygon layer Please see image-- ![Map Demand](http://i.stack.imgur.com/wxk8Q.png) > > I tried fishnet in both arc map and X tool, but there is no way to set 30 > seconds interval exactly-- i think this is error prone >> >> I tried Exporting and using Arc Scan to get the point-but problem is Arc scan limited to poly-line not point what i need. >> >> After georeferencing, i tried to use spatial join this point layer with land use layer and symbolized accordingly Is there any easy way to do this.. Thanks in advance


title: Adding MrSid to QGIS

text: I'm fairly new to QGIS and was hoping someone could help me load some MrSID photos into QGIS. I have read some posts and have installed the OSFEO4W Installer and selected the GDAL-MRSID Lib. I also have the GDAL plugin installed. However, after it installed I rebooted but have the same result. I know the .sid file is good because I can load it into MapWindow without any issues. Any help would be greatly appreciated.


title: QGIS 2.0: move basemap by hand in order to achieve overlaying with a point layer

text: I am an environmental engineer and the aim of my QGIS 2.0 project is to visualize the results of a sewage water system inspection. In a first step I included the hoppers from a csv file and added a google streets layer. ![enter image description here](http://i.stack.imgur.com/51OkA.png) As you can see in the picture the hoppers don't overlay with the base map. I compared to the coordinate calculation of a mountain climber page (http://www.deine-berge.de/Rechner/Koordinaten/Sandersdorf,-06792-Sandersdorf- Brehna,-Deutschland), which confirms the on the fly crs transformation of qgis 2.0. So the coordinates of the hoppers are may wrong. However it is the only csv data I have and in the GIS system of our branch office it fits to the base map. **My question to you is the following: Is there a possibility to move the base map by hand in order to achive an overlaying?** For my purpose I don't need an exact fitting, but a difference of 500 m is too much. Thank you in advance for your efforts


title: Is there an iOS app to display several offline raster maps with transparency?

text: There are several iPhone apps displaying offline maps. Some of them can show custom maps, for instance loaded as MBTiles or sqlite files. Galileo-app does this pretty well. But it is only possible to display **only one** tiled map at a time. I need to display **several tiled raster layers** (say 3 or 4) with a **transparency** (for instance with an opacity control slider for each layer). My rasters are hand drawn tracks (black 'wire' on white/transparent background), old maps tiles and openstreetmap tiles. Goal: find my way by crossing information from those georeferenced maps. TiledMap app looks to be doing this, but is missing from iTune (dev account not renewed). Is there any iOS app doing this? (Otherwise I would have to code one, but this is too much work) Thanks


title: Reprojecting in postGIS from 900913 to 4326. Wrong coordinates

text: I'm working with postGIS 2.1 I have a table called 'xacementos' created with the srid: 900913. I took the points coordinates from google maps and I want to convert them to SRID:4326 to show the points in a map created over leaflet. (if a input the 900913 coordinates as geoJSON in the leaflet code the points show a little bit displaced) I'm using the function ST_Transform: SELECT ST_AsText(ST_Transform(geom,4326)) FROM xacementos WHERE enderezo='Rua Franja 9-11'; but the coordinates that show up are not correct: "POINT(-7.54315344075162e-005 0.000389606525237254)" The input coordinates in the 900913 srid are "POINT(-8.397 43.3708)" I'm newby in this postGIS stuff and I'm not sure if i'm following the right path. Any suggestion??


title: Points Solar Radiation reformat problem

text: I am trying to produce a set of monthly solar radiation maps based on a monthly parameterization of the diffuse proportion and transmissivity (i.e. new values for both parameters each month). The PointsSolarRadiation function in arcpy produces a full year of monthly radiation values for each function call (i.e. 12 months all based on the same diffuse proportion and transmissivity values). I am trying to extract only the specific month from each of the twelve output files (i.e. extract the "April" data from the file run using the "April" parameters). To do this I have a subsequent for loop which calls the individual files, identifies the appropriate data column in the file, extracts the data (using SearchCursor) then appends it to the placeholder. The _append_ method fails on the second iteration, which does not happen if I run this with a simpler example of appending defined lists. My code is as follows:               tableMonthHolder = []     for (j, value) in enumerate(diffuse):         b = str(j)         outFeatures = "c:/.../output" + b + ".shp"         outTableFinder = "T"+b         tableMonth = [row[0] for row in arcpy.da.SearchCursor(outFeatures,(outTableFinder))]         tableMonthHolder = tableMonthHolder.append(tableMonth)      Any advice is greatly appreciated.