title: SpatialJoin with "closest" option ok in python script but not when in arcmap toolbox

text: I have the following problem. I want to create a toolbox to obtain the distance between a polygon (Bldg.shp) and a point (pts.shp). I have started with a simple following python script:               import arcpy          bldg=r"C:\0_prg_dvp\SpatialJoin\Bldg.shp"     Pts=r"C:\0_prg_dvp\SpatialJoin\pts.shp"     Output=r"C:\0_prg_dvp\SpatialJoin\Test"     arcpy.SpatialJoin_analysis(bldg, Pts, Output+".shp", "JOIN_ONE_TO_ONE", "#", "#", "CLOSEST", "#", "HorzD")      All works fine. If I try to modify it to work in a toolbox as follow:                import arcpy           #bldg = arcpy.GetParameterAsText(0)      #Pts = arcpy.GetParameterAsText(1)      #OutputShp = arcpy.GetParameterAsText(2)      #Output="C:/0_prg_dvp/SpatialJoin/"+OutputShp           bldg=r"C:\0_prg_dvp\SpatialJoin\Bldg.shp"      Pts=r"C:\0_prg_dvp\SpatialJoin\pts.shp"      Output=r"C:\0_prg_dvp\SpatialJoin\Test3"                arcpy.SpatialJoin_analysis(bldg, Pts, Output+".shp", "JOIN_ONE_TO_ONE", "#", "#", "CLOSEST", "#", "HorzD")      #arcpy.SpatialJoin_analysis(bldg, Pts, Output+".shp", "JOIN_ONE_TO_ONE", "#", "#")      Arcmap crashes without any error messages, the output file is created but is empty. If I remove the "Closest" option, the toolbox script works fine (but I don't have the distance I want)... Does anyone experienced this and have a fix? Am I missing something? Thanks for your help


title: Setting spatial reference for MapInfo tab-file

text: How can I change spatial reference for tab-file in MapInfo Professional?


title: Changing image projection using Python

text: Image corner coordinates are known:   * Top left: (70.20315, 20.92749)   * Top right: (70.20315, 31.45240)   * Bottom left: (59.70571, 20.92749)   * Bottom right: (59.70571, 31.45240) (Basically map over Finland and a little bit of Sweden/Norway/Russia) I am not sure what is current projection name; +1 in latitude and longitude is constant distance in image (which is not the case with Mercator projection). I couldn't find a way to change image projection to Google maps overlay image, preferably using Python. Python isn't mandatory, but command line interface is. It's possible to do that with pyproj and PIL, but I wasn't able to figure out how to do that. I also found GDAL, and more specifically gdalwarp, but couldn't find options for changing projection in a correct way. ![Example image](http://i.stack.imgur.com/Z7vVf.png)


title: Field Calculator operation is not working

text: I've done this 100s of times and I can't understand why it won't work! I'm trying to copy the first 8 digits of from a HUC 12 (Hydrologic Unit Code) to a new field, which represents a larger watershed HUC 8. Field names:   * WDB_HUC12 Text, length 14   * HUC8 Text, length 8   * **Python Code: !WDB_HUC12![:7]**   * **VBScript : Left([WDB_HUC12], 8)** No error message, but the field remains empty.


title: How to do Kriging using SDA4PP in QGIS?

text: I am trying to do kriging using SDA4PP. I have added a delimitted text layer and wish to krige that. When I try I get an error message from SDA4PP as follows... _This tool requires at least one numeric field. Please add one numeric field to the layer. The layer “(the one I want to kringe)” is excluded from the analysis. Please add point typed vector layer._ Can anyone help?


title: Geoserver - ImagePyramid plugin problem

text: I have a huge Geotiff file , and i've tiled it .. I've created the tiles using gdal_retile.py tool , but i'm getting the following error from Geoserver while linking the layer with the tiles folder : `Could not list layers for this store, an error occurred retrieving them: This plugin accepts only File, URL and String pointing to a file` any suggestion?


title: How can I calculate the number of raster pixels within polygons?

text: I have two layers, flood area (flood.img) as a raster and flow direction as polygons. Would you please help me in calculating the number of pixels in each flow direction polygon? I want to get the percentage of flood area in each flow direction polygon. I use ArcGIS 10.


title: Is it possible to lock a single feature from editing in ArcObjects?

text: We're developing an ArcMap addin. Now we need a way to lock a feature from editing/deleting. Is this possible with ArcObjects or do we have to create our own implementation of locking? **Example:** User A starts editing a feature X. The feature should now be locked from editing by everyone else until user A finishes his/her edit.


title: Merging polygons that intersect by more than a specified amount

text: I am working with a dataset that contains a subset of property boundaries in a local government area, thus my dataset is made up of several thousand properties but not all are touching. Since it is a subset, some of these properties are touching "side by side", some are touching "back to back", some are only touching "corner to corner" and some are not touching any other properties at all. What I need to do is merge (i.e. ST_Union) properties that are either touching "back to back" or "side to side" while leaving the isolated properties or ones only touching "corner to corner" alone. Basically I am looking to amalgamate properties on which development can be continuous. I am trying to accomplish this using Postgres and Postgis. That way I thought I could go about this was to first buffer all the geometries by a small amount, such as 0.5 meters. Then I could perhaps run ST_Union() on the dataset where the intersection of two overlapping buffers is greater than 1 or 2 square metres. This is how I thought I could get around ST_Intersects returning true for properties touching "corner to corner" when I would actually want these left out. The greater the overlap, the more likely the properties are situation "side by side" or "back to back". The issue with this is that when I run the queries they end up taking a really long time and a running this query once does not do the trick. If 3 properties are sitting "side by side", for instance, the query will create a union of the left two and right two, thus creating two overlapping polygons rather than one amalgamated polygon. I will have to run some kind of a loop I think. Does anyone have an easier solution? I haven't done loops in Postgres either and am not sure how to execture one... Cheers, Roman


title: Polymaps + D3+ Polyline with different width and color

text: I am actually working on a project which involves polymaps and D3. I was wondering if you could help me on this. I have 4 locations and I would like to draw a polyline from one location to other 3 location with different widht and color of the polyine. I was wondering if you guys could give me a starting point or maybe a sample code. I think this will be possible by D3. I also do not understand the locationPoint method, passing in {lat: 0, lon: 0}. or coordinatePoint, passing in {row: 0.5, column: 0.5, zoom: 0}, Also I did try this link http://webcache.googleusercontent.com/search?q=cache:ZJcQP6qOvBwJ:https://github.com/simplegeo/polymaps/issues/91+&cd=1&hl=en&ct=clnk&gl=in and   http://webcache.googleusercontent.com/search?q=cache:ZJcQP6qOvBwJ:https://github.com/simplegeo/polymaps/issues/91+&cd=1&hl=en&ct=clnk&gl=in but could not understand. Thanks for your time.


title: Is it possible to display Modified and Size in Contents panel of ArcMap's Catalog Window?

text: In ArcCatalog 10.0 SP2 it is possible to display the Modified and Size column values, and to sort by them. However, in the Catalog window of ArcMap 10.0 SP2, it does not seem to be possible to do this. The reason I am looking for this behaviour is that I have a large number of MXD files in a folder and want to be able to use the Catalog window to locate, and switch between, any of the last 10-12 that have been modified. Without being able to sort them based on the Modified column (because it is not visible there), it is very cumbersome to scroll through them. If this functionality is already present can somebody point me at where to find it, please? Please note that using the Recent maps list is of no use for this because the maps I want to access have been created by a Python script and not previously opened in ArcMap.


title: How to use a property of a different interface for a created ArcObject

text: I have created an arc based three points (from point, through point, and to point). To create the arc I used this code:               import arcpy, comtypes.client     import comtypes.client.CreateObject as CreateObject     import comtypes.gen.esriGeometry as esriGeometry          FromObjIPoint = CreateObject(esriGeometry.Point, interface=esriGeometry.IPoint)     FromObjIPoint.PutCoords(FromX, FromY)          MidObjIPoint = CreateObject(esriGeometry.Point, interface=esriGeometry.IPoint)     MidObjIPoint.PutCoords(MidX, MidY)          ToObjIPoint = CreateObject(esriGeometry.Point, interface=esriGeometry.IPoint)     ToObjIPoint.PutCoords(ToX, ToY)          ThreePtArc = CreateObject(esriGeometry.CircularArc, interface=esriGeometry.IConstructCircularArc)     ThreePtArc.ConstructThreePoints(FromObjIPoint, MidObjIPoint, ToObjIPoint, True)      My problem is that I need to test to see the direction in which the arc is generated (clockwise or counterclockwise). There is an IsCounterClockwise property, but it is part of the ICircularArc interface, not the IConstructCircularArc interface I used to create the arc. Any ideas on how I can test the direction of the arc?


title: Processing Full-waveform Lidar?

text: Does anyone know of a good software package for processing full-waveform lidar? Also, does anyone know of a good tutorial on processing full-waveform lidar?


title: Is there an open source equivalent of ESRI story maps?

text: I am a french user, sorry for my spelling mistakes. I am currently interested by storytelling with Maps. ESRI offers a tool : this is a great example of what I am looking for. But I do not own ArcGis Online because I am not an ESRI's user. Do you know ESRI story maps equivalent product ? A opensource solution ideally (maybe jquery, or Google Maps API ? Thank you in advance for your help and advices,


title: Notepad++ syntax highlighting support for .mapfiles?

text: I was looking for a language definition for mapserver ".map" files in Notepad++ but could not find anything. Is there anyone who can recommend / has such a file? an already defined one? If not, is there an open source text editor that can highlight .map file code for easy ready in windows? I searched the web for such editors but no luck yet. Thank you for your time,


title: Geodjango: Using Lat / Lon to Buffer from Point

text: I want to have a radius based distance search. To do this, I want to create a buffer around a point object so that I can filter objects that are inside this buffer, a method that I learned based on a google groups post. I want to use latitude and longitude in my model definition so that I can easily put the information into my google map later:               class Thing:         latitude = models.FloatField()         longitude = models.FloatField()      The only problem is trying to filter results based on lat / lon coordinates:               >>> lat = 37.7762179974     >>> lon = -122.411562492     >>> from django.contrib.gis.geos import Point     >>> pnt = Point(lat, lon)     >>> buf = pnt.buffer(0.0001)      How can I do something like this?               qs = Thing.objects.filter((lat, long)__intersects=buf)


title: How to find out to which polygon each points belongs to?

