title: Shapefile of points to grid

text: I am looking for a method/prog/library(java) to interpolate points from a shapefile to a grid (file). I have seen arcgis can do that but i am looking for something free. More specific: i have shapefiles(256 or more files) with points, those points have a value of temperature. Now i want to make a file with the values of a grid converted out of this points. The interpolation method is not very important for this project. The grid would be something of 10x10. I would like to do this in java and iterate over the files and convert them to grids. I presume there is a java library that can do this.


title: ArcGIS Server GP Service: How to create a txt file or rename a dbf to txt in the "%SCRATCHWORKSPACE%"

text: My end goal is to get an excel (I'll probably just settle for .csv) file loaded from a silverlight app into my "%SCRATCHWORKSPACE%" for my gp service. I will be linear referencing the data onto a polyline. I have silverlight reading the csv file's contents and packing it into a string to send over to ArcGIS Server. Then I want to write this data to a csv file in the "%SCRATCHWORKSPACE%". But I don't seem to be able to use any standard python code to hit the "%SCRATCHWORKSPACE%". Any thoughts or critiques?


title: How to programmatically convert arbitrary XML data to shapefile?

text: **EDIT:** Based on the answers below I decided to do some programming. I'll be using GEOtools for this, a java lib: http://www.geotools.org/ I have the following XML:               <shapes xmlns="http://www.meteogroup-maritime.com/spos/GISLayer"          name="Load line zones" transparency="50" onland="false">           <shape id="0" description="SUMMER ZONE" color="#FFFFC90E">        <polygon>         <location lat="35" lon="-180"/>            ....         <location lat="-33" lon="-170"/>         <location lat="-47" lon="-180"/>        </polygon>             <label lat="29" lon="-45" text="SUMMER ZONE" />        <label lat="-30" lon="-153" text="SUMMER ZONE" />      </shape>            ...          </shapes>      I want to turn this data into a shapefile, preferably by using existing software, although I don't mind scripting. How can I do this?


title: Converting Tab to Shp Using OGR2OGR with Python on linux

text: First i downloaded http://svn.osgeo.org/gdal/trunk/gdal/swig/python/samples/ogr2ogr.py and i am importing this. How can i get ogr2ogr to run in my script? nothing seems to be working and i not sure how to continue problem solving.               #!/usr/bin/env python         import ogr2ogr     import sys          if __name__=="__main__":     ogr2ogr.main('-f', "Mapinfo File", '/home/firstuser/birmingham/Wood.tab', "/home/firstuser/birmingham/Wood.shp")      With this i get main() takes at most 3 arguments (4 given) and when i do .               if __name__=="__main__":     ogr2ogr.main('-f', "Mapinfo File", '/home/firstuser/birmingham/Wood.tab')      i get               Usage: ogr2ogr [--help-general] [-skipfailures] [-append] [-update] [-gt n]                [-select field_list] [-where restricted_where]                [-progress] [-sql <sql statement>]                [-spat xmin ymin xmax ymax] [-preserve_fid] [-fid FID]                [-a_srs srs_def] [-t_srs srs_def] [-s_srs srs_def]                [-f format_name] [-overwrite] [[-dsco NAME=VALUE] ...]                [-simplify tolerance]                [-fieldTypeToString All|(type1[,type2]*)] [-explodecollections]                dst_datasource_name src_datasource_name                [-lco NAME=VALUE] [-nln name] [-nlt type] [-dim 2|3] [layer [layer ...]]           -f format_name: output file format name, possible values are:      -f "ESRI Shapefile"      -f "MapInfo File"      -f "TIGER"      -f "S57"      -f "DGN"      -f "Memory"      -f "BNA"      -f "CSV"      -f "GML"      -f "GPX"      -f "KML"      -f "GeoJSON"      -f "Interlis 1"      -f "Interlis 2"      -f "GMT"      -f "SQLite"      -f "ODBC"      -f "MSSQLSpatial"      -f "PostgreSQL"      -f "MySQL"      -f "PCIDSK"      -f "DXF"      -f "Geoconcept"      -f "GeoRSS"      -f "GPSTrackMaker"      -f "PGDump"      -f "GPSBabel"      -append: Append to existing layer instead of creating new if it exists       -overwrite: delete the output layer and recreate it empty       -update: Open existing output datasource in update mode       -progress: Display progress on terminal. Only works if input layers have the "fast      feature count" capability       -select field_list: Comma-delimited list of fields from input layer to                      copy to the new layer (defaults to all)       -where restricted_where: Attribute query (like SQL WHERE)       -sql statement: Execute given SQL statement and save result.       -skipfailures: skip features or layers that fail to convert       -gt n: group n features per transaction (default 200)       -spat xmin ymin xmax ymax: spatial query extents       -simplify tolerance: distance tolerance for simplification.       -dsco NAME=VALUE: Dataset creation option (format specific)       -lco  NAME=VALUE: Layer creation option (format specific)       -nln name: Assign an alternate name to the new layer       -nlt type: Force a geometry type for new layer.  One of NONE, GEOMETRY,       POINT, LINESTRING, POLYGON, GEOMETRYCOLLECTION, MULTIPOINT,       MULTIPOLYGON, or MULTILINESTRING.  Add "25D" for 3D layers.       Default is type of source layer.       -dim dimension: Force the coordinate dimension to the specified value.       -fieldTypeToString type1,...: Converts fields of specified types to       fields of type string in the new layer. Valid types are :       Integer, Real, String, Date, Time, DateTime, Binary, IntegerList, RealList,       StringList. Special value All can be used to convert all fields to strings.       -a_srs srs_def: Assign an output SRS       -t_srs srs_def: Reproject/transform to this SRS on output       -s_srs srs_def: Override source SRS            Srs_def can be a full WKT definition (hard to escape properly),       or a well known definition (ie. EPSG:4326) or a file with a WKT       definition.      Many thanks


title: How to represent the time(weekly/monthly) variationof a polygon map using one image?

text: I have a base map made up of three hundred polygons, each polygon get lots attribute values(For example, each week/month get a value). But I want to draw only one picture(due to page limitation) to represent the variation info.   Actually, I have tested two methods, one is layers, one is "subplot"(MATLAB).   **1\. Every monthly attribute can be draw as a layer, so the picture contains 12 layer. But the result is not clear for some areas, some polygon was covered by others.   2\. Draw subplot, a page maybe can contain 12 subplot images, but 52(week number of a year) is too much for one picture.**   Maybe I can use both two method with my monthly value, but none for weekly value. So my question is:   **Is there any other method for visual representation.** This is my first question on gis.stackexchange.com. So if any question or mistake, I'll fix it quickly. I need your help. Thanks a lot. * * * I'm sorry I can't paste my own data due to secrecy agreement, here is another sample in the ArcScene using ArcGIS sample data.( Only three layers was used in sample case, but my own data has 12 or 52 layers. I want to show all the layers using less even only one picture.)![SAMPLE PIC](http://i.stack.imgur.com/zG9Xu.jpg) PS: I don't know if there is any better solution except above two method.   Need your help. Thanks again.


title: Creating 3D lines from 3D points

text: Can you tell me the procedure in ArcGIS 9.3 to create 3D lines which connect the 3D points using the elevation of the points. For example, if pointA has 20 elevation and pointB has 30, then the line would connect pointA to pointB vertically such that one end point of the line would have 20 elevation and the other would have 30. Or, i would like to know how to create a 3D line directly without using the points, where i can define the x,y,z of the end points.


title: how to get json from describe feature type

text: i m using geoserver 2.1.3 i want to get the fields of layer from database http://[localhost]/geoserver/wfs?request=describeFeatureType&typename=topp:states this reurns me output in xml format how can i get it in json


title: What dissolve tool in QGIS allows me to summarize statistics for multiple attributes?

text: Is there a tool or plugin in QGIS that resembles ArcGIS 10's Dissolve tool? I'm trying to dissolve several polygons (parks) around the boundaries of another layer of polygons (cities), while performing various calculations for multiple attribute fields (like summing their total area, doing a count of features, etc). I looked into an earlier question (Batch Dissolve Polygons based on Attributes in QGIS or FWTools) where ftools was recommended, but ftools doesn't allow you to specify the way you would like to summarize statistics for multiple attribute fields. Is there one tool that allows me to summarize statistics for multiple attributes, like the ArcGIS Dissolve tool?


title: Fail to get heatmap from MULTIPOINT column of Spatialite layer in QGIS?

text: I got a heatmap from a POINT column of spatialite layer. But, when I made another heatmap from MULTIPOINT column, it was blank. What is the possible reason of this problem?


title: Making Map with Color Ramp Using SQL Database Intergration?

text: This could be a trivial question, but I've been kind of stuck on it for awhile. I'm trying to construct multiple maps that reflect aggregated data showing overall risk by county in a SQL Database (using Microsoft SQL 2012). Each entry in my data set reflects an insurance contract with a risk score associated with a FIPS county code. I would like to use the AddJoin tool to join to an associated shape layer on FIPS county codes. The resulting map would show each county's risk with an associated color ramp depending on the risk level. EDIT: I've taken RyanDalton's advice and created a seperate table that joins my data to a \ GIS database with shape entries on matching FIPS codes using MSSQL Server. I was able to connect to my specific database and make a new query layer useing ArcPy. The only problem I'm having is creating a color ramp based on the entries in my table (i.e. create a color ramp that shows differences between counties on values of Overall Risk Score). The below image shows what I am trying to do with ArcPy, as well as the resulting map on the right (shows overall risk for an earthquake in the US). ![enter image description here](http://i.stack.imgur.com/cDiWD.png) Below is a rough sample of my code which doesn't output a map with a color ramp:`                           import os, arcpy                 from arcpy import env                      # Declare Directories                 workingDir  = r'C:\Users\I55316\Documents\DQScore\ArcPy_Analysis'                 layerDir    = workingDir + r'\Layer_USNat'                 outputDir   = workingDir + r'\Output'                 dbDir       = workingDir + r'\DB'                 sdeFile     = 'DQ.sde'                      # Declare Database Server  Connection specifications                 databaseType        = r'SQL_SERVER'                 dataBaseInstance    = r'pmfldt43\sql2012'                 systemAuthType      = 'OPERATING_SYSTEM_AUTH'                           # Declare Query Layer Specifications                 PerilType               = 'EQ'                 layerName               = 'AllNationalCounty_EQ'                 query                   = 'SELECT * FROM dq.dbo.AllNational_EQ_GIS'                 oid_fields              = 'CNTY_FIPS'                 shape_type              = 'POLYGON'                 srid                    = '4326'                 spatial_reference       = arcpy.SpatialReference('WGS 1984 UTM Zone 12N')                           # Create Database connection via .sde file                 if os.path.isfile(dbDir+ '\\'+ sdeFile):                   os.remove(dbDir+ '\\'+ sdeFile)                 arcpy.CreateDatabaseConnection_management(dbDir,                                                         sdeFile,                                                         databaseType,                                                         dataBaseInstance,                                                         systemAuthType)                      arcpy.env.workspace = workingDir+'\\'+sdeFile                           arcpy.MakeQueryLayer_management(dbDir+'\\'+sdeFile,                                               layerName,                                               query,                                               oid_fields,                                               shape_type,                                               srid,                                               spatial_reference)                           # Declare map document                 mxd = arcpy.mapping.MapDocument(workingDir+r'\NationalDQScoring_EQ.mxd')                 mxd.author = "Krishna Soni"                           # Add Layer                 #lyrCounties    = arcpy.mapping.Layer(layerDir + r'\UnitedStates_Counties_TS2.0.0.lyr')                 lyrFaultLines  = arcpy.mapping.Layer(layerDir + r'\UnitedStates_FaultLines_TS2.0.0.lyr')                      # Define data frame                      df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]                      # Add Layers                 arcpy.mapping.AddLayer(df,lyrFaultLines)                      # Add graduated Colors                 for lyr in arcpy.mapping.ListLayers(mxd):                   if lyr.symbologyType == 'GRADUATED_COLORS':                       lyr.symbology.valueField = 'Overall_Risk_Avg'                       lyr.symbology.numClassed = 10      `


title: Wind turbine placement optimization and loss on surrounding house value

text: I am doing a geostatistical placement optimization study on where would be the optimal placement of a wind turbine in a Danish region. One of the variables taken into account is the cost on the value of the surrounding houses, which of course decreases with increasing distance. I have here a conceptual problem, and I would like to ask if anyone who has done or knows of such type of study could help me:   1. Assumed the turbine will be dismantled and removed on the 20th year, how would the cost of the installation of the turbine on the house value be calculated, considering the loss of rent (therefore through computing a 20 years annuity) or calculating it substracting the loss of value at t20 (adjusted to inflation and discounted for the social discount rate) - the loss of value at t0?   2. How would you calculate the cost of never removing the wind turbine? It is a very specific question, I hope someone can help.


title: Are there another way/tool as GDAL/ERDAS-API to convert a raster to ECW?

text: I am looking for a tool to convert raster (TIF, JPG) to ECW. I found this two year old question/answer How to convert orthophotomap to .ecw file? The answer is to use GDAL with an ERDAS SDK. I checked the current free versions of ERDAS SDK: The free version of ERDAS SDK is still read-only. Is there meanwhile another way/tool as GDAL/ERDAS-API to convert a raster to ECW? (I prefer a free program. If it is not free, information about the approximate cost is helpful.)


title: How to get LatLng array from geoJSON Layer in Leaflet?

text: i need to hand the latlng coordinates from my phpPostGIS-served geoJSONLayer as an array over to a new added HeatMap Layer. L.geoJSON has an build-in option: coordsToLatLng( coords )" and a static method for that: coordsToLatLngs( coords, levelsDeep?, reverse? ). I don´t get any errors, but the heat map does´t show up. If i build a new L.heatLayer(coord).addTo(map); outside the function, it works… Does anyone have an idea? This is what i have so far:                   $.getJSON("postgis_geojson.php?geotable=shops&geomfield=the_geom", function(data) {                  L.geoJson(data, {                 pointToLayer: function (feature, latlng) {                     return L.circleMarker(latlng, geojsonMarkerOptions);                      },                  onEachFeature: function (feature, layer) {                      popupOptions = {maxWidth: 200};                     layer.bindPopup(feature.properties.popupContent);                 },                 coordsToLatLng: function (coords) {                 return new L.heatLayer(coords);                 }                  }).addTo(map);             });


title: Join Standalone Tables from ArcGIS Server in Javascript API

text: I am trying to find a way to execute the equivalent of the following query with the ArcGIS JavaScript API (I made field and table names generic):               SELECT a.field1, a.field2      FROM table1 a, table2 b      WHERE b.id1 = '00016' AND b.id2 = a.id      However, `table1` and `table2` are from two different standalone tables in ArcGIS server (two different URLs). Is there any way to handle this sort of scenario when you have two different service URLs (`/MapServer/1` and `/MapServer/2`)?


title: GDAL Clipping (hack)

text: I am trying to use the python script from http://www.sparkgeo.com/labs/2010/07/07/gdal-clipping-hack/ to clip a raster based on many shapefiles. The script is using a mysql database an i would like to use it on a directory of shapefiles. I am not a programmer so I'am not sure how to make this work.


title: Removing "(optional)" from parameter description in Python script tool dialog?

text: I am using ArcGIS 10.2 and create a script tool in toolbox for attribute search on a layer, all the searching criteria is not compulsory, and user can combine multiple search criteria. But in the window all parameter together with (optional), I want to know whether there is a way to remove the (optional), the picture is attached. ![enter image description here](http://i.stack.imgur.com/NtwjA.jpg)


title: UK Building co-ordinates web service

text: Within the UK, do any commercial web services offer building level geocoding to a coordinate? If so what level of accuracy is available?


title: Why is tiff different in epsg 3857 and epsg 900913 in gdal

text: When I transform tiff from 4326 to 3857 and from 4326 to 900913 in gdal, I get different result(when display in Qgis) eventhough these two projections(3857 and 900913) should be the same. What is problem for that? Image shows differance. Brighter(white) layer is from epsg 4326 to 3857 and darker(black) layer is from epsg 4326 to 900913. I know it's not a real standard, but in gdal gdalsrsinfo -e epsg:900913 and gdalsrsinfo -e epsg:3857 are same,I mean both have same proj.4. So I don't understand, why are layers differently displayed in Qgis. ![enter image description here](http://i.stack.imgur.com/hlESc.jpg)


title: SLD - Is it possible to create a Rule that stylise only the first and last point of a Line?

text: I've read the SLD doc, but I can't find any clue on how to create an SLD file to add a graphic symboliser on the first and last point of a line. Does someone know how to do that ? Thanks.


title: ArcGIS python itertools.combinations

text: There is following sample code combination 5C2. I want to create all combinations 5C1 , 5C3 , 5C4 and 5C5.               list = [ 0,1,2,3,4 ]     5C1 means (0),(1),(2),(3),(4),(5)     5C2 means (0,1),(0,2),(0,3),..(1,2),(1,3),(1,4)..,(2,3),(2,4)     5C3 means (0,1,2),(0,1,3),(0,1,4),(0,1,5)..(1,2,3),(1,2,4)     5C4 means (0,1,2,3),(0,1,2,4),(0,1,2,5)..(1,2,3,4),(1,2,3,5)     5C5 means (0,1,2,3,4)      Please let me know your advice and comments.               import arcpy     import itertools          arcpy.env.workspace = r"C:\path\to\workspace"          base_shapefile = "some_shapefile.shp"          oid_field = arcpy.Describe(base_shapefile).OIDFieldName     feature_count = int(arcpy.GetCount_management(base_shapefile).getOutput(0))          for (i, j) in itertools.combinations(range(feature_count), 2):         arcpy.Select_analysis(base_shapefile , "combination_%i_%i.shp" % (i, j), '"%s" in (%i, %i)' % (oid_field, i, j))


title: Error when trying to run Create Extension postgis

text: I have installed PostgreSQL 9.x and PostGIS 1.5/2.0 several times and have never had this problem. I just got a new CentOS 6.3 server up and running and and I have Postgres 9.3 functioning as expected. I have run               yum install postgis2_93      and I can see the files in               /usr/pgsql-9.3/share/contrib/      however, when I run               CREATE EXTENSION postgis;      I receive               ERROR:  could not open extension control file "/usr/pgsql-9.3/share/extension/postgis.control": No such file or directory      the tutorials (#1, #2) I have used don't show any steps between installing PostGIS and creating the extension. **What am I missing?**


title: What is the most efficient way to check if coordinate didn't change for 10 minutes (c# or mssql) from a list of coords

text: I have a list of GPS coordinates (lat,lon) with a timestamp that I got from GPS logger. I want to find the first points that didn't change in a buffer of 100 meter for 10 minutes. What will be the most efficient way to do this (I can do it in c# or in mssql) ? for example , I drove my bike 20 k"m , stopped for half an hour (logger keep recording data every 10 seconds) and than continue to drive. I want to identify the first time I stayed in place in area of 100 meter (because logger isn't accurate) for atleast 10 minutes.


title: ERROR 001269 : Compressing the service definition failed.ArcGIS 10.1,Python 2.7

text: I am trying to publish an mxd using python script. I invoke this pyhton script from c# application, after creating the sddraft file, the system throws up this error "001269 : Compressing the service definition failed." I looked up online and it says that it gives this kind of error with 64 bit python, I was using python for visual studio(not Iron Python). And it also says online that "ArcGIS for Desktop was still using the 32 bits" Is there a way to publish the mxd or anything else which I should consider? Any help on this is most welcome.


title: How to select raster layers for averaging based on values in another layer?

text: I wonder if anyone have some ideas about how to solve this geoprocessing situation: **1:** I have a raster layer called **mixlyr_apr** (representing depth values) **2:** I have a series of raster layers called: **vv_10_apr** ; **vv_20_apr** ; **vv_30_apr** ; **vv_40.2_apr** ; **vv_55.5_apr** ; **vv_78.5_apr** ; **vv_113_apr** and **vv_242.6_apr** (representing vertical velocity for a particular depth) All rasters have the same extent, cell size, etc. Say, for example, the cell value of mixlyr_apr is 60. In that case I need to produce a raster layer with the average values (per cell) of the **vertical velocity** layers that represent the depths below the value of the **mixlyr** (60 in this case). That is to say, the average values (in this case) of **vv_10_apr** ; **vv_20_apr** ; **vv_30_apr** ; **vv_40.2_apr** and **vv_55.5_apr** Hope doesn't sound too confusing and some of you can suggest some ideas. Many thanks


title: Why is the "Best Fit" option is grayed out for Data Driven Pages?

text: I'm using Data Driven Pages to display delivery routes associated with hub points. On the extent tab, the "Best Fit" option is grayed out. What could be the cause of this? I think "Best Fit" is exactly what i'm looking for. ArcMap 10.2 Desktop Advanced.


title: Developing visualization on zip code level data

text: I'm trying to use the zip code data from the census (any year that works). I have 5-digit zip code data that I need to match up to a map/shape file. The problem is that the zip code tabulation files from the Censsus ZCTA that can be found here http://www.census.gov/cgi-bin/geo/shapefiles2010/layers.cgi have holes in them. I am assuming these are lakes, parks, and wilderness areas. However, every zip code map I've seen do not have these. Is there a resource or method of combining these to create a solid zip code area? Also, are there any other alternatives to zip code tabulation areas? Google maps will not work for what I am doing unfortunately. :( EDIT: I am aggregating zip codes based on the data I have. I was hoping that some of these regions would be absorbed by other zip codes so when they are aggregated (based on the data I have) it would show different regions without these holes.


title: How to calculate area or centroid of the_geom in CartoDB?

text: Is it possible to calculate area or centroid of the_geom in cartoDB? It would not be a huge time saver, and I am doubtful that it is an option but figured I would ask.


title: Is there a good free Flat style map tile available?

text: I'm building a website in the style of Flat Design, and hoping to find a map tile that complements the design and can be used with Leafletjs.


title: Statistical analyses for survey against raster?

text: I am somewhat of a newbie to geostatistical analyses, but pretty familiar with GIS and remote sensing packages. I was wondering if anyone had suggestions on appropriate geostatistical analyses for a particular data set. The data set consists of a large-scale survey at the land plot level consisting of questions related to political participation (an ordinal scale), and raster data from a binary landcover classification of forest cover. The survey data I am envisioning joining to a .shp file of landplot boundaries. I had wondered about either converting the vector to raster and analyzing raster against raster, or converting the landsat landcover map into a vector and analyzing vector x vector. The research question is whether political participation (potentially plus other variables) affects the presence of forest cover. What I´m imagining is some sort of multivariate linear regression in terms of the survey data, but when it comes to adding in the values from the raster I´m somewhat stymied. In doing some background research on potential approaches, it seems like looking at discrete variation might be the way to go. I´m using ArcGIS 10 and Erdas 2011.


title: Problem with spatial reference system / shapefile projection

text: I am new to using QGIS and having some problems getting some shapefiles to project correctly. I am using publicly available shapefiles for New York City municipal boundaries found here: http://www.nyc.gov/html/dcp/html/bytes/dwndistricts.shtml (ie borough shapefile) When I download and add the shapefile to my project, the shape is projected in an inaccurate geographic location (as in WAY off). The extents read as: 835386,112481 : 1144283,277548 And the metadata says: > "General: Storage type of this layer: ESRI Shapefile Source for this layer: > /Users/Koren Manning/GIS/nybbwi_12a_av/nybbwi.shp Geometry type of the > features in this layer: Polygon The number of features in this layer: 5 > Editing capabilities of this layer: Add Features, Delete Features, Change > Attribute Values, Add Attributes, Delete Attributes, Create Spatial Index, > Fast Access to Features at ID, Change Geometries Extents: In layer spatial > reference system units : xMin,yMin 912287.07,116411.37 : xMax,yMax > 1067382.51,273617.84 Layer Spatial Reference System: +proj=lcc > +lat_1=40.66666666666666 +lat_2=41.03333333333333 +lat_0=40.16666666666666 > +lon_0=-74 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us- > ft +no_defs" This doesn't make a lot of sense to me but it clearly seems like something is off with the spatial reference system. I tried changing the coordinate reference system to EPSG:4269 - NAD83 which is what other shapefiles I was using were in (from a different source) but this did not change the projection. Any idea what I am doing wrong? Any advice is appreciated. Thank you!


title: HTML5 maps with dynamic data instead of Flash

text: I was wanting to create maps on our site similar to http://globaledge.msu.edu/Countries/Rankings except that we want the maps to be HTML/HTML5 instead of Flash. (The above site is the site that I'm working on also) The data is dynamic and gets updated periodically, but there's no set time, I just update the database. Any help would be much appreciated. I've looked at MapBox, but they seem to be one time only type of maps and I'd have to create a different map for each variable.


title: Using Arc Objects to collapse a layer in the map TOC

text: I have the following snippit of code to perform this. However, it doesn't do anything to the layer in the TOC on the map that gets generated from this code. When the layer is created and the map shows up, the layer appears expanded. I want it to collapse. Am I doing something wrong? Thanks.                       IMap aMap = axMapControl1.ActiveView.FocusMap;             ILayer pLayer = aMap.get_Layer(0);             INALayer2 anNALyr = (INALayer2)pLayer;             anNALyr.Expanded = false;             axTOCControl1.Refresh();      Also, how do I get a layer in the TOC to move to the bottom of the TOC?


title: specify coordinate system on openlayers Filter

text: Is there anyway to specify which coordinate system to use with a filter? using the following filter:               new OpenLayers.Filter.Spatial({         property: "boundsText",         type: OpenLayers.Filter.Spatial.INTERSECTS,         value: geom     })      Produces this HTTP POST to my GeoServer:               <ogc:intersects>     <ogc:propertyname>bounds</ogc:propertyname>     <gml:polygon xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:4326">         <gml:outerboundaryis>             <gml:linearring>                 <gml:coordinates decimal="." cs="," ts=" ">-7670608.6611,2132898.8368875 -6261721.356,254382.4300875 -6653078.94075,6633511.0615125 -12758257.26285,6790054.0954125 -7670608.6611,2132898.8368875</gml:coordinates>             </gml:linearring>         </gml:outerboundaryis>     </gml:polygon>     </ogc:intersects>      and i get the following response error from GeoServer: > -7670608.6611 outside of (-180.0,180.0) **How can i change whatever coordinate system is being sent in my filter to decimal degrees?**


title: dateline issue: wrapDateLine with MapFile

text: I am using wrapDateLine properties for OpenLayers.Layer.WMS for handling dateline issues. The problem with wrapDateLine is that I am getting the same polygon repetitively around the wrapped map as a user selects a desired polygon around dateline. Is there any way to select the polygon around dateline in a single wrapped map and avoiding repetitions? My OpenLayers.Layer.WMS constructor is as:               var I = new OpenLayers.Layer.MapServer("region", "http://localhost/cgi-bin/mapserv?map=/home/public_html/test1.map",{poly='Bermuda', layers: 'myregion', format:'image/png'},          {wrapDateLine: true}         );      e.g. Bermuda in my example is in dateline and if I use wrapDateLine:true, I get complete polygon of Bermuda but it is repeated (wrapped). I want complete polygon of Bermuda but no repetition. Is there any other way for it? I see that there are options like OpenLayers.Bounds() and layer.adjustBounds(). I am not sure if it works in my problem. Thanks in advance!


title: How to connect points (bus stops), which don't lie on the lines (LINESTRING), to a network?

text: I need to connect bus stops (points) to a network layer (OSM data). These bus stops do not lie directly on the lines (see screenshot) nor should their location be moved. I use PostGIS, pgrouting and QGIS and the network is already routable with source and target columns etc. ![enter image description here](http://i.stack.imgur.com/SG3i6.jpg) Mainly I want to do two things afterwards: A) Getting the distances between the bus stops using shortest path analysis. B) Creating isochrones with walking distances from the bus stop using the OSM network. To get exact values it is necessary, that the routing 'starts' und 'stops' most closely to the bus stops. In many cases the closest existing node will be to far away to get exact values. But there should not be a routing to the actual point location of the bus stop. In my example on the picture you can see how the routing between stops should look like. My question is: Is there a possibility to insert new nodes automatically into the network (LINESTRING) which are closest to the bus stops? Or is it possible to start routing on a kind of 'dummy point' which is set just for the query (similar to what the road graph plugin in QGIS does)?


title: Batch shapefile merge, with adding and calculating field

text: I have over 60 shapefiles, all in their own folders. I'm looking to add a field titled "Name" and then populate it with the name of the shapefile. I want to be able to do this so that I can then merge the files together while retaining a unique identifier for each. I can do this by hand of course, but would like to script it. I don't know Python and I'm familiar though not very experienced with ModelBuilder. I'm using ArcGIS 10. Thanks!


title: Find points of interest near a path?

text: Imagine a table of points of interest along with lat/long. The user identifies two of these points. I want to do the following:   1. Calculate a great-circle path between these points   2. Find all POIs that lie within "n" miles of the great-circle path from step 1. I'm totally new to this stuff, what might be a good tool for accomplishing this? And how would you go about solving it using that tool? Thanks!


title: Error recognising password; importing OSM to PostGIS in QGIS

text: When selecting OSM Tools (Import into PostGIS) , attching my .osm file in the Input option, selecting my OSM Database, and then clicking run, I am prompted to enter a password for connection.               "Enter password for connection (or leave blank) "osm":"      When either leaving blank, making up a password, or using my Postgres password I get this error.               Password:     Connection to database failed: FATAL:  password authentication failed for user "osm"     Finshed!      I not sure what I am doing wrong. From what I have read it should authenticate. Thanks for any time you have.


title: Problem in displaying a GeoTiff image in JMapFrame

text: I'm trying to display a GeoTiff image with no projection but where the geographical extent (bounding box) is known:               reader= format.getReader(new File(sImageName));     GridCoverage2D gridCoverage= reader.getGridCoverage2D(null);     ReferencedEnvelope referencedEnvelope= new ReferencedEnvelope(-106,     -105,55,56, CRS.decode('EPSG:4326', true));     MapContext map= new DefaultMapContext();     map.setCoordinateReferenceSystem(CRS.decode('EPSG:4326', true));     map.setAreaOfInterest(referencedEnvelope, CRS.decode('EPSG:4326', true));     map.addLayer(reader, rasterStyle);     JMapPane pane= new JMapPane();     pane.setMapContext(map);      It does not work (with GeoTools 2.7.5), I get java.lang.NullPointerException at org.geotools.swing.JMapPane.setTransforms(JMapPane.java:1114) at org.geotools.swing.JMapPane.doSetDisplayArea(JMapPane.java:607) at org.geotools.swing.JMapPane.doSetMapContext(JMapPane.java:505) at org.geotools.swing.JMapPane.setMapContext(JMapPane.java:472) It used to work in an earlier version of GeoTools (2.7.2) with a simpler version of the code:               reader= format.getReader(new File(sImageName));     GridCoverage2D gridCoverage= reader.getGridCoverage2D(null);     MapContext map= new DefaultMapContext();     map.addLayer(reader, rasterStyle);     JMapPane pane= new JMapPane();     pane.setMapContext(map);     map.setCoordinateReferenceSystem(CRS.decode('EPSG:4326', true));


title: Convex Hull in SAGA Gis

text: How does one go about creating a convex hull from a set of points in SAGA GIS? I read that this is possible in QGIS, but I prefer SAGA and would like to see if it is possible. Furthermore, if it is possible to create said convex hull, is it possible to create multiple convex hulls around points with the same value of a classification variable with one command? I have a few hundred thousand observations with fairly accurate latitude and longitude values that also have their respective FSA from their postal code. I would like to create a polygon map of said city with each FSA as a separate polygon so I can do some aggregate analysis on neighborhoods created from manually unioning these polygons. I know Statistics Canada provides an FSA boundary file (I used it fairly extensively when I worked for them and do have access to it for free through my University), but I'd prefer to learn how to do this on my own.


title: Why is my PostGIS transformation not working?

text: I am using a PostGIS query to find the intersection of two streets, and then transform the results into lat/lon. The street database's current SRID is 6856, a projection I added to PostGIS myself; and the target SRID is 4326. For reasons unknown, the transformation is not working. Here is my original query, which produces a point in feet:               SELECT distinct(AsText(intersection(b.geom, a.geom))) AS the_intersection FROM (SELECT geom FROM public.streets WHERE streetname='LOVEJOY' AND prefix='NW' AND ftype='ST') a, (SELECT geom FROM public.streets WHERE streetname='23RD' AND prefix='NW' AND ftype='AVE') b WHERE a.geom && b.geom AND intersects (b.geom, a.geom);      And here is my modified query, in which I attempt to transform the feet to lat/lon:               SELECT distinct(AsText(ST_Transform(intersection(b.geom, a.geom),4326))) AS the_intersection FROM (SELECT geom FROM public.streets WHERE streetname='LOVEJOY' AND prefix='NW' AND ftype='ST') a, (SELECT geom FROM public.streets WHERE streetname='23RD' AND prefix='NW' AND ftype='AVE') b WHERE a.geom && b.geom AND intersects (b.geom, a.geom);      This is my error message:               ERROR:  AddToPROJ4SRSCache: could not parse proj4 string ''      I have verified that both 6856 and 4326 are available in my spatial_ref_sys. Any insights would be appreciated.


title: GAUL: Genetic Algorithm Utility Library has anyone use it in a C# solution?

text: The GAUL library is the library used for Pgrouting to do some of its functions. Has anyone use this library in a C# solution? If you do, do you have the wrappers needed for this or could you point me in the right direction to create those?


title: What is status of OpenSceneGraph (OSG) plugin for QGIS?

text: Does anyone know if the OSG plugin for QGIS is working? If so does anyone knows what the future plans is for OSG plugin in QGIS? I am using QGIS version 1.8.0-Lisboa. I keep getting the following errors when selecting the "launch Globe" menu option, with the WorldWind elevation type. `UnsupportedOperationException: GeometryGraph::add(Geometry &): unknown geometry type: N4geos4geom7PolygonE`


title: How do I make OpenLayers.Class.create() work in Openlayers 2.12?

text: At version 2.12 some functionality has been changed and moved to the "deprecated.js" I have the following code which I want to be able to run without "deprecated.js". how can I convert it ?               OpenLayers.Layer.MapInfoRESTHandler = OpenLayers.Class.create();     OpenLayers.Layer.MapInfoRESTHandler.prototype =          OpenLayers.Class.inherit( OpenLayers.Layer.Grid, {...      I know OpenLayers.Class() is funtion now , but I'm not sure how to use it in current syntax so it will create the same class as the code above (and same with inherit)


title: Creating Mobile web mapping application

text: I was interested in creating a mapping application in the iOS environment. I have looked at what ESRI has to offer, but I am interested in open source. Could anybody suggest any documentation or point me to some place where I could start learning how to create such apps? Thanks.


title: Multimodal route analysis not yielding correct results

text: I asked this question a while ago about a route in a multimodal network dataset not using all forms of transport available. While the answer worked at the time, I am now in a similar situation again. My multimodal network dataset has three feature classes containing a single bus route, bus stops and streets. The bus route and streets have fields containing one way status and the amount of seconds it takes to traverse them. My data is basically the same as the tutorial data for ESRI's tutorial on multimodal datasets, except I have bus lines instead of metro lines. I think my problem is with setting up the connectivity groups correctly. The bus route was created by tracing along the streets and splitting it at bus stops. The bus stops are snapped to the end points of each segment of the bus route, i.e. `Stop 1` is snapped to the from_point of `Segment 1` etc. The streets are not split at intersections. In theory, a pedestrian should be able to walk from a side road into a main road to a bus stop, board a bus, travel along the route, exit the bus and continue walking around the streets. My connectivity settings are as follows: ![connectivity groups](http://i.stack.imgur.com/Sh3zg.png) I have been using ESRI's tutorial as the basis for my dataset, but according to this: > For example, two edges created from two distinct source feature classes can > connect if they are in the same connectivity group. If they are in separate > connectivity groups, the edges won't connect unless they are joined by a > junction that participates in both connectivity groups. This seems to imply that I only need one connectivity group. I have tried solving for a route using both setups, but I have gotten an error each time. The analysis settings: ![analysis settings](http://i.stack.imgur.com/qc8Vn.png)


title: How do I export from Wikimapia to KML

text: I'm not a API person but a GIS user and I would like to export points from a category from Wikimapia to KML or any other useful GIS formats. Has anyone developed that? It could be interesting to add the analysis that we need to the data from wikimapia.


title: Problem reprojecting KML in EPSG:2039 Map - OpenLayers 2.12 + proj4js

text: I have KML files (EPSG:4326) and a background map I made using EPSG:2039 projection (mandatory). When I try reprojecting the KMLs to show in EPSG:2039 I don't succeed and still they don't appear on the map. Only when manually projecting everything to EPSG:4326 its working (But I need to be in EPSG:2039 for the client)                init: function () {              var transperantLayers = ["kml1", "kml2", "kml3"];              var P2039 = new OpenLayers.Projection("EPSG:2039");         var P4326 = new OpenLayers.Projection("EPSG:4326");              var activeProjection = P2039;              OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;              var options = {             maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508.34),             projection: activeProjection,             displayProjection: P4326         };                    var map = new OpenLayers.Map("map", options);              var base = new OpenLayers.Layer.MapInfoRESTHandler("Background", "MapTileServer",                                 { mapname: "Background", output: 'image/png', tileType: 'MBR', transparent: false },                                 { isBaseLayer: true, buffer: 1, transitionEffect: 'resize' });              map.addLayer(base);              for (var i = 0; i < transperantLayers.length; i++) {             var layer = new OpenLayers.Layer.Vector(transperantLayers[i], {                 projection: map.projection,                 strategies: [new OpenLayers.Strategy.Fixed()],                 protocol: new OpenLayers.Protocol.HTTP({                     url: "KMLs/" + transperantLayers[i] + ".KML",                     format: new OpenLayers.Format.KML({                         extractStyles: true,                         extractAttributes: true                     })                 })             });             layer.setOpacity(0.5);             map.addLayer(layer);         }              map.addControl(new OpenLayers.Control.LayerSwitcher());         map.addControl(new OpenLayers.Control.PanZoomBar());         map.addControl(new OpenLayers.Control.ScaleLine());         map.addControl(new OpenLayers.Control.MousePosition());              map.setCenter(new OpenLayers.LonLat(220000, 632000), 9);                  }      I've also tried instead of :               projection: map.projection      doing :               projection: map.displayProjection      but still no luck... not seeing the KMLs. Help will be appreciated.


title: How to Display Coordinates of an Existing Point Layer in ArcMap

text: I have been asked to provide a list of coordinates for a point layer in our GIS. I am currently using a state plane coordinate system. How do I view/list this data. Below is the data request in it's original form: (Each serial number is assigned to a specific city address) If I were to provide you with a list of ONT serial numbers like this one:               Serial Number Lon Lat     S050731154       S031620362       S022960010       S030560404       S021860376       S043371128       S032140857       S030490038       S023080296       S022380211       S030150116       S023080386       S043371132       Would you be able to fill in the longitude and latitude of the ONT owning that serial number based on the data stored within the GIS? Or on the other hand, do you have the ability to export such a list?


title: How to improve rendering performance of very large shapefile?

text: I have a polygon shapefile that has a 100MB .dbf and 500MB .shp file component. The reason it is so large is it is a landbase classification for a whole district. Everytime I am viewing the file in ArcCatalog or ArcMap and move the view window however slightly, the entire file needs to redraw from scratch. This is a problem the more zoomed-out I am. I have tried spatial indexing and importing into a geodatabase - neither approach provides any noticable performance improvement with respect to rendering. Esri's help page suggests that that to improve shapefile performance, the user can generalize the file. While this would obviously work, I do not want to lose any information. Splitting the file up is not ideal since I am doing a lot of geoprocessing/queries with its entire area. I guess I could avoid viewing the entire area at once - but sometimes, for example, it is good to see what parts of the file a query has selected. Is there any other approach I could take to improve rendering performance? (In theory, building shapefile "pyramids" would be ideal - I'm unsure why ArcGIS has never supported such an approach - at least that I am aware of...)


title: AddMessage issue

text: I wrote the following code as a wrapper around messages pushed durring the running of the script. Using Python IDLE this works fine, but in eclipse I get the following output:               def ESRIP(gp,message):         """Prints messages into ArcGIS Script window"""         message = str(message)         gp.AddMessage(message)         return message              print ESRIP(gp, "processing one million points")      Any thoughts on how I can remove the weird text?


title: What is ArcGIS for Desktop (and Geodatabase) equivalent to Regions of ArcInfo Workstation Coverages?

text: _Here's one for those who've been around the block a few times._ ArcInfo Workstation from days of yore had an intelligent data model called _Regions_ or _Region sub coverages_. With this model one could select one or more polygons and create new virtual polygons from the selected set. Furthermore one could dissolve within the set, creating a result akin to merged polygons, or have disparate polygons, possibly overlapping, that identify themselves as one unit (multipart polygons in shapefile parlance). These virtual polygons are called regions. When the regions are loaded into Arcmap (or ArcEdit/View back then) they behave like an independent shapefile or feature class in terms of querying, symbolizing, etc. The beauty of this model and what is missing from feature classes and feature datasets in the ArcGIS world, so far as I've been able to determine, is that **in regions the geometry is stored only once**. Imagine, for example, the continent of North America split into polygons depicting countries, islands, states & territories, counties, municipalities, etc. down to whatever level you feel like stopping at, all stored in a single feature class. (ugh, what a mess) Yet, each level has convenient handles (country, province, whatever) that can be grabbed and used as if they were independent feature classes. Coverages and Regions have their problems, they weren't left behind lightly, but they weren't all bad. Sooo, what is the ArcGIS answer to ArcInfo Regions?


title: Is there an existing library for converting ArcGIS Features to Json?

text: Is there an existing library for converting ArcGIS IFeature types to and from Json/GeoJson?


title: Creating a custom OpenStreetMap tile server

text: I'd like to create a map tile server based on the entire OSM planet database for a project I'm working on. I've worked with a couple of guides to try getting something up and running, but haven't found too many comprehensive resources that walk through this process from start to finish. My requirements so far:   * Linux-based (I'd prefer 10.04, but am open to anything)   * Tile rendering using Mapnik   * The ability to customize the cartography and symbolization to my needs (Quantumnik or Cascadenik seem like good tools for this) I'd really like to have good custom basemap cartography for some internal apps we're building and I figured this would be a good place to start. Anyone know of any good guides / resources to building this out? I'd prefer step-by-step explanatory stuff, as opposed to just the documentation for each of the components...


How to receive GPRS data and view it on a webpage? I am doing a GPRS Datalogger. It sends Data of some sensors to a web server using GPRS. I want to be able to view this data on a webpage in a browser say Google Chrome. Also I need the data which is received by server to be stored in a database. How should I proceed with the designing of Front end for my application? Should I use HTML 5, PHP and MySQL? Is there an example code which receives data from GPRS and shows it on a webpage?


title: Is there a bug in Georeferencing in QGIS 2.0?

text: I recently updated to QGIS 2.0. But now, when I need to georeference some pictures, I have serious problems. When loading the files to be georeferenced, I can see only a part of it in the window, so that working with it is not possible. Zooming out or in, zooming to the layer doesn't help anything: ![enter image description here](http://i.stack.imgur.com/TxJsf.png) First I thought that the size 2362 x 2637 is not suitable to QGIS, so I reduced it to 567 x 633 at 72 dpi, but the problem occurs. What can I do? Thanks a lot for your hint!!! Harald


title: Publishing PostGis table using GeoServer REST returns error when geometry column is NOT named "geom"

text: I tried publishing an existing PostGis table with geometry column named "wkb_geometry" to Geoserver using its REST API. I used the following command:               curl -v -u admin:geoserver -X POST -H "Content-type: text/xml" -d "<featureType><name>boundary</name></featureType>" http://mygeoserver:8080/geoserver/rest/workspaces/myworkspace/datastores/mypostgis/featuretypes      however, the server returned:               > <featureType><name>adminbnd_prov_xxx</name></featureType>HTTP/1.1 500 Internal      Server Error     < Content-Type: text/plain     < Transfer-Encoding: chunked     < Server: Jetty(6.1.8)     :java.io.IOException: Error occured calculating bounds* Connection #0 to host      mygeoserver left intact     * Closing connection #0      One thing I found out is that if I renamed my geometry column from "wkb_geometry" to "geom" and execute again the command, the PostGis table is published successfully. Using Geoserver's web interface, this is a not an issue. You can publish PostGis tables regardless of its geometry column name. Is this the default behaviour for the REST api? Is there any workaround on this? What does "error occured calculating bounds" has to do with it? Thanks a lot!


title: Combining two separate shapefiles with undefined projections out of Leica

text: So this is a mess. When the software outputs I have two shapefiles. The projections aren't defined, but I know one is WGS84 and the other is NAD 83. The NAD 83 includes northing easting and elevation and WGS has lat/long. I need to the northing, easting and actual elevation combined with the lat/long. I am combining the tables with a join to get the nad83 data into wgs84. Then a script written by a previous GIS Specialist converts this back to nad 83 and adds fields that are used in our flexviewer server. The problem is that these points are updated daily so there might only be 3 points and you need to still run the join, then the script. Is there a way to make the joining part easier? I can't figure out how to automate a join in several folders of data. One more thing is the wgs84 is called SMON and the NAD 83 is called SMON(2) and you're unable to change the names. Any ideas? I'm sure there's going to be questions.


title: How to Separate Bands Through ModelBuilder

text: Q1: I have a .tiff file containing 365 bands. Each band represents a daily variable. I want to separate each band and save as a single .tiff file. In the end, I want to have 365 individual .tiff files. Q2: And since these are daily data, is there are a way to make them monthly if you can share your model. How do I do this? I am using ArcGIS 10.0.


title: XML with polygons to Shapefile?

text: I would like to know how can I convert this xml with polygon coordinates http://api.antwerpen.be/v1/geografie/statistischesector.xml into a shapefile. I'm sorry if this is a silly question but I am quite new at this Thanks


title: QGIS spatial join, calculating distance from polygon to point layer

text: I am trying to perform a kind of 'spatial join' in Arcgis, joining to a polygon layer atributes of the closest feature of a point layer, as well as distance. But 'spatial query' doesn't offer an option 'closest feature on target layer'. I guess I could create a distance matrix, I've tried but the distances are something like 4695923.10207, can it be because I am working with WGS 84 non projected layers? And, is it possible to perform the spatial join I mentioned, resulting on a layer, instead of creating a distance matrix? Thanks a lot in advance!


title: pop up message box before a tool execution with arcpy/python

text: I want to add a box message to pop up before execution of a button tool. When I click a button which will do geoprocessing, i want a box to appear on view before processing with message that i am about to do xxx processing. Any suggestions how to do it?


title: How to run more than 10 routes at the same time in Network Analyst?

text: My team and I are trying to run food collection routes for a food bank in Mexico City but we can run more than 10 routes at a time. In order to run the eleventh we need to take one out. Does someone know what could be the problem or where to configure this?


title: Best way to find points outside state boundary that are supposed to be within specific State

text: I have a nationwide featureclass called bakeries. In the bakeries FC, there is a field called "State" and the field is populated with state abbreviations(AL,NJ,CT,etc). I have another feature class called United States, and that FC also has a field called "State" but it is populated with full state name. The bakeries dataset has some poorly geocodeded points that say that they are in a state(Alabama for example) but the location of the points falls outside the state boundary, sometimes very far away. Here is a snippet of what I have so far, you'll see that the code works but returns me everything that falls outside of the state versus the state specific data. My goal is to identify points that say they are within a state, but in actuality, fall outside the boundary.               for row in state_rows:              arcpy.AddMessage(str(new_name + "=" + "'" + row.getValue("STATE") + "'"))                 sqlExp = new_name + "=" + "'" + row.getValue("STATE") + "'" #making SQL Statement                    States2FL = arcpy.MakeFeatureLayer_management(States, outworkspace + "\\" + row.getValue("STATE")+ "_FL_FL",sqlExp) #Making Feature Layer of States.shp                 FC2FL = arcpy.MakeFeatureLayer_management(fc.CatalogPath,outworkspace + "\\" + row.getValue("STATE") + "_FC_FL") #Making Feature Layer of FC              arcpy.SelectLayerByLocation_management(FC2FL,"",States2FL,"","NEW_SELECTION")#selecting all data inside respective selected state                                                        arcpy.SelectLayerByLocation_management(FC2FL,"","","","SWITCH_SELECTION") #switch selection                      record_countAF = int(arcpy.GetCount_management(FC2FL).getOutput(0)) #Get After Record count                 percent = (float(record_countAF)/float(record_countb4)) * 100.00 #calc percent here


title: How can one compare two geometries in arcpy successfully?

text: I am trying to compare two separate feature classes to identify differences between them (sort of a diff function). My basic workflow:   1. I extract the geometries using a SearchCursor   2. Save the geometries of the two feature classes as GeoJSON using a modified `__geo_interface__` (got it from valveLondon `return {'type': 'Polygon', 'coordinates': [[((pt.X, pt.Y) if pt else None) for pt in part] for part in self]}`). This is to avoid the shared geometry object that ESRI uses with cursors and the inability to make deep copies (some discussions here on gis.stackexchange talk about it).   3. Check the geometries of the two feature classes based on a unique identifier. For example, compare the FC1 OID1 geometry with the FC2 OID1 geometry. To get the geometry as an ESRI object instance, call `arcpy.AsShape()` (modified to read polygons with holes (see point 2 above) with `return cls(Array([map(lambda p: Point(*p) if p is not None else Point(), part) for part in coordinates]))`. The comparison is simply `geom1.equals(geom2)` as indicated in the Geometry Class. I expect to find ~140 changes in geometries, but my script insists there are 430. I tried to check those GeoJSON representations and they are identical, yet the Geometry Class equals() refuses to say so. An example is below:               >>> geom1geoJSON      {'type': 'Polygon', 'coordinates': [[(-122.8423481559999, 47.060497293000083), (-122.84239755599992, 47.059262423000064), (-122.84416913599989, 47.059309693000046), (-122.84416913599989, 47.060497293000083), (-122.8423481559999, 47.060497293000083)]]}     >>> geom2geoJSON      {'type': 'Polygon', 'coordinates': [[(-122.8423481559999, 47.060497293000083), (-122.84239755599992, 47.059262423000064), (-122.84416913599989, 47.059309693000046), (-122.84416913599989, 47.060497293000083), (-122.8423481559999, 47.060497293000083)]]}     >>> geom1 = arcpy.AsShape(geom1geoJSON)     >>> geom2 = arcpy.AsShape(geom2geoJSON)     >>> geom1.equals(geom2)     False     >>> geom2.equals(geom1)     False      The expected behavior here should be True (not False). Does anyone have any suggestions before I move everything to ogr geometries? (I am hesitant as ogr.CreateGeometryFromGeoJSON() expects a string, and arcpy's `__geo_interface__` returns a dictionary and I feel like I am adding extra complexity). **EDIT** : Found the following resources helpful, even though they do not answer the question:   1. arcpy.Geometry question here on gis.stackexchange.com which was linked above in my text.   2. Errors in arcpy's Polygon class from the arcgis.com forums (apparently there are a lot of precision errors in ArcGIS 10.0 which theoretically got fixed in 10.1 but I cannot verify that, in 10.0 SP5 you still get the error).


title: Postgis error on select all intersetcs of a polygon

text: i can get all polygon on intersects this:-7.9245860488441 -37.122384500713,-7.9245860488441 -37.11904223938,-7.9233955716106 -37.1187601948               SELECT *      FROM propriedades      WHERE ST_Intersects(         ST_GeomFromText(location::geometry),         ST_GeomFromText('POLYGON(-7.9245860488441 -37.122384500713,-7.9245860488441 -37.11904223938,-7.9233955716106 -37.1187601948)'));      propriedades is my table location is a colunm on are saved geography polygons the returned error > ERROR: parse error - invalid geometry HINT: "POLYGON(-7.9245860488441 " <\-- > parse error at position 25 within geometry > > _**_*** _**Error **_** _*_** > > ERROR: parse error - invalid geometry SQL state: XX000 Hint: > "POLYGON(-7.9245860488441 " <\-- parse error at position 25 within geometry edit --- trying double parentheses: > ERROR: parse error - invalid geometry HINT: > "0103000020E610000001000000150000008C" <\-- parse error at position 36 > within geometry solved, i used the geography, no geometry:               SELECT *      FROM propriedades      WHERE ST_Intersects(         location,         'POLYGON((-7.9239281216632 -37.118491021708,-7.9239281216632 -37.116096663161,-7.9240937813677 -37.116105295265,-7.9241591799314 -37.116171875421,-7.9246636046819 -37.116271405188,-7.9259677455811 -37.118572530098,-7.9256079206171 -37.118728486796,-7.9243335012771 -37.118675962065,-7.9243194973485 -37.11849254918,-7.9242705964918 -37.118491021708,-7.9239281216632 -37.118491021708))'     )      but have other problem, i want intersects> 50 meters


title: Trying to fetch feature data by intersecting Vector Polygon and WMS feature layer

text: I am trying to intersect a user defined polygon with a Point WMS Feature Layer. I am using the following code               action = new GeoExt.Action({             text: "draw poly",             control: new OpenLayers.Control.DrawFeature(                 features, OpenLayers.Handler.Polygon, {                 eventListeners: {                     "featureadded": function(evt) {                         var pfilter = new OpenLayers.Filter.Spatial({                                  type: OpenLayers.Filter.Spatial.INTERSECTS,                                  value: evt.feature.geometry                              });                          }                    }             }),             map: map,             // button options             toggleGroup: "draw",             allowDepress: false,             tooltip: "draw polygon",             // check item options             group: "draw"         });         actions["draw_poly"] = action;         toolbarItems.push(action);      Now I do have the polygon geometry,               POLYGON((-12440279.225738 3759478.9686547,-12376683.618213 3731350.1422497,-12429272.293666 3708113.2856542,-12440279.225738 3759478.9686547)) { id=          "OpenLayers_Geometry_Polygon_384"          , components=[1], bounds=-12440279.225738,3708113.2856542,-12376683.618213,3759478.9686547, more...}      But I am not sure how do I proceed from here? Pls help.


title: Looking for major river basins boundaries worldwide

text: I need the data (lat,long) for the world's major river basins boundary. I want to use it in matlab, like "load coast" that gives the coast's boundary. thank you all


title: KML to shape QGIS conversion

text:
I am trying to import a KML file to QGIS. The KML source file is about 15mb is comprised of polygons with attribute data. The KML imports fine and polygons display but the attribute data is unreadable - all contained within [Description] field but looks like this:               "

ID_INT	NGA0104001

N_sd	Igbere

Skm2	3.34

PT2010	13000
"      As I understand it the conversion is handled by GDAL. I'm running QGIS v.1.8 on Ubuntu 12.04, but have built GDAL library 1.10.1 against the libkml library. Even if I attempt to convert to shapefile using the command line ogr2ogr method I still get the description field parsed incorrectly. I've tried various on-line tools (e.g.http://www.zonums.com/online/kml2shp.php) but my file is too large or description field comes out as above. As anyone had any success with converting kml to shape and retaining attribute data. I've found the pykml (http://pythonhosted.org/pykml/index.html) library and have been experimenting with it using ipython notebook to see if I could write the kml to a csv file but equally no joy:( Any help greatly appreciated! Marty p.s. the KML is too large to post but here's what it looks like:                       <?xml version="1.0" encoding="UTF-8"?>     <kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">         <Document>         <name>AFNGA_SWAC.kml</name>         <open>1</open>                               </Pair>             <Pair>                 <key>highlight</key>                              </Pair>         </StyleMap>                  <Folder>             <name>AFNGA_SWAC</name>             <open>1</open>             <description>1027 Éléments de la couche Afnga_swac</description>             <Placemark>                 <name>Aba</name>                 <description><![CDATA[

ID_INT	NGA0101001

N_sd	Aba

Skm2	384.07

PT2010	1010000
]]></description>                                  <Polygon>                     <extrude>1</extrude>                     <tessellate>1</tessellate>                     <outerBoundaryIs>                         <LinearRing>                             <coordinates>                                 7.294567000000001,5.00267,0 7.294408999999999,5.002552,0 7.294211,5.002394,0


title: KML (KMZ) to layer including all attributes

text: > **Possible Duplicate:**   >  How to convert KML to shapefile without losing attributes? This question is here in many variations but though I went through it I still don't have any good solution how to import KMZ/KML to GIS software - no matter if QGIS, ArcGIS, Mapinfo... All these softwares can now (5th 11/2012) more or less open/import KMZ/KML but none of them can do it including attributes (at least not with kml/kmz mentioned below). I have also tried to use "Zonum Kml2shp", ogr2ogr (not sure what " _The LIBKML driver with ExtendedData handling is now incorporated in GDAL Version 1.9.2 onwards, OSGEO4W packages, MS4W and Qgis Master._ " means because I have installed the new version of OSGEO4W and still can't get attributes) The data I need to convert are from Queensland Government Wetland Map: http://wetlandinfo.derm.qld.gov.au/wetlands/MappingFandD/WetlandMapsAndData/KMLMaps.html Also in the image: ![KML file with attributes](http://i.stack.imgur.com/VhQJO.jpg) KML example of polygon:               <Placemark>                         <name>Sys -17.59027,143.15424</name>                         <styleUrl>#R_WB</styleUrl>                         <ExtendedData>                             <Data><displayName>System</displayName><value>Riverine</value></Data>                             <Data><displayName>Wetland RE</displayName><value>2.3.24x11</value></Data>                             <Data><displayName>Wetland RE Percent</displayName><value>100</value></Data>                             <Data><displayName>Subdominant Wetland</displayName><value>-</value></Data>                             <Data><displayName>Legend</displayName><value>R_WB</value></Data>                             <Data><displayName>Hydrological Modifier</displayName><value>No modifications observed</value></Data>                             <Data><displayName>Salinity</displayName><value>Fresh</value></Data>                             <Data><displayName>Floodplain</displayName><value>-</value></Data>                             <Data><displayName>Regime</displayName><value>Commonly (80-100% of images)</value></Data>                             <Data><displayName>Habitat</displayName><value>Riverine</value></Data>                         </ExtendedData>                         <Polygon>                             <outerBoundaryIs>                                 <LinearRing>                                     <coordinates>143.16006,-17.58812 143.16081,-17.58859 143.1611,-17.58858 143.16222,-17.58841 143.16225,-17.58889 143.16159,-17.58914 143.16083,-17.58917 143.1606,-17.58923 143.15935,-17.58917 143.15884,-17.58908 143.15818,-17.58907 143.15783,-17.5891 143.15765,-17.58914 143.15662,-17.58958 143.15621,-17.58979 143.15532,-17.59033 143.15496,-17.59042 143.15466,-17.59036 143.15457,-17.59036 143.15446,-17.5904 143.15416,-17.59064 143.15401,-17.59088 143.15396,-17.59092 143.15306,-17.5914 143.15261,-17.59179 143.15179,-17.59219 143.15139,-17.59222 143.151,-17.59218 143.15091,-17.59218 143.15091,-17.59241 143.14997,-17.59242 143.14997,-17.59219 143.15008,-17.59219 143.14991,-17.59195 143.14966,-17.59182 143.14966,-17.59169 143.1499,-17.59148 143.1499,-17.5914 143.14968,-17.59117 143.15021,-17.59111 143.15099,-17.59095 143.15176,-17.59064 143.15233,-17.59051 143.15328,-17.59019 143.15342,-17.59016 143.1541,-17.59015 143.15515,-17.58977 143.15652,-17.58912 143.15712,-17.58888 143.15732,-17.58883 143.15759,-17.58879 143.15793,-17.58876 143.15879,-17.58852 143.16006,-17.58812 </coordinates>                                 </LinearRing>                             </outerBoundaryIs>                         </Polygon>                     </Placemark>      But there are many other data in KML/KMZ I would like to use with the same problem - no attributes after conversion = useless. Is it really that hard to get attributes from KML/KMZ? I don't see any limitation why this file couldn't be converted for example to one Mapinfo TAB file including points/polygons/lines, attributes in table ("ExtendedData") to it and at the end as bonus also colors for lines and polygons :) So sorry for repeating this question again, but is here actually any way to import KML (KMZ) to layer (Mapinfo TAB / ESRI shapefile / Any easily importable GIS format) including all attributes "ExtendedData"?


title: Silverlight API Radio Buttons from a dynamic map service layer in the legend

text: I am new to programming I am using API 2.4, silverlight 4 to create my web application. I have a application that has several feature layers, a dynamic map service layer and a couple tiled map service layers. I would like to have the three layers in the dynamic map service layer to be toggled on and off by a radio buttons so only one layer is on at a time. Below is my current code - any help would be greatly appreciated: MainPage.xaml:                               <esri:ArcGISDynamicMapServiceLayer ID="Attendance Areas"                                                        Opacity=".5"                                                        Url="http://webaddress"/>                          <esri:ArcGISTiledMapServiceLayer ID="Labels"                                                      Url="http://webaddress"/>                               <esri:FeatureLayer ID="Schools"                                         MouseEnter="FeatureLayer_MouseEnter"                                        MouseLeave="FeatureLayer_MouseLeave"                                        Url="webaddress"                                        OutFields="SCHNAME, ADDRESS, PHONE, URL"/>                          <esri:FeatureLayer ID="Schools Without Attendance Areas"                                         MouseEnter="FeatureLayer_MouseEnter"                                        MouseLeave="FeatureLayer_MouseLeave"                                        Visible="False"                                        Url="http://webaddress"                                        OutFields="SCHNAME, ADDRESS, PHONE, URL"/>                                         <esri:GraphicsLayer ID="ResultsGraphicsLayer"/>                     <esri:GraphicsLayer ID="MyGraphicsLayer"/>                     <esri:GraphicsLayer ID="IdentifyIconGraphicsLayer"/>                               <esri:GraphicsLayer ID="AddressToLocationGraphicsLayer">                         <esri:GraphicsLayer.MapTip>                             <Grid Background="LightYellow">                                 <StackPanel Margin="5" >                                     <TextBlock Text="{Binding [Address]}" HorizontalAlignment="Left" />                                     <TextBlock Text="{Binding [LatLon]}" HorizontalAlignment="Left" />                                 </StackPanel>                                 <Border BorderBrush="Black" BorderThickness="1" />                             </Grid>                         </esri:GraphicsLayer.MapTip>                     </esri:GraphicsLayer>                 </esri:Map.Layers>             </esri:Map>      App.xaml:                                       <DataTemplate>                                 <StackPanel Orientation="Horizontal">                                     <CheckBox Content="{Binding Label}"                                             IsChecked="{Binding IsEnabled, Mode=TwoWay}"                                             IsEnabled="{Binding IsInScaleRange}" >                                     </CheckBox>                                      </StackPanel>                             </DataTemplate>                 </Setter.Value>             </Setter>             <Setter Property="MapLayerTemplate">                 <Setter.Value>                          <DataTemplate>                         <StackPanel Orientation="Horizontal">                             <CheckBox Content="{Binding Label}"                                             IsChecked="{Binding IsEnabled, Mode=TwoWay}"                                             IsEnabled="{Binding IsInScaleRange}" >                             </CheckBox>                              </StackPanel>                     </DataTemplate>                 </Setter.Value>                      </Setter>         </Style>      MainPage.cs:                       private void Legend_Refreshed(object sender, Legend.RefreshedEventArgs e)         {             LayerItemViewModel removeLayerItemVM = null;                  if (e.LayerItem.Layer is ESRI.ArcGIS.Client.ArcGISTiledMapServiceLayer)                 e.LayerItem.LayerItems = null;                  if (e.LayerItem.LayerItems != null)             {                 foreach (LayerItemViewModel layerItemVM in e.LayerItem.LayerItems)                 {                     if (layerItemVM.IsExpanded)                         layerItemVM.IsExpanded = false;                           }                      if (removeLayerItemVM != null)                     e.LayerItem.LayerItems.Remove(removeLayerItemVM);             }             else             {                 e.LayerItem.IsExpanded = false;             }         }      From this post, http://forums.arcgis.com/threads/272...t=Radio+button, it seems like it is possible to toggle layers. I have 3 layer in a single service I would like to have toggle control on so only one layer is displayed at a time. I am just not sure how to go about doing that with the legend I have setup. Does any one have any sample code to get me started? Later I added the following code into my above code to attempt to make the radio buttons work. I succeeded in having radio button in the legend for the layer i wanted but the layer name not longer displays...only when I expand the layer I see the symbology. Also click the radio button has no effect on the map. Please, Please help - I am so completely stuck: App.xaml:                                           <i:Interaction.Triggers>                                     <i:EventTrigger EventName="Checked">                                         <i:InvokeCommandAction Command="{Binding RadioButtonCheckedCommand}"                                                                CommandParameter="{Binding ElementName=rbLayer}" />                                     </i:EventTrigger>                                 </i:Interaction.Triggers>                                  </RadioButton>      MainPage.xaml.cs:                private void RadioButtonCheckedCommand(object sender, RoutedEventArgs e)         {             RadioButton tickedCheckBox = sender as RadioButton;             string serviceName = tickedCheckBox.Name;             bool visible = (bool)tickedCheckBox.IsChecked;             int layerIndex = (int)tickedCheckBox.Tag;             ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer dynamicServiceLayer = MyMap.Layers[serviceName] as ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer;             dynamicServiceLayer.VisibleLayers = new int[] { layerIndex };         }


title: Defining the boundary of a catchment area

text: I digitized contour lines from topographic maps and created a DEM. With the DEM, I estimated the boundary of a catchment area. Estimated positional accuracy of topographic maps is RMSE = 65 m, with a systematic bias towards East. Using an affine transformation (R-package vec2dtransf), I shifted the data towards West. The RMSE of the affine transformation is 30 m. Visual check of the boundary using satellite images suggests that its actual position is more accurate than the former. However, I understand that there still is an uncertainty about the correct position and shape of the boundary. I will use the estimated boundary to limit the area were to make predictions of soil properties. But I want to be more confident that predictions cover the real area of the catchment. Thus, I am planning to increase the area adding a buffer equal to the RMSE of the affine transformation (30 m). I like to know if this approach is correct and if I am missing something.


title: Convert Lat/Lon to VicGrid94

text: In C# how can i convert a Lat/Lon coordinate to Vicgrid94 which is described http://spatialreference.org/ref/epsg/3111/ and also http://www.dse.vic.gov.au/__data/assets/pdf_file/0012/117102/VICGRID94MapProjectionInformation.pdf. The second link gives math examples of how to convert but is a little to much for me. I am aware of JavaScript library's and the like, but i would prefer to do this in C#


title: How to create a custom Balloon for Google Earth?

text: I just came across one question related to google maps in stackoverflow. Google Maps: How to create a custom InfoWindow? I really like the popup that they mentioned in the question and the image is as follows. Question: How to create or use same popup(InfoWindow) in google Earth.Is there any way to achieve this? **IMAGE:** ![enter image description here](http://i.stack.imgur.com/HAUUl.png)


title: Feature table: Mapnik, GeoServer, CKAN, GeoNode, GeoNetwork?

text: I'm trying to get a clear view of the roles of different components here, this is not a "which is better" comparison, these components have different roles, but their functions overlap. (Comparison of the different open source GIS servers would be an answer if it included GeoNode, CKAN and Geonetwork, it links to this excellent table: http://www.geotests.net/cours/sigma/webmapping/2013/tableau6_webmapping2013.pdf) So, can anyone help me fill in the holes / correct this table: ![image of table](http://greygreen.org/img/GeoGrid.png) https://gist.github.com/tbnorth/3be5b91fe10243898017 Y = Yes, N = No, < = handled by included subcomponent "Catalog data": provide searchable web / web-map front end view. GeoNode and GeoNetwork use GeoServer for rendering and nominally WMS etc. CKAN uses pycsw for metadata federation.


title: Images displaced in UTM

text: I recently received a collection of satellite images (GeoTiffs) and their indice. Originally, the indice came in a geographic projection (GCS WGS 1984) and the Geotiffs projected to the appropriate WGS UTM zone. However, when I loaded the indice and some of the photos together into ArcMap the images are significantly displaced to the north (whether I had the dataframe as geographic or projected). The indice is located in the correct position. Experimentally, I used ArcCatalog to clear all the transformation information. This resulted in the images lining up correctly with the indice, with their units still in meters. I didn't fundamentally like the idea of leaving the images without projection information, but:   * Setting the projection to GCS WGS 1984 resulted in the images disappearing completely. If I right click and choose "Zoom to Layer", it leaves the window wherever it was at. The map extent also does no change. The layer extent becomes "1,#QNAN", a null value.   * Setting the projection to the WGS 1984 UTM results in the original displacement (obviously)    * Setting the projection to GCS WGS 1984 and projecting into UTM results in an unknown error (a 999999 error), which makes sense as there is an error in the aforementioned GCS projection. I know this has probably been asked a million times here in this forum and elsewhere on the web, but I am stumped.


title: Remove/Delete a feature from OpenLayers vector layer

text: I have an OpenLayers layer with several vectors on it. I know the OpenLayers Feature ID (e.g. OpenLayers.Feature.Vector_241) and I would like to know how to remove this feature and only this feature? I have considered deleting them all and then looping through an array to redraw them, but this seems a little inelegant, and long winded. I have tried a variety of versions of the folllowing code:               layer.removeFeatures( featureID );      And               layer.removeFeatures( [featureID] );      And               layer.removeFeatures( {feature : featureID });      Etc... All help is welcome! Thanks C


title: Splitting large shapefile into numerous smaller files based on number of objects in each smaller file

text: I have a shapefile containing approximately 600 000 point-objects. Unfortunately, for a couple of reasons I need to split this file into a larger number of shape-files each containing approximately 200 objects. Is anyone aware of any tools/scripts that allow me to automate this process? I have tried to automate the process using e.g. the Split-tool in ArcGIS, however since I am more of an archaeologist than a programmer (and know next to no Python), I haven't been able to produce a script that does this. I am guessing that the best way to do this would be to use a counter which increments with +1 for each object passed into a new shapefile, and when that counter reaches 200 it resets and a new shapefile is created into which the subsequent 200 objects are copied. But as mentioned before, I haven't been able to write a script/create a workspace that does this. So, does anyone have any suggestions of scripts/programs that are able to do this? For the record: I am able to utilise ArcGIS 10 (with ArcInfo license), FME Workbench and any Open Source-program that you might recommend (which works on Windows).


title: How to edit a group of selected features in QGIS?

text: I am dealing with a large number of planning units across a very large study area. I am selecting a number of features using the advanced search in the attribute table, and would like to edit them (i.e. change their colour). The only way I can think of doing it is to save the selected features as a new layer, and then edit that. Is there an easier way? Any advice would be appreciated!


title: removing multiple additions to popup

text: I am using the GeoExt example and this is the js code and trying to get rid of the multiple lat and lon that get added into the PopUp on multiple clicks. Not sure which is the code that I need to comment out? I thought that removing,               this.handlerOptions = OpenLayers.Util.extend(                 options && options.handlerOptions || {},                  this.defaultHandlerOptions             );       Would do the job but it seems that is not right as I am still getting the multiple popups and commenting out that code made no difference. Not sure what that code was for?


title: How to select multiple features using advanced search SQL in QGIS

text: I have a layer of planning units covering a large area (there are over 16000 PU's). Three of the columns in the attribute table hold information about which planning units were included in the solutions from a conservation planning programme (Marxan). So the columns have an ID and then values ranging from 0 to 100 (the number of solutions that PU was included in). What I am trying to do is to select the PU's from each column that were in all 100 solutions (so have a value of 100) - BUT only the PU's that match i.e. only PU's that have a value of 100 in ALL three columns (the columns represent different run scenarios). I have tried SQL searches such as "ssoln_1 = 100 WHERE ssoln_2 = 100 AND ssoln_3 = 100" but my SQL is very basic and I am having no luck. Any suggestions would be hugely appreciated - I hope it all makes sense.


title: How to enable pop-up window for more than 1000 features in ArcGIS Online

text: Is there any way to enable pop-up window in ArcGIS Online for more than 1000 features for layers' information? When I try to add a shape file in arcgis.com to the map I get the message saying: > The maximum features allowed are 1000.


title: Aerial LiDAR: What is an acceptable resolution?

text: I am in the process of initiating a project involving laser scanning. The area to be scanned i s approximately 5000 km². We are initially going to use the data to create a **solar potential** application, but will also be obliged to use the raw data for **DGM** , **Surface modelling** , **Flood risk assessments** and even **3D City modelling**. We could order data with an accuracy of up to 10 points p/m². But usually for solar potential analysis not more than than 2 points p/m² is required. Having a more accurate data set sounds great, but I am also worried that my hardware won´t be able to handle these amounts of data. I have recently created a DGM for the 5000km² with a point concentration of 1 point for 12m, and this was quite time consuming. Has anyone had any experience working with similar data sets? what kind of hardware is able to handle these amounts of data? I have a new windows 7 machine with 12 cores and 8gb Ram...but is this enough?


title: Export each layer in map to a separate image

text: I have a mxd file with multiple layers I have to export to PNG/JPG. I would like to create a script which turns on layers one at the time before they are exported. So far I have come up with the following:               import arcpy, string          mxd = arcpy.mapping.MapDocument("current")          #Read input parameters from script tool     LyrList = string.split.(arcpy.GetParameterAsText(0), ";")          PNGPath = arcpy.GetParameterAsText(1)          #Turn of all lyrs in list     for lyr in arcpy.mapping.ListLayers(mxd, LyrList):         lyr.visible = False               #Turn on lyr and export as png one by one     for lyr in arcpy.mapping.ListLayers(mxd, LyrList):         lyr.visible = True         arcpy.mapping.ExportToPNG(mxd, PNGPath+"\\" + lyr.name + ".png")         lyr.visible = False          del LyrList     del mxd      For the LyrList I use a dialoge box with the parameter data-type as Layer. Does anyone have an idea how to get this script working? When I use the ListLayers wildcard the script does work, but since I have a lot of layerfiles which all hace a kind of unique name that does not do the job for me. thnx a lot!


title: SQL Server 2008 Spatial Index Nearest Neighbour

text: I am trying to query geopoints for nearest neighbour, Whether I use spatial index or not, I always get similar times and it takes about 6 seconds. How can I speed this query up? Here is my query:               Declare @param nvarchar(50);     set @param = 'POINT(32.489491 37.864724)'          Declare @paramGeom geometry = geometry::STPointFromText(@param, 4326);     Select top 1 MI_PRINX, MI_STYLE, TrafikIsigi, Demiryolu, UlkeSinir, ID, SP_GEOMETRY.STX AS Longitude, SP_GEOMETRY.STY AS Latitude, SP_GEOMETRY AS Geometry FROM dbo.NODE  (nolock)     WHERE NODE.SP_GEOMETRY.STDistance(@paramGeom) < 0.1     ORDER BY NODE.SP_GEOMETRY.STDistance(@paramGeom);      Here is my Index:               CREATE SPATIAL INDEX [IX_Spatial] ON [dbo].[NODE]      (         [SP_GEOMETRY]     )USING  GEOMETRY_GRID      WITH (     BOUNDING_BOX =(25, 35, 46, 43), GRIDS =(LEVEL_1 = HIGH,LEVEL_2 = MEDIUM,LEVEL_3 = MEDIUM,LEVEL_4 = MEDIUM),      CELLS_PER_OBJECT = 64, PAD_INDEX  = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]     GO      Any help will be appreciated.


title: Is there an equivalent of arcgis' eliminate feature for QGIS?

text: I already know of grass' v.clean, but I'm looking for something that doesn't involve third party software. Python scripts or addons are good candidates. What is arcgis eliminate : http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Eliminate%20(coverage)


title: Create PDF on server side by passing layer from flex client

text: I want to pass the user selected layers from client   1. User can select and change the order of layers as populated from different map services hosted on my arcgis server   2. User can set the transparency for each layer I want to create the web services for that I found some examples but i due to some reasons I don't want to use SOE


title: Zoom after apply CQL_FILTER in OpenLayers

text: I apply a filter to one layer and works nice. I want to maximize the bounds where I applied the filter, like this:               // mapbounds = array(minx,miny,maxx,maxy)          activeLayer = new OpenLayers.Layer.WMS(           layername, layerurl,           {              width: map.size.w,              srs: map.projection,              layers: layername,              height: map.size.h,              styles: '',              format: 'image/png',              transparent: false           }           );           // for example: conditions = 'igh > 5000 AND BBOX('the_geom,1,2,3,4)'          activeLayer.mergeNewParams({              'cql_filter': conditions           });          bounds = new OpenLayers.Bounds(mapbounds[0],mapbounds[1],mapbounds[2],mapbounds[3]);          map.zoomToExtent(bounds);      The filter works fine, but the zoom is restored too quickly after apply it. It's applied, but the layer restore to the initial view instantly. What am I doing wrong? Thanks in advance!


title: Who uses FME Python extension and how?

text: I saw a great interface to FME with Python there What you guys are doing with it? I want ideas.


title: How to create map tiles out of 25 images?

text: I am an absolute beginner of GIS and have the following situation:   * I need to create an offline map for Android,   * I have 25 pictures that represent a region that needs to be mapped in my application,   * I have the top left and the bottom right coordinates of the map (of the 5x5 grid comprised of the 25 images).   * I am thinking of using the Nutiteq SDK manage the map in my application (in order to add markers and user position). The Nutiteq Maps SDK supports: MBTiles, MGMaps, GeoTIFF and other formats. How do I create a usable format file out of 25 images and top left, bottom right coordinates?


title: SLD function/transformation based on table values

text: I'm trying to accomplish an apparently simple task, to display some lines from a postgis table, but I don't know how to do it. The table has, say, 3 fields, one for the geometry and the other two have some value. I'd like to set the color of the line based on one of the fields, I'll call it field1, and to set the dash pattern of the line based on the second field (field2).               field1     value  color     1      black     2      red     3      green     ...          field2     value  dash pattern     1      solid  (e.g. values for stroke-dasharray)     2      dot line     ...      I know how to create a style to accomplish that but mixing the filters/rules for managing 2 fields is a mess. Using another language I'd use a function with 2 parameters (the values of field1 and field2) returning the values to use for stroke and stroke-dasharray. I searched the docs and the only thing I found out is the function Recode but, as I understand, it uses only one input parameter. I read the docs about Transformations but I assume that they must be created outside SLD, I think it'd be overkill for my needs. Is there a way to accomplish my task?


I'm trying to create a layer based on a feature class, in ArcMap (I've created a geodatabase from Arcatalog and linked it to PostgreSQL). The feature class that I've created is registered as versioned. I start editing and draw my polygons and when I finish sketch I get this error : The create feature task could not be completed. the coordinates or measures are out of bounds. My coordinate system is : Morocco North (Degrees) Tolerance : 0.001 meters XY Resolution : 0.0001 meters Any thoughts ?