text: I have searched for an answer to this, but couldn't find anything useful. I have got a shapefile consisting of a number of polygons, and another shapefile with a number of points. I want to add a column in the points shapefile. For each point, I want the column to contain the name of the polygon that surrounds it. In simple terms, I just want to find out to which polygon each points belongs to. Any tips?


title: What is the fastest way to iterate through a list of features?

text: I have written a QGIS plugin and it iterates through all features in a layer using provider.select() and compares geometry. The problem, the plugin is very slow. If there are 114 features in a shapefile and it needs to iterate 80 times then it will have to repeat the code 9120 times. How can I speed up the iteration process? Should I store all features in a list and then iterate thru the list? Store all features in a memory layer (not sure what that is yet)? Thanks Ed


title: Error getting while creating new field to a shape file table

text: i am getting the error for following code to add a new field to a shape file table.               from osgeo import ogr          # Open a Shapefile, and get field names     source = ogr.Open('my.shp', 1)     layer = source.GetLayer()     layer_defn = layer.GetLayerDefn()     field_names = [layer_defn.GetFieldDefn(i).GetName() for i in range(layer_defn.GetFieldCount())]     print len(field_names), 'MYFLD' in field_names          # Add a new field     new_field = ogr.FieldDefn('MYFLD', ogr.OFTInteger)     layer.CreateField(new_field)          # Close the Shapefile     source = None      Error is as following:               layer = source.GetLayer()      > AttributeError: 'NoneType' object has no attribute 'GetLayer' Please if anyone can solve this problem i will be very thankful.. Regards, Bhavya


title: Map generation when It is already in JPEG format

text: I got maps in JPEG format but I need some information to be added in it. I cant start editing in JPEG format. If there is any other procedure to add other features into it. Then please let me know. Thank You


title: FTP Connection with ArcGis 10.1

text: I keep some data to an FTP server. Can I conect with ArcMap 10.1 to use this data?


title: How to pan-sharpen Landsat images for image-classification in GRASS?

text: I'd like to learn how to do an unsupervised classification of a Landsat scene using `i.cluster` > `i.maxlik` in GRASS using pan-sharpened 15m-resolution images (the example given in its Wiki uses the ordinary 30m-resolutions). I tried using `i.pansharpen` to create the pan-sharpened images first, but `i.pansharpen` can only output 3 channels that can be combined using `d.rgb` or `r.composite`. As far as I know, the image-classification process requires complete multispectral bands 1 to 7. How can I produce separate bands (band 1 to band 7), pan-sharpened using its 15m-resolution band 8 image, before inputting them to the image-classification process? I've found a paper that demonstrates how they did this; basically they used some kind of Principal Component Analysis to somehow merge the 30m-multispectral bands with the 15m-panchromatic band. The exact quote would be: > "The method first resamples the 30-meter multispectral image to 15 meters. > It then computes all six principal components of the multispectral image (We > deleted the thermal band due to is courser resolution). Then the histogram > of the panchromatic band (15-meter resolution) is rescaled to match the > histogram of the first principal component of the 30-meter image and the > first component is replaced with the rescaled panchromatic band. This is > justified because the first principal component represents overall > brightness in a way that is similar to the broad spectral band of the > panchromatic image. After replacement, then the six components are > transformed back into the original data space, rendering an improvement in > spatial resolution." First off, the paper showed no algorithm/formulas whatsoever. I have no idea how to turn the above quote into a corresponding mathematical formula. I realized that I can use `i.pansharpen` with the PCA algorithm instead of the usual Brovey or IHS - but still - the output will only be 3 channels of red, blue and green - which I sadly have no clue on how to use them for image- classification.. So, before I even attempt to crack my head trying to write a new PCA algorithm manually, can anybody help me to point to an easier and better way to perform image-classification on pan-sharpened Landsat images? I mean - there should be an easier way, right? I feel like I'm missing something simple. If the only route left is to write my own script, can you guys please point me to something out there that resembles an example of what I'm trying to do? Any help is very much appreciated!


title: How can I convert an excel file with x, y columns to a shapefile?

text: **How can I convert an excel file with x, y columns to a point shapefile?** There are some somewhat optional requirements in addition to the correct creation of a shapefile:   1. Column types (as per Excel's format specifiers) should be retained (especially date types)   2. Column names should be taken from the header   3. I would _like_ to do this from the command-line   4. If I can include heterogeneous spatial references for the points in a third column I would be very happy :)


title: How to Convert Long/Lat from Excel into shapefile?

text: > **Possible Duplicate:**   >  How can I convert an excel file with x, y columns to a shapefile? > Possible duplicate, How can I convert an excel file with x, y columns to a > shapefile? How do I convert (the attached image) from long/lats from my spreadsheet to drop into my shapefile for the Well locations? I have Editor 10.0. I never had to do this conversion before, so any help is appreciated. The lats/long is located Eastern Ohio. I know I have to do something with X/Y, but am newbie with this conversion. Thank You...![enter image description here](http://i.stack.imgur.com/5B4yx.jpg)


title: Finding mid-point of line using ArcPy?

text: **How can the mid-point of a polyline be calculated using the geoprocessing framework** , e.g. in a Python script? The polyline.centroid property returns _The true centroid if it is within or on the feature; otherwise, the label point is returned_. The centroid is rarely located on non-straight lines, which is useless for my purposes. The Feature Vertices to Points tool has a midpoint option but this requires ArcInfo, which I don't currently have. An option could be to add measures to the polylines and create a route event 50% along the line. Another workaround is to use the Calculate Geometry option in ArcMap, but ideally I need to automate this process in a script. Any better/faster suggestions? I am limited to ArcGIS 10.0 (without access to an ArcInfo level license) for the moment.


title: GDAL VRT Format - do i understand the concept?

text: Okay, so im a little fed up with different raster-in-database solutions that I tried over the last 2 weeks which don't work currently (Postgis raster) or cant handle my volume of data (Rasterlite), so I'm reading about the VRT format. Bear with me, i'd like your opinions on this, and also if what I propose makes sense at all: VRT is basically a metadata XML file describing various properties of the actual raster file, like pixel dimensions, geolocation, etc.. Step 1: I converted (not really, just generated vrts) all my geotiff files into vrt. Now, since I see I can merge the VRT, i assume its possible to create a mosaic of vrt metadata files, one big vrt to hold all metadata. Great, that means, metadata will probably be used for optimizing the rendering since qgis will decide (assumption) which tiles fall into the current canvas extent and which not... Step 2: create a vrt mosaic Okay, now the next benefit i see is, i only need to add 1 entry into qgis table of contents and i can set different things upon it, like scale dependant rendering and null data value transparency if needed. One could argue, you can simply load geotiffs into qgis and put them in a group, true, but you dont have any control over a group except for setting the common SRS. If i wanted to see my orthophoto on a small scale (large zoom-out) and still have speedy rendering i would repeat the steps, only with a resampled set of original raster and end up with a few big VRT datasets. Does this make any sense? :)


title: How to typecast from MULTIPOLYGON to MULTIPOLYGONM (force XY multipolygon into XYM)

text: I need to merge several databases, where the destination table has a constraint checking for MULTIPOLYGONM in the geometry column. At some source tables, the geometry column is in the XY form (MULTIPOLYGON), others have the correct XYM form (MULTIPOLYGONM). How can I force MULTIPOLYGON into MULTIPOLYGONM? Is this what ST_Force_3DM is supposed to do?


title: Alternative to DeLorme Street Atlas USA 2012 Plus

text: Does anyone know of an alternative to a product like DeLorme Street Atlas USA 2012 Plus? I am interested in finding something that makes it easy for me to create and export custom PDF maps. Having data bundled or very easily installed would be a great advantage. If its not free software, having a trial version would be great. Thanks for your help.


title: Conditional combining of multiple rasters to produce one output using Python?

text: I have two rasters for same spatial extent and need to compare both rasters cell by cell and produce one output raster. Each has 10 land cover classes. Based on those 10 classes the comparison should be 100 conditional statements. Here I wrote two statements and did a test run. It gives me only a output based on the last conditional statement. Which is output raster has cell values only 21.               outCon = Con (((inRaster1 == 11) & (inRaster2 == 11)), inRaster1 + inRaster2, 11)     outCon = Con (((inRaster1 == 21) & (inRaster2 == 11)), inRaster1 + inRaster2, 21)     outCon.save ("G:\\LC_Transitions\\con_test")      Any suggestions on what I did wrong in here? Also, if I want to run a statement for multiple conditions together (for ex: If (InRaster = 21, 22, 23, 24) and (inRaster2 = 11) - return 11) could anyone suggest the correct syntax for this kind of multiple conditions.


title: Leaflet marker cluster and popups

text: I want to develop a map with Leaflet marker cluster. You can see how it looks like here: https://github.com/danzel/Leaflet.markercluster But I need that my markers have popups with more information than just a name (three more rows). I don't have many those markers. In this example with clustering markers are only written by long and latitude, and one information without any css and popups (http://danzel.github.com/Leaflet.markercluster/example/realworld.388.js). So how can I style my popups and enter more informations, and also how can I style my marker icons? Also, I would need that popup shows up on mouse over, not on click. Thank you.


title: Can Google Maps Android API display WMS layer?

text: I am currently making an app for my final career project, and I am trying to combine the layer of Google Maps and WMS layer that displays a map from a WMS server, helping me with ArcGis SDK for Android, The **MapView object of the ArcGIS API for Android** allows you to add WMS layers (with the object WMSLayer), while **Google Maps Android API v2** does not allow it, and I can't find a way of combining these layers. Someone could tell me if this is possible?


title: apply overpassAPI to a very simple adress-repuest

text: i wanted to run a osmconvert & filter with the following goal - to get the following tags out of the datas: addr:street addr:housenumber addr:city so i decided to do the following command               ./osmconvert hamburg-latest.osm.pbf --all-to-nodes -o=hamburgrestaurants_2.o5m     ./osmfilter hamburgrestaurants_2.o5m --keep="amenity=restaurant" -o=restaurant_2.o5m     ./osmconvert restaurant_2.o5m --csv="@id @lon @lat shop name  addr:street addr:housenumber addr:city website email" --csv-headline -o=restaurant_2.csv      but i failed - there were no streets no housenumbers and cities. Now i decidet to use overpass-API which seems to be less complicated. Can someone advice me here to go the first step.


title: Using ArcGIS sdk 10.2.2 for Android with gradle

text: Has anyone got the ArcGIS SDK from Esri to work with Android Studio(gradle)?. So far I have the done the following   1. Extracted the ArcGIS Android SDK(10.2.2).   2. Added the .so files (armeabi-v7a & x86) to the jniLibs folder as per this guide http://ph0b.com/android-studio-gradle-and-ndk-integration/   3. Added arcgis-android-api.jar, arcgis-android-app-toolkit.jar, jackson-core-lgpl-1.9.5.jar, jackson-mapper-lgpl-1.9.5 and jcifs-1.3.17.jar to the libs folder Here is my gradle file               buildscript {     repositories {         mavenCentral()     }     dependencies {         classpath 'com.android.tools.build:gradle:0.9.+'     }     }     apply plugin: 'android'          repositories {     mavenCentral()     }          android {     compileSdkVersion 19     buildToolsVersion "19.0.3"          defaultConfig {         minSdkVersion 16         targetSdkVersion 19     }          productFlavors {                   armv7 {             ndk {                 abiFilter "armeabi-v7a"             }         }              x86 {             ndk {                 abiFilter "x86"             }         }               }                         packagingOptions {              exclude 'META-INF/LICENSE'         exclude 'META-INF/LGPL2.1'         exclude 'META-INF/NOTICE'         exclude 'META-INF/license.txt'         exclude 'META-INF/notice.txt'          }      } **A Screenshot of my Project Structure** ![Here is a screenshot of my project structure](http://i.stack.imgur.com/G71Db.png) The gradle file compiles successfully but when I run the application it crashes with the following error > Caused by: java.lang.NoSuchMethodError: no method with name='requestRender' > signature='(Z)V' in class Lcom/esri/android/map/MapSurface Am I missing something here?


title: How hide vertices on polygons in QGIS

text: I am using QGIS 2 to make a map and one of the layers shows vertices along its outer delineations. I would like to hide these vertices and can't find how. Can you please help?


title: How to determine stream elevation points from SRTM raster with stream lines vector?

text: I should determine elevation points of some streams. I have SRTM raster and stream vectors. Which tools can solve this problem in ArcGIS 9.3? Anybody can write me a workflow how to do this task? Thanks in advance!


title: PostGIS: Using a polygon to 'mask' linestrings returns both multi and linestrings

text: I have a table of linestrings (OSM roads, in fact) that I'm displaying on a map. I want to filter them so that only those within a certain area are displayed- I've already done this with the coastline (a table of polygons) with great success, just using `ST_Intersection`. However, that doesn't appear to work on the linestrings. When I try something like this:               ST_Intersection(way,st_geomfromtext('POLYGON(([etc]))',900913))      I get the following:               Error : ERROR:  Geometry type (MultiLineString) does not match column type (LineString)      Presumably the ST_Intersection is returning multiple lines rather than the single one I am expecting- but not all do, because if I change the column to be MultiLineString then it complains that it can't insert a LineString. How can I ensure that these MultiLineStrings and Linestrings are the same type, and can all be inserted together?


title: Distance between a line layer and several other line features (arcGIS 9.3 Arcview Licence)

text: I have a "Drain" line layer (with 150 lines) that I need to calculate the distance from lines to all objects within 120m. I've tried doing a spatial join and its great but I need more than just the closest features. I need all features within the 120 buffer. I believe that the NEAR tool would do this for me but unfortunately I don't have that licence Level. Any direction you can give me would be a great help to me.


title: What is the wire format for Google's new vector map tiles?

text: Google recently released new vector cartography for their mobile maps. I'm curious if anyone here has any insight into the wire format they use for transmission? I've experimented with a few formats over the years, including bencode, bson, variants of WKT and WKB, and gzipped, limited-precision geojson which I've found to be the best trade-off in comprehensibility and file size. I'd love to know what Google decided on, but I don't have an Android device to test with.


title: Why does my ITopologicalOperator Intersect result have incorrect area?

text: I have used ITopologicalOperator for getting common Area of two polygons but the result is not correct. May anyone please tell me how to get the common area of two features.               //Make Topological operator of geometry here     ITopologicalOperator pTopoOperator = (ITopologicalOperator)pGeometry;     //intersect of the above topo operator with another geometry     IGeometry pGeometry1 = pFeature1.Shape as IGeometry;     IGeometry pGeomResult = pTopoOperator.Intersect(pGeometry1, esriGeometryDimension.esriGeometry2Dimension);     //Typecasted to area viz. common area     IArea pCommonArea = (IArea)pGeomResult;     double dblCommonArea = pCommonArea.Area;      The Area value in dblCommonArea is not coming correct.


title: How to force geometry type in (WFS) layer in QGIS

text: I have an external WFS source serving mixed geometry types - in other words, I have no control of the source. When adding the layer QGIS sets the geometry type to _line_ and thus I am unable to style the _points_ and _polygons_ also contained within the layer. **Nathan W** states in a comment that a layer in QGIS can contain only one geometry type. If I was able to explicitely set the geometry type on a layer, I could add the layer three times and use one layer for each geometry type. **Is it possible to force the geometry type on a (WFS) layer in QGIS?** Or is there another method I could use to correctly style all the features in my WFS layer?


title: How can I create a constant slope DEM?

text: I wanted to create a DEM of constant slope say 1/3000. How can I proceed in ArcGIS 9.3? The area may be 1000m x 1000m or any other as per convenience.


title: Splitting multiple polygons with a line in JTS geotools

text: i am using geotools as my GIS map solution. now i want to split multiple polygons to build a road or river. passing through multiple polygons so, can you plz help me how to do this splitting a single polygon with a line is ok. but i am having problem in splitting multiple polygons with a line segment. anybody can help thanks in advance


title: MODIS L1B to Reflectance

text: Could we convert MODIS L1B to reflectance data rather than using data product MOD09 (7 bands)? If can, may I know how to convert it? Is there any source, published paper, forums, or any modeler (.gmd) to convert it?


title: How to discard null coordinate points automatically when we make Multipoint Geometry in Spatialite?

text: I have a Spatialite table that contains a series of 80 coordinates where each coordinate placed into one column in a table. Then, I want to add all those coordinates into one Multipoint Geometry Column. Unfortunately, some of those coordinates have NULL value randomly. This will make the Multipoint Geometry Column having NULL value as well. I tried to catch the NULL value using CASE WHEN, but since the table has 80 columns, my CASE WHEN code becomes very long because I must check it column by column. Is there any automatic way to discard/unconsidered NULL coordinate points when we make a Multipoint Geomatry Column?


title: using gzipped js files in windows 8 OS

text: Previously, we were using a private ISP to run our web site. They were using LINUX. We could use js.gz files to serve interactive maps. Now, we have our own server with Windows 8 OS. How we can serve js.gz files in this system to serve interactive maps? Are there any other compressing system to serve maps with Windows 8 OS?


title: how to access vector layer from localhost:8085

text:
My environment is as below. Server A contained the web application, I used win7,tomcat 7.0,eclipse Kepler Service Release 1 Server B contained geoserver and my sph data,the geoserver2.4.4 works fine. i have done proxy settings accoording to this link http://www.berndresch.com/blog/2011/11/01/installing- a-cgi-proxy-on-tomcat/ At first time I run wfs.html in my tomcat+eclipse+win environment, but it does not work although I tried each kind of "OpenLayers.ProxyHost =",   here is my code:               <!DOCTYPE html>               <title>Creating a simple map</title>     <meta http-equiv="Content-Type"     content="text/html; charset=UTF-8">            <link rel="stylesheet" type="text/css" href="http://localhost:8085/geoserver/openlayers/theme/default/style.css"/>      <link rel="stylesheet" href="style.css" type="text/css">

                after that, I just found that never be executed.I just try each edition of browsers of IE,FF,Chrome,Opera, but all of them did not work. Anybody could give me a suggestion? Thank you in advanced! please help me as soon as possible


title: How do I contact the developer of a QGIS plugin?

text: I want to give feedback to the developer of a non-core QGIS plugin. (Numerical Vertex Edit by Cedric Moeri, who seems to have no webpage for his plugins) I joined OSGeo Wiki but hardly know my way around it, or whether that is a good place to start.


title: Is there an API to ArcGIS Online's My Content listing?

text: This question pertains to ArcGIS Online, aka ArcGIS.com, aka ArcGIS for Organizations. If I log into ArcGIS.com then choose My Content, I can choose > Layers > Features to see the feature layers available to my account. ![enter image description here](http://i.stack.imgur.com/njPed.png) Is it possible to get to this listing programatically, eg via a REST API to ArcGIS.com?


title: ArcGIS 10.1 Cost Distance Calculations

text: I have a study area that is a polygon feature class, and am running the Cost Distance Tool on it in ModelBuilder. However, everytime I run the tool, it only calculates a cost distance and cost distance backlink for half of the polygon. The cost surface I produced with a weighted overlay covers the entirety of the study area, but not the cost distance. Any suggestions as to how to go about resolving this?


title: How can I dynamically add features to a GeoJSON file?

text: I have tons of pictures which I am showing in markers on a LeafletJs map and currently have a fixed GeoJSON file. So I want to know is there any easy way to dynamically add new features to the GeoJSON file? I was thinking a script(Php/JS) which scans a folder for new images, then gets the coordinates from a GPX file based on the image name and then add those to the GeoJSON feature collection. Is this kind of solution possible?


title: Is it possible to integrate a route planner into QGIS?

text: I am looking for an open source GIS and now asking myself if it is possible to integrate a route planner into QGIS. The route planner should be able to **calculate the distance from one position in the map in all directions** (e.g. 30 minutes driving time) and mark it as a catchment area. It would also be helpful to export the data of the marked area to excel (e.g. name of the administrative districts and also demographic date).


title: Hand drawn sketchy symbology styles for GIS software

text: Often times in planning projects, a hand drawn, sketchy look is desirable in order to convey the preliminary nature of a project. Is anyone aware of any utilities/plugins for desktop GIS software (ESRI, QGIS etc.) that enable the user to apply a hand drawn, sketchy look to feature symbology without modifying the geometry? Here is a product called M-Color for AutoCAD that does the sort of thing that I am looking for but it is of course CAD centric: http://www.m-color.com/m-color/flash/hand_drawn.html This sort of thing can also be achieved in SketchUp using styles. The best solution would be one that would eliminate intermediate steps, allowing the user to stay in a single software environment and avoid any intermediate export/import steps.


title: Exported ArcMap crashes ArcPad 10

text: I'm a computer scientist, and not really familiar with all the terms related to GIS, please forgive me. I have been given an ArcMap project that consists, what I believe are raster layers, aligned tiff images that represent a park. To that project I have added several shape files (which I've read I'm supposed to put into a geodatabase, but that's another story). When I export the ArcMap into an ArcPad project using "Get data for ArcPad", I export my shapefiles for background editing (AFX) and export all the tiffs as jpegs. I ensure it's a prebundled CAB for the device, and that I only wish to export the current extent. Now, when I open that map in ArcPad 10 Desktop (or on a Trimble unit) ArcPad becomes unresponsive and crashes. The exported project is only a few megabytes in total, nothing outlandish. What am I doing incorrectly that ArcPad is crashing? Kind Regards, Johannes Lindenbaum


Is there a way in qgis 2.0 to prevent overlapping labels? I have a layer with a large geographical extent, which means a hell of a lot of labels. Many of them collide and it looks really bad. Is there a way for me to get qgis to automatically place the labels on an alternative 'location'? I know it is possible in MapInfo but I'd rather use qgis :)


title: pgrouting 2.0 package for postgresql 9.3

text: I'm trying to install pgrouting 2.0 on a postgresql 9.3 database (with postgis 2.1).   Are there any packages on ubuntu 12.04 or do I have to install from source? Is postgres 9.3 supported at all in this configuration?


title: QGIS 2.0: Automating tasks, text files and shapefiles

text: Wondering if it's possible to automate some repetitive tasks in QGIS (2.0). This is my general workflow for importing some xyz type text files from another software package which export (not overly efficient) fixed column data:   1. import fixed column text file into Excel   2. add fieldnames   3. create unique id field and populate using a combination (concatenate) of two fields in the existing data   4. remove null rows in between data groupings   5. remove unwanted columns   6. save to csv   7. import into QGIS   8. convert to polylines and save as shapefile I'm thinking that this is achievable in QGIS alone via some scripting? Some pointers would be appreciated. Example File: ![Example of point file](http://i.stack.imgur.com/cMHHE.png) So, I want to keep the first 4 columns (X,Y,ID,Value), delete the final column, remove the rows with text, and create a polyline shapefile based on a field which is a combination of the 3rd (ID) and 4th (Value) columns (e.g. 0_2000, 0_2100, 1_2100, etc). Thanks, G


title: How to fix QGIS PyQGIS package?

text: I have a broken package that is preventing QGIS from loading python plugins, updating itself, or even un-installing. The main symptom of this problem is the following message that appears when QGIS is booted: ![error message](http://i.stack.imgur.com/nnB4l.png) QGIS works, but none of the python plugins do and I cannot update, reinstall or uninstall QGIS. The paths of action I have tried so far are:   * Reinstall PyQGIS (which I believe to be causing the problem) using Synaptic, which leads to this error: ![Synaptic error message](http://i.stack.imgur.com/LCear.png)   * Updating the packages and reinstalling, using `sudo apt-get update sudo apt-get upgrade`, This leads to the following error: `dpkg: error processing python-qgis (--configure): dependency problems - leaving unconfigured No apport report written because the error message indicates it's a follow-up error from a previous failure. Errors were encountered while processing: python-qgis-common python-qgis E: Sub-process /usr/bin/dpkg returned an error code (1)`   * Following advice from here on broken packages, forced install `sudo apt-get install -f` and `sudo dpkg --configure -a`.  The latter option flags the following error, which tells me (more or less) what the problem is, but not how to solve it: > dpkg: dependency problems prevent configuration of python-qgis: python-qgis > depends on python-qgis-common (= 1.9.0+git20121201+80fa7aa~precise1); > however: Package python-qgis-common is not configured yet. dpkg: error > processing python-qgis (--configure): dependency problems - leaving > unconfigured Errors were encountered while processing: python-qgis-common > python-qgis How do I solve this so I can have a fully working version of QGIS again?


title: dealing with 2 different coordination systems in postGIS

text: I'm seeking a function that converts degrees to the following format:               POINT(405115.926025391 4543389.4354248)      I dont know this format's name, but is there any function to do so? Cheers, EDIT ------- > converting SRID               WITH currentPoint AS (         SELECT             st_transform(st_setsrid(st_makepoint(3.6392182823950043, 37.74446159789074), 900913), 900913) AS point     )     SELECT          building.gid     FROM          building, currentPoint      WHERE         ST_Dwithin(building.geom, currentPoint .point, 10)


title: How to get coordinates from geometry in PostGIS?

text: This line: `SELECT geom FROM myLayer.geom` will return a hex value, i'm wondering how would it be possible to get decimal values, a result that look likes human-readable coordination? Regards,


title: Openlayers - Get Type of Layer

text: Is there a way to get the type of all the layers in an OpenLayer maps object? What I am trying to do is iterate over all the layers in my OpenLayers map object and populate a dropdown list with the names of only the vector layers. All my vector layers come from a remote GeoServer and are WFS. Here is the code I currently have that gets the names of the layers and populates a dropdown with the names. This code works fine;               function listLayers() {     var mLayers = map.layers; //set a variable to the layers array in the map object     document.getElementById("drpLayers").options.length = 0; // clear any existing options from the dropdown list          for (var a = 0; a < mLayers.length; a++) { //loop through the map layers array         var opt = document.createElement("option");//create an option object in the dropdown         opt.text = mLayers[a].name; //add the name of the layer for this dropdown list option to the text attribute of the option object         opt.value = mLayers[a].name; //add the name of the layer for this dropdown list option to the value attribute of the option object         document.getElementById("drpLayers").options.add(opt); //add the option object to the dropdown list     };      I thought I could just modify this code to something like this:               opt.text = mLayers[a].type       or perhaps this:               opt.text = mLayers[a].class      but neither way works. When I look at the OpenLayers documentation I cannot find a layer property that describes the layer type. Any suggestions would be appreciated!


title: What does "unit name Degrees not found" error mean in ERDAS?

text: I want to create a mosaic in Erdas. When I want to add an image file in the Mosaic Tool interface in Erdas, Erdas showed me the error saying "unit name Degrees not found". Then I tried to change the map projection from Geographic Lat/long to UTM. But this error still appears. What does this error mean? Thank you


title: How to Merge/Join GeoJSON and JSON?

text: I want OSM administrative boundaries from http://global.mapit.mysociety.org/area/14455.html. I can get the geodata in different formats there, but the attribute data always is a separate JSON file. I want them both in just one file, or to be able to merge the information. I haven't found a solution to merge the GeoJSON. What's the workflow to get the two files joined and saved as a shapefile, for example?


title: How do I capture a point feature using co-ordinates?

text: I would like to capture a point feature in an existing vector layer from co- ordinates and not import from a file. Would it be possible to input the co- ordinates and attributes for a single point, similar to the "Zoom to point" plugin, but with the functionality to capture the point as a feature.


title: Transform csv-coordinates into area

text: I'm working with an inventory of a species in Southern Sweden. I have recorded my findings (together with coordinates, name of the species and year of finding) and created a CSV-file with i have imported to QGIS. Example from my data               Decade;species;ort;lat,long     1880;falcata;Borgholm;56.882657,16.655931     1880;falcata;Algutsrum;56.674716,16.53471     1880;falcata;Borgholm;56.882657,16.655931      In order to make a map that's easy to grasp I would like to collect all findings from e.g 1890 into an area, all findings from 1900 into a second area an so on. Someone that have a clue on what I can to to achieve this?


title: Using 'Generate Near Table' to match a point in one layer with specific points in another layer

text: I am trying to find the distance between a mutual fund's headquarters location and the stocks that it owns. For example, the mutual fund, Union Investment (headquartered in Lincoln, Nebraska) owns 48 stocks throughout the USA. In ArcMap 10.2 (Info), I have to: \- select by Attribute the individual fund from my Fund layer (e.g. Union Invst) \- select by Attribute the stocks that are owned by Union Invst (in the Stock layer, under the FUND_FAM column) \- use "Generate Near Table" which gives me the distance (Input=Stocks, Near=Funds). It works, however, I will need to do this 226 times, as that's how many funds I have to do. I'd like to do this in Modelbuilder, but I need help. I believe this is some kind of iterate function, but I do not understand this very well. I appreciate any advise. ![attribute tables](http://i.stack.imgur.com/cO8AV.jpg) ![Funds example](http://i.stack.imgur.com/qkY6L.jpg) ![Stocks example](http://i.stack.imgur.com/iqdRD.jpg)


title: Openlayer maps issue with ssl

text: I am using openlayers map by using the hosted js :               <script src="http://openlayers.org/api/2.13.1/OpenLayers.js"></script>       But my client has ssl installed and when i try to run my map page it shows :               (2)[blocked] The page at https://domain.com/rwd/ ran insecure content         from http://openlayers.org/api/2.13.1/OpenLayers.js.      So i tried https one and it turns out openlayers doesnt have one               https://openlayers.org/api/2.13.1/OpenLayers.js      The i download the openstreet js and hosted in client server, but then all the styles and related images are lost. Although it does show the map, basically numerous warnings pop-up in the console and im afraid this might get rejected at play store or so. Im developing a hybrid application which runs on server as well. **Warnings now** :               The page at https://domain.com/rwd/#/customer-plot/234 displayed insecure content from http://b.tile.openstreetmap.org/14/8743/5624.png.     The page at https://domain.com/rwd/#/customer-plot/234 displayed insecure content from http://b.tile.openstreetmap.org/14/8742/5624.png.     The page at https://domain.com/rwd/#/customer-plot/234 displayed insecure content from http://c.tile.openstreetmap.org/14/8743/5623.png.     The page at https://domain.com/rwd/#/customer-plot/234 displayed insecure content from http://b.tile.openstreetmap.org/14/8743/5625.png.     The page at https://domain.com/rwd/#/customer-plot/234 displayed insecure content from http://c.tile.openstreetmap.org/14/8744/5624.png.     The page at https://domain.com/rwd/#/customer-plot/234 displayed insecure content from http://a.tile.openstreetmap.org/14/8742/5623.png.     The page at https://domain.com/rwd/#/customer-plot/234 displayed insecure content from http://c.tile.openstreetmap.org/14/8742/5625.png.     The page at https://domain.com/rwd/#/customer-plot/234 displayed insecure content from http://a.tile.openstreetmap.org/14/8744/5623.png.     The page at https://domain.com/rwd/#/customer-plot/234 displayed insecure content from http://a.tile.openstreetmap.org/14/8744/5625.png.     The page at https://domain.com/rwd/#/customer-plot/234 displayed insecure content from http://a.tile.openstreetmap.org/14/8743/5622.png.     The page at https://domain.com/rwd/#/customer-plot/234 displayed insecure content from http://c.tile.openstreetmap.org/14/8742/5622.png.     The page at https://domain.com/rwd/#/customer-plot/234 displayed insecure content from http://c.tile.openstreetmap.org/14/8745/5624.png.     The page at https://domain.com/rwd/#/customer-plot/234 displayed insecure content from http://b.tile.openstreetmap.org/14/8744/5622.png.     The page at https://domain.com/rwd/#/customer-plot/234 displayed insecure content from http://b.tile.openstreetmap.org/14/8745/5623.png.     The page at https://domain.com/rwd/#/customer-plot/234 displayed insecure content from http://c.tile.openstreetmap.org/14/8745/5625.png.     The page at https://domain.com/rwd/#/customer-plot/234 displayed insecure content from http://c.tile.openstreetmap.org/14/8745/5622.png.          GET https://domain.com/rwd/js/lib/theme/default/style.css 404 (Not Found)      /*This the corresponding stylesheet that is loaded via Openstreet.js*/       Any help would be greatly appreciated. * * * **Update 1** : I tried with cdn with ssl and still same issue :               https://cdnjs.cloudflare.com/ajax/libs/openlayers/2.11/OpenLayers.js      * * * **Update 2** : I downloaded the entire github repo for Openstreet thinking this will solve the image and css issue.               https://github.com/openlayers/openlayers      While the above **_solved the css issues_** , the map however is shown by loading out images from another external site `tile.openstreet.com`. Seems like i have to dig into openstreet js as well..:(.. * * * **Important** : I am using backbone.js. **Note** : I have gone through OpenLayers 2.12 and http basic authentication woes and that has not helped me. I do not have any control over the server configuration. I just have access to a folder where i need to set up the website an everything else works fine, but this ssl is killing me..:(.. **P.S** : Changed real website address to avoid google linking it..:)


title: What format and settings to use for aerials photos in QGIS?

text: Following question which was more about handling Aerials with ArcGIS: Most Effective Format to Manage Aerial Photography for Viewing Only It seems there are 2 major options for storing / resampling / reprojecting etc. aerials:   1. JP2000 / JP2 / JPEG 2000 (recently 5 codes for GDAL handling)   2. ECW (ERDAS Compressed Wavelets (.ecw))   3. any other I missed? ![gdal available formats](http://i.stack.imgur.com/hBN69.jpg) What I have understood depending on QGIS version for both there usually has to be installed some additional libraries. ECW has some limitation - for compressing needs to buy licence? I tested jpeg which I can't use for big files (max dimension limitation) and it is also slow with bigger dimensions. The answer should contain:   1. What is available by default with QGIS 2.0.1 desktop and/or OSGEO?   2. How it works with big files - zooming in/out (pyramids)?      * is _Creation Options_ \- _RESOLUTIONS_ for jp2 pyramids?


title: Field Calculator returning incorrect length and area values when QGIS project is reopened

text: Similar to Field Calculator returning incorrect length and area values, but as always slightly different. I have QGIS 2.0 and when I create a polyline shapefile, the field calculator returns the correct lengths. However the next time I open the project or the shapefile in a new workspace, when I click and the field calculator to update the line lengths, the numbers (in one instance) go to the 10,000,000's. I have checked the project workspace it is in UTM Z51S and the units are in metres and the shapefile projection is the same. I have updated the values to be zero first and then use $length to no avail. I have even tried to changing the projection to WGS84 with units as metres and the values are in degrees. It even happens when I create the values in a new field.


title: How to dynamically measure and display radius of circle in OpenLayers?

text: I want to give my user the ability to click on the map and give him a dynamic circle drawing tool which also reads out the radius measurement. That way the user can see how big the circle he creates is. For example, something like this : ![enter image description here](http://i.stack.imgur.com/apb7i.png) Any idea how I can add such a thing to OpenLayers?


title: How can I force TileCache to NOT render missing tiles (read only mode)?

text: I have a working disk TileCache that I do not want additional images to be rendered and saved to disk. Is it possible to force TileCache to a "read-only" mode? At the moment, I have set the folder permissions of the disk cache to read only as a temporary solution. This is the error I receive:               An error occurred: [Errno 13] Permission denied: '/tmp/tilecache/wms_layer1/07/000/000/037'       File "/usr/lib/pymodules/python2.7/TileCache/Service.py", line 256, in modPythonHandler         apacheReq.method,       File "/usr/lib/pymodules/python2.7/TileCache/Service.py", line 208, in dispatchRequest         return self.renderTile(tile, params.has_key('FORCE'))       File "/usr/lib/pymodules/python2.7/TileCache/Service.py", line 139, in renderTile         if (data): image = self.cache.set(tile, data)       File "/usr/lib/pymodules/python2.7/TileCache/Caches/Disk.py", line 79, in set         self.makedirs(dirname)       File "/usr/lib/pymodules/python2.7/TileCache/Caches/Disk.py", line 33, in makedirs         raise E      I am hoping that there is a way to hack TileCache to quietly ignore missed hits on the existing disk cache, so as not to attempt to render those missing tiles.


title: Python Error while installing QSpatiaLite in QGIS 2.0

text: I'd like to install QSpatiaLite to my QGIS2.0 but the following error massage occured while installing with the pluginmanager:               Couldn't load plugin QspatiaLite due an error when calling its classFactory() method          Traceback (most recent call last):       File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 204, in startPlugin         plugins[packageName] = package.classFactory(iface)       File "/home/map-pc/.qgis2/python/plugins/QspatiaLite/__init__.py", line 24, in classFactory         from qspatialite import QspatiaLite       File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 453, in _import         mod = _builtin_import(name, globals, locals, fromlist, level)       File "/home/map-pc/.qgis2/python/plugins/QspatiaLite/qspatialite.py", line 29, in          from QspatiaLiteApp import QspatiaLiteApp       File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 453, in _import         mod = _builtin_import(name, globals, locals, fromlist, level)       File "/home/map-pc/.qgis2/python/plugins/QspatiaLite/QspatiaLiteApp.py", line 27, in          from Classes.Database import *       File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 453, in _import         mod = _builtin_import(name, globals, locals, fromlist, level)       File "/home/map-pc/.qgis2/python/plugins/QspatiaLite/Classes/Database.py", line 1, in          from pyspatialite import dbapi2 as sqlite #Load PySpatiaLite       File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 453, in _import         mod = _builtin_import(name, globals, locals, fromlist, level)       File "/usr/lib/python2.7/dist-packages/pyspatialite/dbapi2.py", line 27, in          from pyspatialite._spatialite import *       File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 453, in _import         mod = _builtin_import(name, globals, locals, fromlist, level)     ImportError: libspatialite.so.5: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden          Python version:     2.7.5+ (default, Sep 19 2013, 13:52:09)      [GCC 4.8.1]               QGIS version:     2.0.1-Dufour Dufour, exported          Python path: ['/home/map-pc/.qgis2/python/plugins/processing', '/usr/share/qgis/python', '/home/map-pc/.qgis2/python', '/home/map-pc/.qgis2/python/plugins', '/usr/share/qgis/python/plugins', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', '/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode', '/home/map-pc/.qgis2/python/plugins/DigitizingTools/tools', '/usr/share/qgis/python/plugins/fTools/tools']


title: Full instruction for download OSM data in Ubuntu 12.04 LTC

text: Is there instruction for: 1) install software 2) download OSM data in Postgis database 3) set styles 4) generate tiles 5) initilaze MapProxy (all in OS Linux) 6) View map (generated tiles) in ArcGis Server (or Geoserver) (in OS Windows)


title: OpenSpace.js Member not found error on IE 8

text: I am using ordnance survey map as backdrop in IE 8. while pan on the map, it throws 'line 301 Member not found' error at 'b||(a.preventDefault?a.preventDefault():a.returnValue=!1)' in OpenSpace.js. But its working fine in Chrome and firfox. Anyone plz suggest me to fix this issue. For Reference:               OpenLayers.Event = {     observers: !1,     KEY_SPACE: 32,     KEY_BACKSPACE: 8,     KEY_TAB: 9,     KEY_RETURN: 13,     KEY_ESC: 27,     KEY_LEFT: 37,     KEY_UP: 38,     KEY_RIGHT: 39,     KEY_DOWN: 40,     KEY_DELETE: 46,     element: function (a) {         return a.target || a.srcElement     },     isSingleTouch: function (a) {         return a.touches && 1 == a.touches.length     },     isMultiTouch: function (a) {         return a.touches && 1 < a.touches.length     },     isLeftClick: function (a) {         return a.which && 1 == a.which || a.button && 1 == a.button     },     isRightClick: function (a) {         return a.which && 3 == a.which || a.button && 2 == a.button     },     stop: function (a,         b) {         b || (a.preventDefault ? a.preventDefault() : a.returnValue = !1); // Error Here         a.stopPropagation ? a.stopPropagation() : a.cancelBubble = !0     },     findElement: function (a, b) {         for (var c = OpenLayers.Event.element(a); c.parentNode && (!c.tagName || c.tagName.toUpperCase() != b.toUpperCase());) c = c.parentNode;         return c     },     observe: function (a, b, c, d) {         a = OpenLayers.Util.getElement(a);         d = d || !1;         if ("keypress" == b && (navigator.appVersion.match(/Konqueror|Safari|KHTML/) || a.attachEvent)) b = "keydown";         this.observers || (this.observers = {});         if (!a._eventCacheID) {             var e =                 "eventCacheID_";             a.id && (e = a.id + "_" + e);             a._eventCacheID = OpenLayers.Util.createUniqueID(e)         }         e = a._eventCacheID;         this.observers[e] || (this.observers[e] = []);         this.observers[e].push({             element: a,             name: b,             observer: c,             useCapture: d         });         a.addEventListener ? a.addEventListener(b, c, d) : a.attachEvent && a.attachEvent("on" + b, c)     },     stopObservingElement: function (a) {         a = OpenLayers.Util.getElement(a)._eventCacheID;         this._removeElementObservers(OpenLayers.Event.observers[a])     },     _removeElementObservers: function (a) {         if (a)             for (var b = a.length - 1; 0 <=                 b; b--) {                 var c = a[b];                 OpenLayers.Event.stopObserving.apply(this, [c.element, c.name, c.observer, c.useCapture])             }     },     stopObserving: function (a, b, c, d) {         d = d || !1;         a = OpenLayers.Util.getElement(a);         var e = a._eventCacheID;         if ("keypress" == b && (navigator.appVersion.match(/Konqueror|Safari|KHTML/) || a.detachEvent)) b = "keydown";         var f = !1,             g = OpenLayers.Event.observers[e];         if (g)             for (var h = 0; !f && h < g.length;) {                 var k = g[h];                 if (k.name == b && k.observer == c && k.useCapture == d) {                     g.splice(h, 1);                     0 == g.length && delete OpenLayers.Event.observers[e];                     f = !0;                     break                 }                 h++             }         f && (a.removeEventListener ? a.removeEventListener(b, c, d) : a && a.detachEvent && a.detachEvent("on" + b, c));         return f     },     unloadCache: function () {         if (OpenLayers.Event && OpenLayers.Event.observers) {             for (var a in OpenLayers.Event.observers) OpenLayers.Event._removeElementObservers.apply(this, [OpenLayers.Event.observers[a]]);             OpenLayers.Event.observers = !1         }     },     CLASS_NAME: "OpenLayers.Event"      };


title: WP7 Map Application with Multiple TileSources

text: I'm developing a C# map application for Windows Phone 7 using custom MapTileSources. I'm wondering if I can have multiple map layers, so that each of them binds to a different MapTileSource. The idea is that the first layer contains the ground map and the layers above that would represents routes and other information on top of the ground map. The layers above should be partially transparent. Is this possible and any ideas how this could be done?


title: Snap mean coordinate to layer in QGIS and creating MCs for multiple shapefiles

text: 1: I wish to create a mean coordinate for a group of points. However, I would like the new point to be snapped to the nearest point from the set of points used to generate it. How might one go about this, if at all possible? 2: I have come to the stage where I have many shapefiles I wish to create mean coordinates for. Is it possible to make QGIS generate these all in one go? As opposed to manually generating the coordinate through inputting one shapefile at a time.


title: What are your biggest challenges as a GIS developer?

text: What are your biggest challenges when developing GIS software? Is it coding? Is it understanding cartography/geography/etc concepts (like projections)? Or other difficulties?


title: Real-time Feature/Geometry Aggregation in Map Service Layer

text: **Use-Case**   Provide a map service layer that perform a real-time aggregation of geometry objects grouped on a set of criteria from a normalized data source, labeling the resulting image based on data from N joined source tables. What is the best way to support this use-case using ArcGIS?   1. Dynamic Layer   2. Query Layer   3. ArcPy Toolbox   4. Other    **Elaboration**   1. POLYGON_TABLE is a large (# of rows) table.   2. POLYGON_TABLE polygons change often.               CREATE TABLE POLYGON_TABLE (         POLYGON_ID  NUMBER(12)  NOT NULL,         META_ID     NUMBER(12)  NOT NULL,         OBJECTID    NUMBER(38)  NOT NULL,         SHAPE       ST_GEOMETRY     );        1. META_TABLE is smaller than POLYGON_TABLE.   2. META_TABLE provides a logical grouping of POLYGON_TABLE items through the META_ID.               CREATE TABLE META_TABLE (         META_ID         NUMBER(12)  NOT NULL,         MORE_META_ID    NUMBER(12)  NOT NULL,         META_VALUE      NUMBER(12)  NOT NULL     );        1. MORE_META_TABLE is smaller than META_TABLE.   2. MORE_META_TABLE provides a logical grouping of META_TABLE items through the MORE_META_ID.               CREATE TABLE MORE_META_TABLE (         MORE_META_ID    NUMBER(12)  NOT NULL,         MORE_META_VALUE NUMBER(12)  NOT NULL     );      and the following aggregation logic:               SELECT mmt.more_meta_value,             MIN(pt.OBJECTID) AS OBJECTID,             sde.st_aggr_union(pt.shape) AS SHAPE     FROM polygon_table pt         JOIN meta_table mt USING (meta_id)         JOIN more_meta_table mmt USING (more_meta_id)     WHERE mmt.more_meta_value = ?     GROUP BY mmt.more_meta_value;      using data of the following form:               POLYGON_TABLE     ID  META_ID  OBJECTID  SHAPE     1      1        1      POLY1     2      1        2      POLY2     3      2        3      POLY3     4      2        4      POLY4          META_TABLE     META_ID  MORE_META_ID  META_VALUE        1           1       2000        2           1       5000        3           2       4000        4           2       9000          MORE_META_TABLE     MORE_META_ID  MORE_META_VALUE           1       600           2       300           3       700           4       100            If you were to use 600 in the original query, the result would be one record:               600   1   (POLY1 UNION POLY2)      **Dynamic Layer/ArcPy Toolbox**   The dynamic layer was the first solution I thought of, but it appears that there is no simple way to perform a join with the above aggregation. This makes the first and third solution the same, in practice, as the only way I could think to do it was using an ArcPy toolbox that gathers the data needed. Gather the above data into a de-normalized temporary table, dissolve the geometry objects within by the grouped attribute, render the resulting objects as a labeled image. **Query Layer**   I haven't been able to test this as a potential solution due to issues with the ESRI software, but from what I understand this will execute the query supplied every time the layer is used. If the query executed is the query used to create the layer plus any supplied where clause, this option may be the best. In any other case, execution of the query layer query across the entire table will not perform.


title: Importing planet files into Nominatim

text: After a gruesome night installing PostgreSQL 9.1, PostGIS 2 and Nominatim 2 on CentOS 6.3 using the instructions here, I am finally at the stage of importing a US planet file. **Problem:** In `~/Nominatim/utils`, When I attempt to run `./setup.php --osm- file us-northeast.osm.pbf --all`, the output I get is:               ["type"]=>           string(2) "->"           ["args"]=>           array(2) {             [0]=>             array(9) {               ["phptype"]=>               string(5) "pgsql"               ["dbsyntax"]=>               string(5) "pgsql"               ["username"]=>               string(0) ""               ["password"]=>               bool(false)               ["protocol"]=>               string(3) "tcp"               ["hostspec"]=>               string(0) ""               ["port"]=>               bool(false)               ["socket"]=>               bool(false)               ["database"]=>               string(9) "nominatim"             }             [1]=>             bool(false)           }         }         [5]=>         array(6) {           ["file"]=>           string(35) "/home/myusername/Nominatim/lib/db.php"           ["line"]=>           int(7)           ["function"]=>           string(7) "connect"           ["class"]=>           string(2) "DB"           ["type"]=>           string(2) "::"           ["args"]=>           array(2) {             [0]=>             string(19) "pgsql://@/nominatim"             [1]=>             bool(false)           }         }         [6]=>         array(4) {           ["file"]=>           string(40) "/home/myusername/Nominatim/utils/setup.php"           ["line"]=>           int(118)           ["function"]=>           string(5) "getDB"           ["args"]=>           array(0) {           }         }       }       ["callback"]=>       NULL     }     DB Error: connect failed      and I am thrown back to the command line. I am logged in as a user who has a postgresql role of the same name and is a superuser. Any idea what went wrong? Do I need to create any database before doing this?


title: Why do I get different results with gdal_calc within the osgeo4w shell and QGIS' raster calculator?

text: I'm just wanting to make a simple map algebra operation in the osgeo4w shell using gdal_calc but I get wrong results when I divide one raster with the other. When I use the same rasters in QGIS and perform the same map algebra operation with raster calculator, I get no problem.


title: Export all visible layers in map view window to DXF (as one)

text: I'm looking to find a way of exporting all that is visible in the map view window to a dxf file. That is to say, multiple features from multiple layers, all at once. Can this be done?


title: Intersect two layers and get resulting features

text: I have X layers on a map and I need to intersect chosen layers (two per time) and color resulting features. I'm trying to get this code working               // get first feature (index 0)     ESRI.ArcGIS.ADF.Web.Geometry.Geometry adfFeature =                     m_firstLayer.GeometryFromRow(m_firstLayer.Rows[0])      as ESRI.ArcGIS.ADF.Web.Geometry.Geometry;          // THE FOLLOWING LINE RETURNS NULL     ESRI.ArcGIS.Geometry.IGeometry featureInterface = adfFeature as ESRI.ArcGIS.Geometry.IGeometry;          ESRI.ArcGIS.Geometry.ITopologicalOperator topoOp = adfFeature as ESRI.ArcGIS.Geometry.ITopologicalOperator;      How to use the IGeometry interface with an ADF Geometry object? I can't really find samples to intersect features between two layers, and it's a pity that Spatial Joins are just a arcgis desktop function, I surely could use them! Help please


title: How to script map production in GRASS?

text: I'm trying to automate my production of maps with GRASS. What I want to do can be described in fairly generic terms: I have two layers (one vector, one raster), which will be identical in every map. I have one layer (a raster heat-map) that will come from a different file for every map. I can write a shell or Python script (Mac OS X) to loop some GRASS command over all the heat-map files in a directory, but I am not sufficiently competent with GRASS to have figured out how to handle that end of the process. Could someone give me an example of GRASS command-line code that will take a few files as inputs and produce a single image file as output?


title: How can I make my python script results appear in model builder

text: I have a model (model builder) and within I added a python script to calculate a field. My problem now is, that I don't know how to make the output appear in my model as it is the same as the input (only with the field calculated). I imagine there is a very simple way, but I am new to model builder and python and just can't think of it? Alternatively, I could also try using the field calculator, but I would prefer it this way. Any help is appreciated. Thanks in advance! And here is my script:               import arcpy     from arcpy import env          env.workspace = arcpy.GetParametersAsText(0)  # the workspace     inLayer = arcpy.GetParameterAsText(1) # The shapefile     inField = arcpy.GetParameterAsText(2)  # The column in attr table with Area     outField = arcpy.GetParameterAsText(3) # The column in attr table which should be calculated          # Create a list from area field and find min & max value          listing = []     rows = arcpy.SearchCursor(inLayer)     for row in rows:         listing.append(row.getValue(inField))     del rows          listing.sort()     min = listing[0]     max = listing[-1]          # Calculate the normalized value          rows2 = arcpy.UpdateCursor(inLayer)     for row2 in rows2:         row2.setValue(outField, (max - row2.getValue(inField))/(max - min))         rows2.updateRow(row2)     del rows2


title: ogr2gr loading spatial data into mysql

text: I am trying to load shapefile into mysql (MYISAM) using ogr2ogr and i get an error that says failed to fetch the requested layer. What could be wrong with my statement is it the issue with quotes or not quotes. using ogr2ogr to check the validity of the shapefile produces results. I am working in a windows environment.   ogr2ogr --config SHAPE_ENCODING="UTF-8" -f "MySql" MySql:"database_name,   host=127.0.0.1,user=myUser,password=myPass,port=3306"   -lco engine=MYISAM "C:\data\county.shp"   -nln county -nlt "Multilinestring" -s_srs EPSG:4326


title: How to clean such a bad shapefile for routing ?

text: I am trying to clean a shapefile to make it usable for routing with pgrouting, postgis, postgresql. Here an intersection, it seems to be connected but when we zoom …. It is not: ![not zoomed 1](http://i.stack.imgur.com/EKkf6.png) ![zoomed 1](http://i.stack.imgur.com/q5wNc.png) Same here : ![not zoomed 2](http://i.stack.imgur.com/mdI06.png) ![zoomed 2](http://i.stack.imgur.com/1LPaw.png) Here (it is zoomed at max) there is 2 ways when it seems to be one, and only one is connected : ![zoomed at max 2](http://i.stack.imgur.com/n5BUr.png) I am using assign_vertex_id with different tolerances. And QGis and postgis but I don't know what to use in it. Thanks.


title: Draw a point with ArcGIS Javascript API

text: I am currently trying to draw a point with the ArcGIS Javascript API. Pretty much like this example, http://help.arcgis.com/en/webapi/javascript/arcgis/demos/toolbar/toolbar_draw.html, except the point will not be drawn with the mouse, but from an javascript object. If we look at the code, we see that a geometry object/array is passed in the function.               function addToMap(geometry) {         toolbar.deactivate();         map.showZoomSlider();              var symbol = new esri.symbol.SimpleMarkerSymbol(esri.symbol.SimpleMarkerSymbol.STYLE_SQUARE, 10, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255,0,0]), 1), new dojo.Color([0,255,0,0.25]));              var graphic = new esri.Graphic(geometry, symbol);         map.graphics.add(graphic);       }      If someone could write the structure for that object, and a method to draw the point (such as a button, with an onclick event, containing fixed xy coords) Dumping `geometry` looks like this http://pastebin.com/P9wfL36b (ouch!) This code will be used in a GPS tracking experiement, where I'll pull the current position from a database every 20 seconds or so. (details will not be covered in this post) Bonus question: How do I convert long/lat to xy coords from the sample? I use UTM zone 29N, wkid: 32629


title: Edit SDE table with ArcObjects - continued

text: **Update** So, I believe I'm getting closer to being able to edit my sde table, however now I'm getting stuck on this line: > Dim updateCursor As ICursor = table2.Update(Nothing, True) With this error message: > System.Runtime.InteropServices.COMException (0x8004056E): The object cannot > be edited using the current edit session mode. [mydatabase.LOADER.mytable] My code source for the updateCursor is from here: Update features - Using an update cursor The table I'm trying to edit is not versioned, I'm unsure of why I can not edit it. Here is my code so far. Thank you                           Dim server As String = "myserver"                 Dim instance As String = "5151"                 Dim database As String = "sde"                 Dim user As String = "myuser"                 Dim password As String = "mypassword"                 Dim version As String = "SDE.DEFAULT"                      Dim propertySet As IPropertySet = New PropertySetClass()                      propertySet.SetProperty("SERVER", server)                      propertySet.SetProperty("INSTANCE", instance)                      propertySet.SetProperty("DATABASE", database)                      propertySet.SetProperty("USER", user)                      propertySet.SetProperty("PASSWORD", password)                      propertySet.SetProperty("VERSION", Version)                      Dim factoryType As Type = Type.GetTypeFromProgID("esriDataSourcesGDB.SdeWorkspaceFactory")                 Dim workspaceFactory As IWorkspaceFactory = CType(Activator.CreateInstance(factoryType), IWorkspaceFactory)                      ' Cast the workspace to the IWorkspaceEdit2 and IMultiuserWorkspaceEdit interfaces.                                 Dim pSDEFeatWksp As IFeatureWorkspace = workspaceFactory.Open(propertySet, 0)                      Dim table2 As ITable = pSDEFeatWksp.OpenTable("mydatabase.LOADER.mytable")                      Dim workspaceEdit2 As IWorkspaceEdit2 = CType(pSDEFeatWksp, IWorkspaceEdit2)                 Dim muWorkspaceEdit As IMultiuserWorkspaceEdit = CType(pSDEFeatWksp, IMultiuserWorkspaceEdit)                      ' Make sure that non-versioned editing is supported. If not, throw an exception.                 If Not muWorkspaceEdit.SupportsMultiuserEditSessionMode(esriMultiuserEditSessionMode.esriMESMNonVersioned) Then                     Throw New ArgumentException("The workspace does not support non-versioned editing.")                 End If                      ' Start a non-versioned edit session.                 muWorkspaceEdit.StartMultiuserEditing(esriMultiuserEditSessionMode.esriMESMNonVersioned)                      ' Create a ComReleaser for cursor management.                 Using comReleaser As ESRI.ArcGIS.ADF.ComReleaser = New ESRI.ArcGIS.ADF.ComReleaser()                          ' Use ITable.Update to create an update cursor.                          Dim updateCursor As ICursor = table2.Update(Nothing, True) ' <<< ERROR HERE                     comReleaser.ManageLifetime(updateCursor)                          ' Find the positions of the fields used to get and set values.                          Dim myfield1 As Integer = table2.FindField("field1")                     Dim myfield2 As Integer = table2.FindField("field2")                     Dim myfield3 As Integer = table2.FindField("field3")                     Dim row As IRow = updateCursor.NextRow()      \-----------------Original question-------------------- This is a continuation question from: Edit SDE table with ArcObjects


title: How is margin of error reported on a map?

text: When reporting estimates you should always include the margin of error. There are conventional ways of reporting margin of error in a table, text or graph. But, how do you report margin of error for data visualized on a map?


title: R - Plotting shapefile with geographical (raster) data

text: Over the last few days I have been trying to plot a shapefile over data loaded into a data.frame within R. It should be a view of radar precipitation with an overlay of the country borders from a shapefile. The data contain per pixel values of radar reflectivity together with the lat and lon coordinates of each pixel. Therefore the data.frame contains three colums and the end of the data is shown below:                       lat     lon      precip      33290  55.376  6.013      128      33291  55.375  6.029      128      33292  55.374  6.044      128      33293  55.374  6.059      128      33294  55.373  6.075      128      33295  55.372  6.090      128      33296  55.371  6.105      128      33297  55.370  6.121      128      33298  55.369  6.136      128      33299  55.368  6.151      128      33300  55.367  6.167      128      33301  55.366  6.182      128      33302  55.365  6.197      128      33303  55.364  6.213      128      For each of these lat/lon coordinates I have the pixel x and y grid-coordinate so I could add those two columns to the data.frame to get someting like:               row        x        y  lat     lon        precip       19995      394      28 55.538  6.121      128     19996      395      28 55.537  6.137      128     19997      396      28 55.536  6.152      128     19998      397      28 55.535  6.167      128     19999      398      28 55.534  6.183      128      I have no trouble loading the shapefile using:               ned.lines = readShapeLines("d:/readShapefiles/NLD_adm/NLD_adm1.shp")     plot(ned.lines)      Plotting this shapefile together with the radar data has proven quite a challenge for me as I am unskilled with working with georeferenced data in R. I have looked amongst others at using libraries from geoR, ggplot, raster, gstat etc, but none seems to offer the solution I am looking for, but this is most likely due to a lack of understanding. What I expect to be the most efficient method is a plot of a georeferenced raster so that the shapefile can be plotted over this raster. The lon and lat coordinates are plotted as regular lat/lon, but when I even try to do something as simple as:               test=raster(list(x=lon,y=lat,z=precip))      I get: `"Error in .local(x, ...) : data are not on a regular grid"` The lat/lon coordinates have to be changed to a correct projection, but the exact way I should handle this is still unclear to me. I found this reference., but I just cannot seem to get the data plotted in such a way that I can overlay the shapefile. When I put the precip data simply in a matrix I can easily plot it using for example levelplot, but as this matrix lacks any geo-reference I cannot join it with the shapefile. I hope someone is able to point me in the right direction as being stuck on something that should be very simple in my mind is rather frustrating. Edit: As I commented below I created a raster using the pixel x and y coordinates. This avoids the problem I had with the projection. I also converted the shapefile data to a table with a lat and a lon columns which was seperated by 99999 when a new shape object began. The final code is shown here. It definately can be written more efficiently, but it does the job for me. Now I just need to do a bit of editing to get the image looking nice.               my.data=data.frame(cbind(x.pixel,y.pixel,map.data.mm))     r2=rasterFromXYZ(my.data)     plot(r2)     borders  = read.table("D:/readShapefiles/borders.txt", header = FALSE, skip=0, sep = ",")     vector.x=0     vector.y=0     n.shapes = which(borders$V1==99999)     for(i in 1:(length(n.shapes)-1)){         vector.x=0       vector.y=0       curr.vector.y=round(borders$V1[(n.shapes[i]+1):(n.shapes[i+1]-1)], digits=3)       curr.vector.x=round(borders$V2[(n.shapes[i]+1):(n.shapes[i+1]-1)], digits=3)       #lines(curr.vector.x,curr.vector.y)       for(j in 1:length(curr.vector.x)){             curr.xy = which.min(abs(x.lon - curr.vector.x[j])+abs(y.lat - curr.vector.y[j]))          vector.x[j] = x.pixel[curr.xy]         vector.y[j] = y.pixel[curr.xy]       }       lines(vector.x,vector.y)     }      Edit2: I am now able to plot the data together, but the image still looks wrong with only a small dot at grid locations instead of a nicely drawn map. Any suggestions are welcome! Code I am using is:               my.data=data.frame(cbind(lat,lon,map.data.mm))     r2=rasterFromXYZ(my.data)     plot(r2)     plot(ned.lines, add=TRUE)      Unfortunately I am not yet able to post a image here of the result, which shows only small dots instead of an actually filled field with radar precipitation:


title: ArcGIS Server - HeatMap for to identify hotspots on a cached service

text: ArcGIS Server lets you create cached map services. These can be consumed by various applications (ArcGIS Desktop, web apps, etc) I would like to get an idea on which areas of my cache are getting hit the most. I would like to visualise these results using a heat map overlaid onto the same cached map. I was thinking of utilising something like the HeatMapsAPI and one of the APIs provided by ESRI (Javascript API should be sufficient) I know the cached maps might be slightly changing at v10 of ArcGIS Server, but im trying to think of the best way of determining which tiles get requested the most without putting a significant load on either ArcGIS Server or the web server (IIS). I was originally thinking looking at the actual cache directory under the arcgiscache folder, and perhaps hooking into the Date Accessed attribute (but have little idea on how to actually implement this). I would like to hear from anyone who has experience with ArcGIS Server, on if they have any suggestions on how to do this?


title: In clause in Query

text: I am using ESRI JavaScript API 3.6. I want to perform a query operation on the fields returned by the rest service. As far as I know and have read, we can use like and = operators to query single values. But how do I pass more than one value to query? In my app, I have a world map that highlights about 4-5 countries on load. Is there a way where I can say query.where="COUNTRY in 'india,us,uk'?


title: ArcGIS Javascript Editor - showAttributesOnClick feature

text: I'm using the Editor dijit to add feature to my map. I was looking at one of the online samples, which mentions a "showAttributesOnClick" setting in the description. When I look at the code in that same sample, that setting isn't used and it's not documented in the API. Does that feature still exist? Has it been replaced with something else? I'd like to only display the AttributeInspector for a new feature, and hide it for existing ones. Thanks for the help!


title: Reduce the resolution of a shapefile in R (or QGIS if necessary)

text: I'm using shapefiles of history U.S. state boundaries from NHGIS to make maps in R. These shapefiles are much higher resolution than I need when making maps at the scale of the country: over 2 million observations for one file. Is there a way that I can reduce the resolution of these shapefiles in R? If necessary, I can do it in QGIS instead.


title: Migrating to ESRI js version 3.2 from 3.6

text: I have to migrate to esri js api 3.2 instead of 3.6 since 3.2 uses dojo 1.7 , what are the pros n cros.If change the code which is written in 3.6 to 3.2 i.e api reference then my code breaks , any suggestion. Below is the code if i point to 3.2 esri javascript api it breaks.               <!DOCTYPE html>     <html>        <head>          <meta http-equiv="Content-Type" content="text/html; charset=utf-8">          <meta http-equiv="X-UA-Compatible" content="IE=7, IE=9, IE=10">          <!--The viewport meta tag is used to improve the presentation and behavior of the samples            on iOS devices-->         <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">         <title>FeatureLayer On Demand</title>               <link rel="stylesheet" href="http://js.arcgis.com/3.6/js/dojo/dijit/themes/claro/claro.css">          <link rel="stylesheet" href="http://js.arcgis.com/3.6/js/esri/css/esri.css">         <style>           html, body, #mapDiv {             padding:0;             margin:0;             height:100%;           }         </style>         <script src="http://js.arcgis.com/3.6/"></script>          <script>            var map;           require(["dojo/on", "esri/map", "esri/layers/ArcGISDynamicMapServiceLayer", "esri/InfoTemplate", "esri/layers/FeatureLayer",                    "esri/symbols/SimpleFillSymbol", "esri/symbols/SimpleLineSymbol", "dojo/_base/Color", "esri/graphic",                    "dojo/parser", "dojo/domReady!"           ], function(             on,Map, ArcGISDynamicMapServiceLayer, InfoTemplate, FeatureLayer, SimpleFillSymbol, SimpleLineSymbol, Color, Graphic,               parser           ) {             parser.parse();                  var initExtent = new esri.geometry.Extent({"xmin":-21744805.806561172,"ymin":-4911537.689490959,"xmax":3302079.6219187006,"ymax":13090911.21222895,"spatialReference":{"wkid":102100}});                  map = new Map("mapDiv", {                extent: initExtent                     });                  var WorldCountries = new ArcGISDynamicMapServiceLayer("http://10.97.43.4:6080/arcgis/rest/services/POC/World_Countries_ESRI_WGS84_Generaliased2/MapServer");             WorldCountries.setDisableClientCaching(true);             WorldCountries.setOpacity(0.75);                  map.addLayer(WorldCountries);             showCountries();             map.on("load", initOperationalLayer);                  function initOperationalLayer() {               var featureLayer = new FeatureLayer("http://10.97.43.4:6080/arcgis/rest/services/POC/World_Countries_ESRI_WGS84_Generaliased2/MapServer/0",{                 mode: esri.layers.FeatureLayer.MODE_SELECTION,               outFields: ["*"],               opacity: 0.75               });                    var sfs = new SimpleFillSymbol(SimpleFillSymbol.STYLE_FORWARD_DIAGONAL, new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([255, 0, 0]), 2), new Color([255, 255, 0, 0.5]));               featureLayer.setSelectionSymbol(sfs);                     map.addLayer(featureLayer);               map.infoWindow.resize(250,350);                    on(map,"click", function(evt){                     map.graphics.clear();                          var query = new esri.tasks.Query();                     query.geometry = evt.mapPoint;                     featureLayer.selectFeatures(query,esri.layers.FeatureLayer.SELECTION_NEW, function (features){                         map.infoWindow.setTitle("Country Information");                         map.infoWindow.setContent("Country Name: " + features[0].attributes.COUNTRY);                         map.infoWindow.show(evt.screenPoint,map.getInfoWindowAnchor(evt.screenPoint));                     });                 });             }                     });                function showCountries(){                 var queryTask = new esri.tasks.QueryTask("http://10.97.43.4:6080/arcgis/rest/services/POC/World_Countries_ESRI_WGS84_Generaliased2/MapServer/0");                 //build query filter                     console.log(" showCountries");                             var query = new esri.tasks.Query();                             query.returnGeometry = true;                             query.where = "COUNTRY IN ('India','Brazil','Italy','Australia','France','Libya','Russian Federation','Ukraine','United States','Canada')";                             infoTemplate = new esri.InfoTemplate("Alert", "Alert for Re-insurance");                             console.log(" infoTemplate "+infoTemplate);                             dojo.connect(queryTask, "onComplete", function(featureSet) {                                     try{                                         console.log(" query complete");                                         var symbol0 = new esri.symbol.SimpleFillSymbol().setColor(new dojo.Color([255, 0, 0, 0.9]));                                         dojo.forEach(featureSet.features,function(feature){                                             //alert('feature'+feature);                                             var graphic = feature;                                             graphic.setSymbol(symbol0);                                             //alert("infoTemplate"+infoTemplate);                                             graphic.setInfoTemplate(infoTemplate);                                             //alert("graphic"+graphic);                                             //alert("map.graphics"+map.graphics);                                             map.graphics.add(graphic);                                         });                                 }catch(e){                                   alert("e"+e);                                 }                             });           queryTask.execute(query);           }         </script>        </head>        <body class="claro">          <div id="mapDiv">         </div>       </body>      </html>


title: ogc:filter how to filter a number?

text: The below sld passing attribute5 having 3.09 or 5.56. But not 1690.98 or 10923.34 which is just opposite of what we need. How to parse the string **attribute5** data as number here..                     <ogc:Filter>          <ogc:PropertyIsGreaterThan>            <ogc:PropertyName>attribute5</ogc:PropertyName>            <ogc:Literal>20</ogc:Literal>          </ogc:PropertyIsGreaterThan>           </ogc:Filter>


title: Can OpenStreetMap be used as a WMS service in MapServer?

text: I want to produce a png image that uses OpenStreetMap data and has a vector overlaid on the base data. I am able to produce the vector overlay from within Mapserver, but I have difficulty understanding how to include an external data source like OpenStreetMap. I would prefer to use an external service over loading the OpenStreetMap data directly as I wish to use it only as a basemap. Is it possible to do this from within MapServer?


title: How to open a shapefile linked custom metadata textfile within QGIS

text: I used a text file as a simple metadata for my shapefiles. It has basic information such as Source of raw data, Who can edit the file, Accuracy level, data category, Cost aquiring data, etc. The text file is saved with the same name and path with my Shapefile e.g.   * Conservation Area.shp   * Conservation Area.dbf   * Conservation Area.shx    * **Conservation area.txt** \----> the file What would be the best way for me to open this text file when its shapefile is an active layer ? I know, the perfect solution would be to create my own plugin that allow rightclick and select "open my meta". Unfortunately i'm not a coder. Temporarily, I'm doing it as follows. Create field named "meta" in the shapefile and populate EVERY row of the field with path and filename of the textfile.Then Create action > type : "Windows", action: notepad "[% "meta" %] To View, I select the new action Icon and click on any vector. Previously, I added the information in the Abstract section in Metadata but the information is attached to the QGS file instead of the shapefile. Other people opening the shapefile will not have the information. Thx for any heads up.... on win 7, x64, QGIS dufour 2.01


title: Why is "Join Attributes by Location" reporting different CRS (and running forever)

text: I have a point feature layer with ~240,000 parcel centroids. I have a second feature layer containing ~9000 subdivision polygons. I want to assign the name of the associated subdivision as a new field to each point in the parcel centroid layer. The polygon layer is a shapefile containing a single field, the subdivision name. The point layer is a csv file containing 3 fields - the parcel ID, lat, lon and is loaded using layer->Add Delimited Text Layer. The polygon layer is in WGS84/EPSG:4326. I have explicitly set the point layer to the same CRS. Everything looks sane on the map. I then try to do a spatial join: Vector->Data Management Tools->Join Attributes by Location. I set the target layer to the point layer, the join vector layer to the polygon layer. I set attribute summary to "Take attributes of first feature". I set the output shape file and click OK. I immediately get a warning message that the two layers have different CRS. But I have verified that are both EPSG:4326, as is the project CRS. I click OK and the progress bar immediately shows 15% and then life comes to a halt. The task monitor shows qgis running at 100% of CPU, but after several hours, it's still running at 100%, and the progress bar has not updated. I spatially indexed both layers. Why did I get the different CRS message? Why is this taking so long to run? (qgis 2.0.1 Dufour, Windows 7/64bit, Intel i7 2.4GHz) Is there a better/different approach I should try? Edit: For what it's worth, ArcMap 10.2 did the spatial join in about 15 minutes (rough estimate - I wasn't actually timing it.) If anyone wants to try this join, the data can be found here