title: How to export a map (satellite image, 3 bands) to Tiff without losing the resolution in Qgis.

text: I manually improve the colour contrast of landsat images. The printing in pdf afterwards is OK, as it maintains the resolution due to the high dpi. Now I am interested to obtain a kmz/kml file of the satelite image for visualization in Google Earth. I have downloaded Maptiller which allows to load in tiff, and generate kmz. My problem, however, is that saving the map as tiff results in a maximum image size of 2.3MB, hence the resolution gets lost before the actual conversion to kmz. I used the garmincustommap plugin of Qgis, but same issue...Seems that the only straightforward way would be arcGis or globalmapper, which I do not have access to. Any suggestions?


title: How to insert data into postgis database with phpPgAdmin?

text: I have 50 line objects in .shp format in folder on my computer. I need to insert it to postgis database on the distant server.. When I log in in phpPgAdmin, it says it runs on localhost:5433. What is the quick way to insert my .shp data into database?


title: Customize LabelLayer extent based on density/location using ArcGIS JavaScript API

text: I'm using a LabelLayer that can be seen only within a certain minScale - maxScale window. I'm trying to display labels of census tract IDs within Illinois, and the difference in label density between the Chicago area and the rest of the state is significant. Would there be a way to customize the minScale and maxScale settings based on the feature? I'm very new to JavaScript, so I'll just demonstrate what I'm looking for in pseudocode:               if ("County_nam" == "Cook") {               minScale: 50000,               maxScale: 0         }     else if ("County_nam" == "Lake" or "County_nam" == "Dupage" or "County_nam" == "Will") {               minScale: 100000,               maxScale: 0         }     else {               minScale: 500000,               maxScale: 0         }


title: Importing hours and minutes into a date field, next to the date

text: I'm trying to clean up some data and make sure dates go into the date field. DateShot is my newly created date field and Date_Shot is my text field I want to convert. It will just return the date with out the time. It returns 4/23/2014 (whatever day it is) but not the hours and minutes. In a text field it returns date and hours, minutes.                timestr = time.strftime("%Y/%m/%d/%H:%M")                           for urow in urows:                     urow.DateImport = str(timestr)                     urow.shpname = filename      This is within a file geodatabase using arc 10.1. The editor tracker does time when it is enabled. I'm assuming this would do the same?


title: How to create WMS service with GeoServer?

text: I am trying to build first WMS service with GeoServer. I have made layer from shape and layer preview works fine. How can I open this layer with QGIS? How to do map with OpenLayers? I have tried to search GeoServer/OpenLayers guide for Dummies, but not find yet.


title: ArcGIS10.2 Data Merge error: 000732

text: I am running python in the ArcGIS python window. ArcGIS shows error message when trying data merge from arcpy. File "", line 1, in File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\management.py", line 3816, in Merge raise e ExecuteError: ERROR 000732:               import os     import arcpy     arcpy.env.workspace = "C:/the shapefile folder/"          path = os.listdir("C:/the shapefile folder/")#unzipped all shapefiles to this folder     shapefile = []     for i in path:         suffix = ".shp";         if i.endswith(suffix):#getting all files end with '.shp' to a new list             shapefile.append(i)     arcpy.Merge_management(shapefile,"C:/output folder")      I don't see where the problem is. Please help diagnose. Thanks!


title: Automate Add Layer in ESRI ArcMap 10.1

text: Using ArcGIS Desktop v10.1 with an Advanced level license we have georeferenced our engineering drawings in PNG format. Next we have created a polygon layer for every single drawing to see the Area of Interest depicted in the drawing. Is there an automated way to bring individual PNG layers by clicking on their respective polygon? I want a simpler way to add the georeferenced PNG into the map without having to use the classic "add layer" tool, where a user has to find the respective layer in their location on the network.


title: SLD style definition from GeoServer to Drupal

text: I've been experimenting with the SLD style definitions in both GeoServer and Drupal. What I want to achieve is to create a new style in GeoServer (by a curl operation, but I know how that works) and sync that style to Drupal's GeoServer Structure. In the GeoServer itself, the styling applies perfectly when going to the Layer Preview. Also adding a new style in Drupal will sync itself to the GeoServer, BUT not the other way around... So basically my question: Is it possible to sync a GeoServer style to Drupal? Thanks in advance.


title: How to determine correlation between two databases?

text: I need to perform some tests and verifications on databases and/or datasets. I need for example to analyze two databases and then determine if there is enough correlation between both.   My main issue is how to deal with correlation...   Do I need to dice/grid the map and analyze precisely each square?   Is it possible to compute statistical techniques (i.e. mean, median...) to achieve this goal or not at all? My datasets are essentially made of GeoTIFF files for elevation terrain information and Shape files for my objects (roads, trees...). I had a look on some APIs to work with those kind of files:   * Shapefile C Library   * PySAL   * GDAL - Geospatial Data Abstraction Library Finally I read in some research papers about softwares determining databases correlation, but couldn't find any of them:   * LightBox SAIC   * ZCAP Thanks for help.


title: convert ArcMap output map into PDF programaticaly

text: my question is how to convert ArcMap output map into PDF programitically,and what are the requirements for the same.


title: Merging of two maps having different data in ecognition

text: I would like to synchronise two maps having two data (map1 for building and map2 for vegetation) into main map.I used the rule set of "working with maps".But it doesn't merges the data.I am using eCognition 8.7 version.My task is to classify building in one map and vegetation in another map of the same area.After classification I want to synchronise the extracted building and vegetation into the main map.I could do up to this level , but it comes as two levels in main map.I have to get it in a single level in main map.


title: How to identify to which polygon a point belongs to?

text: I have 3-4 polygons containing lots of lon/lat points. I want to identify to which polygon a specific point belongs. Any help in this matter is appreciated.


title: Directory.GetFiles vs. ListDatasets - Which is the tool for the job?

text: I'm currently writing an arcobjects app that performs an arbitrary set of geoprocessing tasks on a group of shapefiles and/or dbf tables. My current implementation uses Directory.GetFiles to build an array of file paths which I feed to various GP execution functions. I'm wondering if ListDatasets can perform the same task. I need to search an entire directory tree starting at a given root folder for all files which match a given search string. I am not certain if ListDatasets will do this (I have a devil of a time deciphering the SDK documentation). In short, which would prove more efficient and effective and recursively searching a directory tree for .shp and .dbf files, `Directory.GetFiles`, `GP.ListDatasets`, or some heretofore unmentioned method?


title: Keep nonintersecting polygons during clip

text: I am using ArcMap 10. I have two datasets, one of which consists of many small contiguous polygons, and one which has many small non-contiguous polygons. The first dataset is census blocks, and the second is a polygon outline of urban areas generated from the raster datasets NLCD provides. What I want to do is clip each census block such that each census block polygon only contains the urban area specified by the NLCD polygon. Running clip with the census blocks as the input features gives me this. However, there are additional constraints: If the area of the intersection between a census block and the NLCD polygon is under a certain threshold (say, 1000 sq ft), then the entire census block should be kept in the output. In this example, the green polygon is the NLCD data, and the red outlines are the census blocks. You can see the resulting clip. ![http://i.imgur.com/ASYrc.png](http://i.stack.imgur.com/cEdPp.png) ![http://i.imgur.com/OBDkr.png](http://i.stack.imgur.com/KR62b.png) The issue comes when there is no intersection between the census block and the NLCD polygon; nothing is kept in the output for that census block. I need to do this for a large amount of data, probably in arcpy. What strategy would you suggest?


title: How to create a regular polygon grid in PostGIS?

text: How to create, on the shape of a polygon, a regular grid of polygons/squares of an given size, in postgis? I have thought about a function like Create regular point grid in Postgis only for squares, so that squares can be 5m x 5m or even 10m x 10m. But have no idea to change this in the correct way.


title: Unable to create temporary GeoDatasets in g_g_g folders

text: I am converting a VBA macro that was written for ArcGIS 9.3 to a VB.NET project using the ArcGIS 10.0 .NET SDK. I am getting the following error whenever the code tries to create a temporary IGeoDataset in a "g_g_g" folder: "(esriDataSourcesRaster.GdalDriver) Failed to copy raster dataset ERROR 010240: Could not save raster dataset to E:\temp\g_g_g2 with output format GRID." (with the g_g_g2 incrementing by 1 with each failed attempt) It is able to create the "g_g_g" folder as well as create two files: dbldbnd.adf and hdr.adf before it fails. When it creates a "raster" folder, it creates these files as well as 5 other .adf files and a log file. It creates a temporary IGeoDataset in a "raster" folder just fine. I have tried a number of things to get past this error without any luck. Why am I getting this error and how can I fix it? I have never used ArcGIS before, so if there is some important detail I have failed to add, please let me know.


title: ERROR 000800 when trying to snap points layer to line or buffer layer

text: I am very new to GIS, so go easy on me. I am using ArcCatalog 10.0 and trying to snap a set of points to another layer that has roads in it. The points represent 10th miles along the road. Here are the general steps for what i am doing: 1) create a new local geodatabase 2) copy my points and road layers into new GDB via copy/paste. 3) double click the snap tool in toolbox -> Editing tools 4) enter points layer as "input features", and line layer as "Snap environment". These steps result in this error: ERROR 000800 The value is not a member of END | VERTEX | EDGE. I have googled all over and read all the docs I could find on the ESRI site, but i can't make sense of what this error is telling me to do. does anyone have any ideas? P.S. I also tried to create a buffer layer from the line layer using toolbox -> Analysis tools -> Proximity -> buffer and using that in the "snap environment" paramater, but i get the exact same error. I suspect my line layer is in the wrong format, but I am stumped on my next steps. Thoughts?


title: How to recalculate the the length of a geography linestring from nearby geography point in POSTGIS?

text: I have a geography type linestring *route_geography geography(LineString,4326)*, its a route from point A to point B. Now I have a point C near that line. I want to find the nearest point on that line, lets call it D. And then calculate the distance between D and B. Should I use *ST_Line_Locate_Point()* to find the point D? And if I do find the point D should I then use *ST_Line_Substring()* to split up the AB linestring to make a new DB linestring? These two functions are for geometry type not geography that my data is in, so what should I do?


title: Getting ExecutionEngineException when using GetCount in loop

text: I've created a small ArcObjects app that searches for all matching files in a directory tree and returns the matched files with the number of rows in each file. When performing this loop on a small number of files it seems to process fine. However, when running it over a larger number of files (81), it throws a `System.ExecutionEngineException` error that I'm having a hard time tracking down. Here is the (allegedly) relevant code. _FYI: The Execute method is thanks to one of Kirk's excellent answers in another question about debugging, I believe._ Following the stack trace of               Multinet Merging Application.exe!Multinet_Merging_Application.shp2gdb_form.Execute(ESRI.ArcGIS.Geoprocessor.IGPProcess proc = {ESRI.ArcGIS.DataManagementTools.GetCount}) Line 460 + 0x10 bytes  C#     Multinet Merging Application.exe!Multinet_Merging_Application.shp2gdb_form.RunCount(string[] inFile = {string[81]}) Line 448 + 0x8 bytes  C#     Multinet Merging Application.exe!Multinet_Merging_Application.shp2gdb_form.SearchAndReport(int option = 1) Line 106 + 0x3a bytes  C#     Multinet Merging Application.exe!Multinet_Merging_Application.shp2gdb_form.searchBtn_Click(object sender = {Text = "Search and Report"}, System.EventArgs e = {X = 125 Y = 13 Button = Left}) Line 326 + 0xd bytes  C#        Here are the functions--                private void searchBtn_Click(object sender, EventArgs e)             {                 if (infolderselected == true && filetypeselected == true)                 {                     string dir = folderTextBox.Text;                     string[] oDir = Directory.GetDirectories(dir);                     if (oDir.Length > 500)                     {                         if (MessageBox.Show("There are more than 500 directories under this root folder. Are you sure you wish to perform this operation?", "Warning", MessageBoxButtons.YesNo) == DialogResult.No)                         {                             searchrep.Text = searchrep.Text+ "\nSearch canceled!";                             return;                         }                     }             }          private void SearchAndReport(int option)         {             string searchstr = type + shpdbf;             string dir = folderTextBox.Text;             try             {                     searchrep.ForeColor = Color.Black;                     setOutputText(searchrep.Text + "\n" + sb.ToString());                     setOutputText(searchrep.Text + "\n--Performing Count. Please wait...");                     setOutputText(searchrep.Text + "\n--Total rows in listed files: " + RunCount(oFiles).ToString());                     setOutputText(searchrep.Text + "\n---------- Search and Report Complete at: " + DateTime.Now.ToString() + " ----------\n");                     searchBtn.Enabled = true;                  }             catch (UnauthorizedAccessException error)             {                 MessageBox.Show(error.Message + "\nThis process cannot continue.", "Error");                 setOutputText(searchrep.Text + "\nSearch failed due to error.");             }         }     private static int RunCount(string[] inFile)         {             finalcount = 0;             GetCount count = new GetCount();             foreach (string file in inFile)             {                 count.in_rows = file;                 Execute(count);                 finalcount += count.row_count;             }             return finalcount;         }     public static void Execute(IGPProcess proc)         {             Geoprocessor gp = new Geoprocessor();             gp.AddOutputsToMap = true;             gp.OverwriteOutput = true;             gp.RegisterGeoProcessorEvents((IGeoProcessorEvents)new GPEvents());             IGeoProcessorResult2 result = gp.Execute(proc, null) as IGeoProcessorResult2;             IGPMessages msgs = result.GetResultMessages();             for (int i = 0; i < msgs.Count; i++)                 Debug.Print("{0} {1}", msgs.GetMessage(i).Description, msgs.GetMessage(i).Type);         }      Apologies, that seems excessive. The gist of the process is that I am attempting to use the Get Count GP tool to return the number of rows from all the files returned in the search. It runs peachy until the number of files returned gets to a certain point, and then it goes kaput. Any ideas?


title: Looking for PDF map downloading capability in OpenGeo GXP

text: I am looking for a plugin to OpenGeo GXP in order to download maps in PDF format. Could you help me? Thanks


title: creating clusters of point data

text: I have a map of stores for a retailer. I am trying to form clusters (of these stores) such that each member of a cluster is at most 5km away from any other member and any non-member is at least 10 km from any member. I also would like to create a field in the point dataset indicating to which cluster a specific store beongs to. What would be the easiest way to do this? Thanks


title: Sextante script for statistic info

text: I want to generate a script for getting statistic information window from selected feature. For example i have two layer building(polygon) and railway(linestring). By using this tools i got a window dialog that shows me total number of features, total lenght of railways maybe... Exactly i need windows/dialog screens examples for Sextante. But lots of tutorials are about algorithms. Here is an example windows that generated by using " _Basic statistics for numeraic fields_ " tool from _Sextante/QGIS geoalgorithms/Vector table tools_ ![enter image description here](http://i.stack.imgur.com/0IgSp.png)


title: A library/software to create DEM from a topographic map

text: In one of my projects I need to digitize video clips showing some natural landscape. Specifically I need to know distances between different areas and elevation levels. I have a topographic map of the area so distances are not a problem. Is there any tool / library that allows to create DEM from a common topographic map? A language of the library doesn't matter, but I prefer open source solutions if possible. I know about QGIS and GRASS, but I cannot found how to use them for this specific purpose. EDIT: My map looks like this: ![enter image description here](http://i.stack.imgur.com/X0ChK.jpg)


title: Problem with matplotlib when installing QGIS on mac

text: I have matplotlib installed on a Mac (Mavericks) via `pip`, which means the matplotlib files get installed under /System/Library/... I tried installing the most recent version of QGIS, and the install fails because it can't find matplotlib. I'm thinking this is because I didn't use `easy_install`, which appears to put packages instead under /Library/... Is there an easy way to tell QGIS to look for packages under /System/Library - is it merely a matter of setting some environment variable that QGIS looks at ? thanks ! Update:   * I'm installing QGIS from the .dmg package provided at kyngchaos.com   * the error message started when I double click the .dmg to install it. I get a popup complaining that matplotlib is not installed even though it is installed and command line python can see it. I believe (based on other notes at kyngchaos.com) that the difference is because of my use of python.org python and `pip` instead of system python, and the different place that libraries are placed in.


title: Change palette of basic colors grid in 'Select color' dialog

text: I would like to know if there is a way to change the default palette of colors (48 Basic colors) which is displayed on the dialog "Select Color". Specifically, I want that when I add a layer the automatic color would be on the pastel palette. I tried to set the color ramp from the project properties menu, but still when I add a layer it would be displayed par default with a very dark color. Is there a way to change this settings for my QGIS?? Do I have to write some python script for this? Thanks for taking the time to read.he


title: Feature Layer Attribute table to Datatable and make it editable

text: Hi Currently i'm using this to turn it into a data table                featureCursor = layer.FeatureClass.Search(que, false);                         row = featureCursor.NextFeature();                              if (row != null)                         {                             for (int i = 0; i < row.Fields.FieldCount; i++)                             {                                 dataTable.Columns.Add(row.Fields.get_Field(i).Name);                             }                             while (row != null)                             {                                 dataRow = dataTable.NewRow();                                      for (int j = 0; j < featureCursor.Fields.FieldCount; j++)                                     dataRow[j] = row.get_Value(j);                                      dataTable.Rows.Add(dataRow);                                 row = featureCursor.NextFeature();                             }                         }      Does anyone know a more efficient way on doing this. Also I'm binding the data table to a datagrid, does anyone know a good way i can do this so that i can make the attribute table editable, and values reflected in the feature layer. I can do this, but not cleanly, has anyone tried this before? Thanks and Regards, Kev84


title: cannot import deegree workspace

text: I am working on `deegree 3.0`. I want to import the `deegree-workspace- inspire` workspace on deegree console, but I face this error:               Unable to import workspace: Download of     'http://repo.deegree.org/service/local/artifact/maven/redirect?     r=releases&g=org.deegree&a=deegree-workspace-csw&v=3.3.9&e=deegree-workspace' failed.     Server responded with HTTP status code 404      how can I fix it?


title: How to use the same ROI for multiple LANDSAT images in ENVI?

text: Suppose that I have 3 landsat images with the same datum ( WGS-84 ) and projection system ( UTM, Zone 39N ) as follows: TM LANDSAT 5 image for July 1987   ETM+ LANDSAT 7 image for July 2001   OLI_TIRS LANDSAT 8 image for July 2013 I have drawn a ROI in `TM LANDSAT 5 image for July 1987` and saved it in a `.roi` file and now I want to use that ROI to `subset data via roi` for all of the images. But I encounter the following problem: I have opened all of the images in ENVI in multiple displays, restored the roi and then used the option `subset data via roi`   when I do this for `TM LANDSAT 5 image for July 1987`, there's no problem and the action is done completely and I can store subset data to a file but for the remaining two image, I encounter the ENVI error: **There are no available ROIs associated with this input file** What can I do?   Because I'm doing a change detection project, I don't want to draw approximately identical ROI's in multiple images???   And also I think regarding the same coordinate system for all of the images, I should be able to draw a ROI in one image and then use it in other images???   Is that true or maybe I'm thinking in a wrong way???


title: Help needed with the use of FARSITE

text: Is there anyone who has worked with FARSITE? I can build some of the files needed, such as slope and aspect, but not sure where to start when it comes to building files for 'canopy', 'fuels', etc. I am currently using QGIS 1.8.0. The tutorial provided with FARSITE is excellent, and I worked through that easily. It's in creating the files for my area of interest that I'm encountering problems. These would have to be created for South African conditions.


title: TileStache + OpenLayers TMS - Tiles are rendered disorderly

text: I newly turned to TileStache to render Mapnik tiles because of the caching option. Before, I was using Mapnik python bindings only and it was working perfectly. Now that I use TileStache, the tiles are rendered randomly at wrong position in wrong order, just like pieces of a puzzle. Only at zoom 0 the features are on the right spot on the map. ![enter image description here](http://i.stack.imgur.com/dZ5Wa.png) This make me think that the problem could be with the row (y) and column (x) used to generate the tiles with `coord = ModestMaps.Core.Coordinate(y, x, zoom)` or with the projection wich is EPSG 900913. I use OpenLayers.Layer.TMS for the mapping. Here some codes: **Tiling script:**               def tile(request, version, shapefile, zoom, x, y):             config = {                 "cache": {                 "name": "Disk",                  "path": "/mygeosite/stache",                  "umask": "0000"},               "layers": {                 shapefile.filename: {                     "provider": {"name": "mapnik", "mapfile": "c:\\mygeosite\\geodjango\\test.xml"},                     "projection": "spherical mercator"                 }               }             }                  # like http://tile.openstreetmap.org/1/0/0.png             # x = row , y = column , zoom = zoom level             coord = ModestMaps.Core.Coordinate(y, x, zoom)             config = TileStache.Config.buildConfiguration(config)             bytes = TileStache.getTile(config.layers[shapefile.filename], coord, 'png')             return HttpResponse(bytes[2], mimetype="image/png")      **mapnik.xml**               <?xml version="1.0" encoding="utf-8"?>     <Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over" background-color="rgb(115,145,173)">         <Style name="featureLayerStyle">             <Rule>                 <PolygonSymbolizer fill="rgb(247,237,238)"/>                 <LineSymbolizer stroke-width="0.5"/>             </Rule>         </Style>         <Layer name="featureLayer" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over">             <StyleName>featureLayerStyle</StyleName>             <Datasource>                 <Parameter name="dbname">ezmapping</Parameter>                 <Parameter name="geometry_field">geom_multipolygon</Parameter>                 <Parameter name="geometry_table">"shapefile_feature"</Parameter>                 <Parameter name="password">ogrant22</Parameter>                 <Parameter name="simplify_geometries">1</Parameter>                 <Parameter name="srid">900913</Parameter>                 <Parameter name="table">(select geom_multipolygon, id from "shapefile_feature" where shapefile_id=68) as geom</Parameter>                 <Parameter name="type">postgis</Parameter>                 <Parameter name="user">postgres</Parameter>             </Datasource>         </Layer>     </Map>      **OpenLayers.js:**               map = new OpenLayers.Map('map',               {maxResolution: 156543.0399,                 projection: new OpenLayers.Projection("EPSG:3857"),                 units: 'm',                 maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),                 numZoomLevels: 21});     tiledLayer = new OpenLayers.Layer.TMS('TMS',                     "{{ tmsURL }}",                     {serviceVersion: "1.0",                     layername: "{{ shapefile.id }}",                     type: 'png'});     map.addLayer(tiledLayer);


title: Openlayers which format best for serving lat lon markers from webservice?

text: I have a webservice which get GPS data (lat/lon) from android phone every 30 sec. The webservice (currently) write the data to local log file (any format I decide). which format/way will be best to read and refresh the layer every X seconds to show the location of the phone on OpenLayers OSM layer ?


title: Polygon not a valid geography instance

text: I am trying to create and insert data from ESRI shape files. This is one of the many features in the shape file, you can copy paste it and try it yourself:               DECLARE @g geography;     SET @g = geography::STPolyFromText('POLYGON ((28.397422886819093 70.5432251792964, 28.570915861286892 70.512498993109844, 28.540819573464251 70.4456402666085, 28.486718688957893 70.433538619104056, 28.353077926613448 70.512911092846991, 28.397422886819093 70.5432251792964))', 4326);     SELECT @g.ToString();      If I try to create a geography object from this on SQL Server 2008, it fails with the following error: > Msg 6522, Level 16, State 1, Line 2 A .NET Framework error occurred during > execution of user-defined routine or aggregate "geography": > System.ArgumentException: 24200: The specified input does not represent a > valid geography instance. System.ArgumentException: at > Microsoft.SqlServer.Types.SqlGeography.ConstructGeographyFromUserInput(GeoData > g, Int32 srid) at > Microsoft.SqlServer.Types.SqlGeography.GeographyFromText(OpenGisType type, > SqlChars taggedText, Int32 srid) What is wrong with this shape?


title: Mysql to nosql. Best solution?

text: We are working on our new vehicle tracking system. We have been making use of mySQL for the past two years. However we have been discussing moving to a noSQL database. We have a high number of reads and writes. For reads we have been told that mongodb will take up to much of our available ram on our servers. So which noSQL will best suit our needs, without causing us any furthur problems? Or is it better to hang on to mySQL? Thanks in advance!


title: cartodb: query for the points within a radio from another point - postgis

text: I've georreferenced a couple of points in a CartoDb table, so now I have a the_geom column of type point I'd like to get all the points that are x meters away from a certain x,y point. So far now, following this article http://unserializableone.blogspot.com.ar/2007/02/using-postgis-to-find-points- of.html, I tried the following:               SELECT * FROM my_contacts     WHERE     distance(       transform(PointFromText('POINT(-34.6043183 -58.380924)', 4269),32661),       the_geom     ) < 1000      (in this case my x,y point would be -34.6043183 -58.380924 and I'm looking for locations within 1000 meters from it) and I get this error: ERROR: Operation on two GEOMETRIES with different SRIDs I tried without the transform, and I get the same error How can I find out the SRIDs of the points in my db? And how can I translate a lat, lon google map point to that desired SRID? update: with this query I found out the SRID of my points               SELECT ST_SRID(the_geom) FROM my_contacts      they are all 4326, so I tried with and this seems to work rather ok:               SELECT *     FROM my_contacts     where      distance(       transform(PointFromText(         'POINT(-34.6675645 -58.3712721)', 4326),4326),       the_geom     ) < 33.62     order by distance      but I just got thiw 33.62 by trial and error, I don't know how to translate it to meters, and the results when trying with a different point don't seem to be very consistent... thanks a lot


title: Storage hardware options for large datasets

text: We are about to organize our data in a centralized spatial data system. The system would provide various services (mainly supporting ftp access, geodatabase editing, and several web mapping applications). The data we already have is sized around 15TB, is expected to constantly increase, and consisted of spatial databases, aerial imagery, lidar data, and some non-spatial data. Furthermore, I understand that only a small portion of data would be actively accessed, and the storage is a sort of central repository (traffics and transfer rates are not that big deal in that manner). I don't have any experience in managing such a big storage tier. I am under the impression that I have to purchase some NAS. However, I am not quite sure how should I plan the architecture of the storage tier (distributed or a single device), and what hardware specifications should I look for if the aim is 20TB capacity right now? Suggestions are appreciated.


title: Executing GP Task for JavaScript API

text: I recently started using JavaScript API in attempt to construct a web app. After taking a recent ESRI online course, I thought I had some base knowledge on how to do this. This geoprocessing service I'm using from our development server is supposed to take an input of a ZipCode and in turn display delivery routes associated with said ZipCode. I've looked at some sample code on the ArcGIS Javascript API help site and cannot figure out how to execute this with its parameters. If anyone has any insight or where I can look for documentation on how I can initiliaze this task and make it appear on my WebMap, I'd be forever indebted. Thanks! Below is the REST services page for the geoprocessor.               Execution Type: esriExecutionTypeSynchronous           Parameters:      Parameter: ZIP      Data Type: GPString      Display Name ZIP      Description: ZIP code or list of comma, space, or tab delimited 5 digit ZIP codes      Direction: esriGPParameterDirectionInput      Default Value: 38138      Parameter Type: esriGPParameterTypeRequired      Category:           Parameter: Rte_Box      Data Type: GPString      Display Name Rte_Box      Description: R = carrier route, B = PO Box      Direction: esriGPParameterDirectionInput      Default Value: R      Parameter Type: esriGPParameterTypeOptional      Category:           Parameter: Output_Feature_Class      Data Type: GPFeatureRecordSetLayer      Display Name Output_Feature_Class      Description: Geometry and delivery stats for routes that meet search criteria      Direction: esriGPParameterDirectionOutput      Default Value:     Geometry Type: esriGeometryPolyline      HasZ: false      HasM: false      Spatial Reference: 102100  (3857)           Fields:     OBJECTID ( type: esriFieldTypeOID , alias: OBJECTID )     ZIP_CRID ( type: esriFieldTypeString , alias: ZIP_CRID , length: 13 )     ZIP_CODE ( type: esriFieldTypeString , alias: ZIP_CODE , length: 5 )     CRID_ID ( type: esriFieldTypeString , alias: CRID_ID , length: 4 )     CRID_IND ( type: esriFieldTypeString , alias: CRID_IND , length: 1 )     CRID_NBR ( type: esriFieldTypeString , alias: CRID_NBR , length: 3 )     CITY_STATE ( type: esriFieldTypeString , alias: CITY_STATE , length: 32 )     BUS_CNT ( type: esriFieldTypeDouble , alias: BUS_CNT )     TOT_CNT ( type: esriFieldTypeDouble , alias: TOT_CNT )     DROP_CNT ( type: esriFieldTypeDouble , alias: DROP_CNT )     RES_CNT ( type: esriFieldTypeDouble , alias: RES_CNT )     DROPSHIP_KEY ( type: esriFieldTypeString , alias: DROPSHIP_KEY , length: 6 )     FACILITY_NAME ( type: esriFieldTypeString , alias: FACILITY_NAME , length: 35 )     LESS_THAN200_IND ( type: esriFieldTypeString , alias: LESS_THAN200_IND , length: 1 )     FAUX_IND ( type: esriFieldTypeString , alias: FAUX_IND , length: 1 )     LT_200_IND ( type: esriFieldTypeString , alias: LT_200_IND , length: 1 )     DS_KEY ( type: esriFieldTypeString , alias: DS_KEY , length: 7 )     FAC_NAME ( type: esriFieldTypeString , alias: FAC_NAME , length: 35 )     Shape_Length ( type: esriFieldTypeDouble , alias: Shape_Length )     Features: None.               Parameter Type: esriGPParameterTypeRequired      Category:


title: PHP PostGIS to geoJSON missing required parametar error

text: I'm using this PHP PostGIS to geoJSON script: https://gist.github.com/bmcbride/1913855 But I keep getting this error: 'missing required parameter: geotable' This is my code:                 # Retrive URL variables         if (empty($_GET['WTGs_All'])) {             echo "missing required parameter: geotable";             exit;         } else             $geotable = $_GET['WTGs_All'];              if (empty($_GET['the_geom'])) {             echo "missing required parameter: geomfield";             exit;         } else             $geomfield = $_GET['the_geom'];              if (empty($_GET['srid'])) {             $srid = '4326';         } else             $srid = $_GET['srid'];              if (empty($_GET['fields'])) {             $fields = '*';         } else             $fields = $_GET['fields'];              $parameters = $_GET['parameters'];              $orderby    = $_GET['orderby'];              if (empty($_GET['sort'])) {             $sort = 'ASC';         } else             $sort = $_GET['sort'];              $limit      = $_GET['limit'];              $offset     = $_GET['offset'];              # Connect to PostgreSQL database         $conn = pg_connect("dbname='postgres' user='postgres' password='****' port='5432' host='localhost'");         if (!$conn) {             echo "Not connected : " . pg_error();             exit;         }     # Build SQL SELECT statement and return the geometry as a GeoJSON element in EPSG: 4326     $sql = "SELECT " . pg_escape_string($fields) . ", st_asgeojson(transform(" . pg_escape_string($geomfield) . ",$srid)) AS geojson FROM " . pg_escape_string($geotable);     if (strlen(trim($parameters)) > 0) {         $sql .= " WHERE " . pg_escape_string($parameters);     }     if (strlen(trim($orderby)) > 0) {         $sql .= " ORDER BY " . pg_escape_string($orderby) . " " . $sort;     }     if (strlen(trim($limit)) > 0) {         $sql .= " LIMIT " . pg_escape_string($limit);     }     if (strlen(trim($offset)) > 0) {         $sql .= " OFFSET " . pg_escape_string($offset);     }     //echo $sql;          # Try query or error     $rs = pg_query($conn, $sql);     if (!$rs) {         echo "An SQL error occured.\n";         exit;     }          # Build GeoJSON     $output    = '';     $rowOutput = '';          while ($row = pg_fetch_assoc($rs)) {         $rowOutput = (strlen($rowOutput) > 0 ? ',' : '') . '{"type": "Feature", "geometry": ' . $row['geojson'] . ', "properties": {';         $props = '';         $id    = '';         foreach ($row as $key => $val) {             if ($key != "geojson") {                 $props .= (strlen($props) > 0 ? ',' : '') . '"' . $key . '":"' . escapeJsonString($val) . '"';             }             if ($key == "id") {                 $id .= ',"id":"' . escapeJsonString($val) . '"';             }         }              $rowOutput .= $props . '}';         $rowOutput .= $id;         $rowOutput .= '}';         $output .= $rowOutput;     }          $output = '{ "type": "FeatureCollection", "features": [ ' . $output . ' ]}';     echo $output;     ?>      My table is called WTGs_All, I don't know what am I doing wrong. Thanks.


title: How to customize the background-image of LayerSwitcher in OpenLayers?

text: How can I override the image used (sign '+' with a blue half circle) for the LayerSwitcher Control in OpenLayers? Is it possible to do so with background- image in css? I see nothing related to this image in the default style.css...


title: How to view/edit M-values of PointZ shapes ArcMap 9.3.1

text: I realize this is a very basic question, but however I can't find any basic Q&A on something so simple. I added three new points to a shapebatch in ArcMap. By default when I added them, it made the M-Value the equivalent of a minimum double value (-1.79769313486232E+308). I know this because I've written software to read ShapeFiles. For testing purposes I need to be able to change the M-values of these points to see how it handles certain values. I've tried opening the 'Edit Sketch Properties' windows. It's grayed out and doesn't even contain an M column. All tutorials/guides I've come across pertain to PolyLineZ. Is the M-value computed on something within the shapefile?


title: Is there a way to convert multiple columns at once from string to text, or to other data formats?

text: I have multiple data fields that need to be converted from string to text files. When I save them as "text" in excel or open office, they still load up as string files in **QGIS**. How can I convert more than one column at once from string to text (or even integer, etc. if the situation arises)? Thanks for your help! Alex


title: Problems Joining CSV to Shpfile arcgis 9.3

text: So I have been trying to get this to work all day and have had no success. I am attempting to join a CSV file with a Shapefile. The CSV is from the Hud's location affordability portal (http://www.locationaffordability.info/lai.aspx?url=download.php) and the shapefile is coming from tiger. I have tried moving the file into microsoft access and converting it to a dbf it tells me that I "cannot define field more than once" and when I do a find replace to in excel it changes the number to scientific notation. I have tried changing the format of the column and leaving it alone in hopes that it would not be effected, but that is not the case. any thoughts?


title: How to install a Reporter plugin for QGIS?

text: I can not get the plugin Reporter or SimpleReport to run in 2.4 or 2.2. The plugin manager in qgis says there is no metadata.txt. This is obviously not true and is in there. I have changed the minimumversion in the metadata file but no luck. Is there a way to get around this to make the plugin work? Or maybe there is another way to generate a report in Qgis?


title: Thematics in Mapinfo - multiple intervals from same table?

text: I´ve got a table where I want to thematize intervals of values like between 0.1 - 1.0, 1.0 - 2.0 and etc., but I´m almost sure that´s not possible, whithout splitting up the table to multiple tables, right? It has to be for Mapinfo.


title: Retrieving points that make up drive-time polygon generated by ArcGIS for Desktop in automated way?

text: One of our GIS guys showed me a demo of the ArcGIS Network Analyst extension creating a drive-time polygon for points that he clicked on a map. This is exactly what we need for our web application, but it will only be of use to us if we can automate the procedure, perhaps by calling some kind of API interface using a geographic point and time value to receive data points in XML or JSON. Is this possible, or should I research other tools?


title: Display data from geoserver on click map with openlayers

text: i tried to display data with popup from geoserver or postgres to my map, but it dosen't work at all. please any one can help me thank you in the advance i used this code : function Info(e) { if (e.features && e.features.length) {                                   //console.log(e.features[0].attributes);                         var popupId = e.xy.x + "," + e.xy.y;                         var popup = popups[popupId];                         if (!popup || !popup.map) {                         popup = new OpenLayers.Popup.FramedCloud(                         popupId,                          map.getLonLatFromPixel(e.xy),                         null,                         " ",                         null,                         true,                         function(e) {                             delete popups[this.id];                             this.hide();                             OpenLayers.Event.stop(e);                         }                     );                     popups[popupId] = popup;                     map.addPopup(popup, true);                     }                    popup.setContentHTML(popup.contentHTML + "nom_user:" +e.features[0].attributes.nomservice +" region_user :"+ e.features[0].attributes.region);                 popup.show();                                        }                   selectcltr = {             click: new OpenLayers.Control.WMSGetFeatureInfo({                 url: 'http://localhost/geoserver/wms',                  title: 'Identify features by clicking',                 layers: [ser],                 queryVisible: true             }),             hover: new OpenLayers.Control.WMSGetFeatureInfo({                 url: 'http://localhost/geoserver/wms',                  title: 'Identify features by clicking',                 layers: [ser],                 hover: true,                 // defining a custom format options here                 formatOptions: {                     typeName: 'projet',                      featureNS: 'http://www.openplans.org/topp'                 },                 queryVisible: true             })         }


title: Connect to PostGIS using SEXTANTE in QGIS

text: I have a localhost PostGIS database that I would like to use with SEXTANTE in QGIS. I can connect to the database just fine using "Add PostGIS layers...", but when I try "PostGIS execute SQL" in SEXTANTE, I´m not sure of what to enter and I can´t find any documentation or examples. All I get is "Wrong database connection name...". Any suggestions/examples on how to connect to the database? Magnus


title: GML, KML, GeoJSON - Speed rendering 3109 polygons?

text: I am working with Geoserver, serving U.S. Lower 48 counties to openlayers (3109 polygons - lots more vertices). The counties are loaded into a postgis database. I am curious about developer experience when trying to push that quantity of vertices to the client. What WFS format have you attained the best results with? Has additional tuning to Geoserver been used? I realize that tiled WMS would be faster, but I want to allow for dynamic changes in a choropleth map using openLayers, ie. the user submits a form, a Python script is called, and new data bins are returned for openlayers to reload the map div. I also want to try this in full resolution form before reducing polygon complexity in openlayers.


title: Error installing GDAL 1.9.0 python package

text: I'm trying to install the GDAL python package in a python 2.7.1 environment on RHEL 5. I am using the command 'pip install GDAL'. I have no problem installing other packages like numpy, etc. in this manner. The installation fails with this error:               extensions/gdal_wrap.cpp: In function 'PyObject* _wrap_VSIFTruncateL(PyObject*, PyObject*)':          extensions/gdal_wrap.cpp:6845: error: 'VSIFTruncateL' was not declared in this scope          error: command 'gcc' failed with exit status 1      I also tried compiling GDAL 1.9.0 from source and running 'python setup.py build' (after setting the path to gdal-config in setup.cfg) and 'python setup.py install'. The GDAL python bindings seem to install okay, but I get the same 'VSIFTruncateL' error when trying to use GDAL...               >>> from osgeo import gdal     Traceback (most recent call last):       File "<stdin>", line 1, in <module>       File "osgeo/__init__.py", line 21, in <module>         _gdal = swig_import_helper()       File "osgeo/__init__.py", line 17, in swig_import_helper         _mod = imp.load_module('_gdal', fp, pathname, description)     ImportError: osgeo/_gdal.so: undefined symbol: VSIFTruncateL


title: How to query OSM tags by polygon?

text: I do not know whether something like this is possible but nonetheless. If I understand OSM correctly all objects essentially have associated tags based on type of object (street, building etc) ... I want to use QGIS (or something else). The idea is to obtain the statistics of different commonly used tags in that area so that I can have an idea of the feature distribution. Any suggestion (using other software or format is welcome)


title: Installing ArcGIS for server 10.1 on linux server

text: I am trying to install ArcGIS for server 10.1 on my linux system. When I run "./startserver.sh" I get following error: > ERROR: Unable to start Xvfb on any port in the range 6600 - 6619. I have checked "xvfb_err.log" and this is the issue I found there: > /root/arcgis/server//framework/runtime/xvfb/RHEL/Xvfb: error while loading > shared libraries: libXfont.so.1: cannot open shared object file: No such > file or directory How can I fix the problem?


title: How to rotate Feature-Linked Annotation to map book (MapLogic) data frame rotation?

text: Once creating a feature-linked Annotation feature class, how do I set the rotation for the annotations to be horizontal with the data frame's rotation in a map book?


title: Is OSM_ID also part of osm2po graph?

text: I would like to use osm2po as a routing engine/library. My problem is that in geojson response, there is no osm_id value returned, only id field which, if I assume correctly is not a fixed value. I mean if I made new graph file from newer osm data, id of the same feature/edge could be different. Is there a way to get osm_id from service response?


title: How can I clip a shapefile?

text: I have a SHP that includes the entire county and want to downsize it to a specific area...how??


title: Where is the default QGIS Point layer style .qml file installed in Win 32?

text: Where is the default QGIS Point layer style .qml file installed in a Windows 32 bit installation? I have done a search on *.qml and can only find four python plugins styles.


title: How to do the "display route events" from Arcgis, in Qgis

text: I'm working with Arcgis 10.1. In Arcgis there is a feature called "display route events" from tables, and I want to do exactly what that features does, but in Qgis. I'm using Qgis 2.0.1. What this feature does in arcgis is add information from an excel table to a route. In the table I have points with the information of there position but not the coordinates, I have the distance from the origin to the kilometric point where he is placed. Is there a way of doing it in Qgis? Or it just works with the coordinates? Thank you!


title: Finding route contains Source and Destination points

text: I have a problem with finding routes that are near (in range X km) the passed points (for e.x. A and B) in PostgreSQL PostGIS. Example: ![](http://i.imgur.com/VOQOENC.png) The point A denotes Source point and The point B denotes the Destination. Tn system there are routes represented as LineString. I am also able to consider another ways to represent the routes. Phere is no problem to find routes contains the points A and B in specific range (for e.x. 5 km):               SELECT * FROM routes     WHERE         ST_Distance_Spheroid(route.lineString, 'POINT (long_A lat_A)', 'SPHEROID["GRS 1980",6378137,298.257222101]') < 5000     AND         ST_Distance_Spheroid(route.lineString, 'POINT (long_B lat_B)', 'SPHEROID["GRS 1980",6378137,298.257222101]') < 5000      But there is the problem, that this query considers the path regardless its direction. It is insensitive to order the points that describes the linestring. So there is a question. How select the routes contains points in specific range and consider order of points. BTW: There is possible to represent routes as points and store in database the POINT and order number. So I can look for nearest points.


title: gdaladdo positive and negative aspects?

text: I read and I read opinions and topics regarding this tool but I am still unclear if I should us this or not. In my project I have thousands off tiff files which need to be put on a map. The problem is that while creating the tiles (map tiles) it runs really slow, especially when it needs to put a lot of tiffs on a tile.. I heard that gdaladdo can speed this up but I am unsure if this could affect the quality of the tiff files and/or any other side effects. Unfortunately, I do not have a backup for the files and while I was testing this on a few bunch of files, the only thing I saw was the increase in size for each of the files. If anyone had positive (and especially negative) experiences using this tool, I would appreciate an example, advice or anything you think can help. Many thanks,


title: OpenLayers: Use scales instead of resolutions

text: Venturing around in the `OpenLayers` source code, it seems like everything related to zoom-levels is done using resolutions. Fair enough since this related directly to screen space. I would like though, to use scales instead, and further more explicitly define the allowed scales.   **- Is this possible?** So far I have created a set of scales which I transform into resolutions:               var scales = [500, 1000, 2000, 4000, 10000, 25000, 50000];     var resolutions = [];     for(var i = 0; i < scales.length; i++) {         resolutions.push(OpenLayers.Util.getResolutionFromScale(scales[i], units));     }          map = new OpenLayers.Map('', {                                 ...         minScale: scales[scales.length - 1],         maxScale: scales[0],                 resolution: resolutions,         numZoomLevels: scales.length,         ...     });      My problem is that the first and the last scale are respected, but in between the current resolution converted into scale is not among the ones I specified.   **- What have I missed?**


title: If using ogr2ogr to load a PostGIS DB, does the PG string need host and port arguments?

text: The `ogr2ogr` command in this question How to Import ESRI Geodatabase format .gdb into PostGIS was missing the `host` and `port` arguments, or so I thought. My answer included something like this               ogr2ogr -f "PostgreSQL" PG:"host=localhost port=5432 dbname=NY user=postgres" NY.gdb       I know my command works (even if it was down-voted) but I wonder if there are cases when the `host` and `port` arguments are not required. * * * So it's possible for my server to be running on the default port, I see. So, how or why would i set up the server to run on the default port? Thanks.


title: realtime maps for coastal zone using arcmap10 with added layers

text: i would like to make the best mapping serices for clients for exact mapping layers for High tide line and low tide line ( which the data is being collected physically in x,y format) with this data should i make maps in arcmap10 with desired layers and desired scale for presenting the sylish maps. if yes kindly be send each step by step procedure -jawaharkumar jawahar_ch@yahoo.com


title: How to create `Workspace` without using `IWorkspaceFactory.Create`?

text: Can I create a `Workspace` without using `IWorkspaceFactory.Create` I am trying to create a `Workspace` without specifying it's parent directory, is that possible ?


title: Where is ESRI.ArcGIS.Client.Tasks.Utils.JSON documentation?

text: I'm using the WPF assemblies from the freely downloadable ESRI WPF/Silverlight 2.0 SDK. As I type in a "using" statement in visual studio, I can use intellisense to expand out into:               using ESRI.ArcGIS.Client.Tasks.Utils.JSON;      However, I don't see any documentation for it, nor does anything show up in the object browser. Does anyone know where I can find more out about this?


title: Edits in SDE not showing up in AGS GeoData Service

text: I've got an ArcGIS Server GeoData service against an SDE MSSql database. When changes are made to the source data, the edits don't appear to show up in the GeoData service. If I restart the service, edits are available via the geodata service. Is there something else I should be doing to allow edits to always be available? =========UPDATE========= Further investigation revealed that the service did reflect changes, though how long you have to wait is variable. Sometimes the delay is two minutes, sometimes 30 minutes. At this stage, to force the GeoDataService not the cache any data, I've set the "Virtual Output Directory" of the service to be none. No caching, no problems. Though not ideal, as when no edits are happening, we don't get the performance improvements that caching offers. Further ideas would be appreciated.


title: How to load National Elevation Data into a WMS server?

text: We have an application that can pull WMS data from the National Elevation Data set (NED) and use it to perform a number of run-time calculations. We have been pulling it from NASA JPL WMS servers here (http://onearth.jpl.nasa.gov/) but we are pulling too much data for their servers to support. We tried using the WMS tiling extension they support, but since it is non-standard (ie. it is not TMS) we can't find any proxy or caching tools that support it (eg. TileCache, MapProxy, etc). Does anyone know of a WMS cache that does support the NASA JPL servers? If not, can anyone give me some guidance on where to get the raw data and how to host it up ourselves locally? (a tutorial link would be very helpful as we don't host any other WMS data locally and would basically be starting from scratch) Thanks.


title: How do I deserialize GP Result Json?

text: The value part of a GP Result can be any type of GP object (or literal). Does anyone know of a general way to deserialize this, preferably with either WCF or Json.NET? I'd prefer not to have to write a deserializer for each different GP tool.               {        "results":[           {              "paramName":"Output",              "dataType":"GPFeatureRecordSetLayer",              "value":{                 "geometryType":"esriGeometryPolyline",                 "spatialReference":{                    "wkid":4326                 },                 "features":[                    {                       "geometry":{                          "paths":[                             [                                [                                   -91.6849975582907,                                   24.206096649241                                ],                                [                                   -91.8398132323948,                                   24.4056720735074                                ]                             ]                          ]                       },                       "attributes":{                          "FID":1,                          "FNODE_":0,                          "Shape_Length":0.25258314060805                       }                    }                 ],                 "exceededTransferLimit":"false"              }           }        ],        "messages":[             ]     }        **Update:** I never figured out a way to do this. If Esri wants to encourage consumption of GP services by a wider variety of clients they should consider serializing the .NET type name, similar to what can be done with Json.NET by setting TypeNameHandling = Objects.


title: ArcGIS Server 10 Java - 403 on ArcGIS Servlet Manager

text: I imagine this will be an easy one. Im very familiar with ArcGIS Server .NET edition However have little experience with the Java edition. So I installed a fresh copy of v10 Enterprise on a fresh install of Windows 7 Ultimate 64bit, for self-development purposes. Ran the post install by the book, and can hit the normal manager console fine. Tried hitting the REST endpoint and got a 404 which I understand is usually expected by default after a fresh install.   I dont have anything funny going on, no proxy, no separate apache using same ports. Following the advice in this article, I get a 403 when I try and hit: http://machine name:8399/manager/html Anyone know why this happens, and how to rectify?


title: How to Calculate Custom Zonal Statistics?

text: I have a vector polygon shapefile outlining counties for which I have a raster of nighttime-luminosity data. I've been able to compute Zonal Statistics in ArcGIS 10.0 using Zonal Statistics as Table and simply selecting the polygons as the first feature class option. However, I'd like to get some more stats than those that are available with the pre-packaged Zonal Stats. Specifically, I'd like to get counts and values -- for instance, the number of pixels with a given luminosity value in each polygon. Does anyone know if this is possible? If not in ArcGIS, in QGIS, perhaps? Thanks.


title: How to debug QGIS Server "Configuration file problem" on windows server?

text: I am facing problem while integrating QGIS 2.0 for web access in my VPS windows server 2008 64 bit OS. I tried all possible changes as per wiki and especially post http://anitagraser.com/2012/04/06/qgis-server-on-windows7-step-by-step/ When i run the link (`http://localhost/qgis/qgis_mapserv.fcgi.exe?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities&map=c:/myprojects/world.qgs` and http://hub.qgis.org/projects/quantum-gis/wiki/QGIS_Server_Tutorial) to view map page it gives me the following XML configuration error.               <ServiceExceptionReport xmlns="http://www.opengis.net/ogc" version="1.3.0">     <ServiceException code="">     Configuration file problem : perhaps you left off the .qgs extension?     </ServiceException>     </ServiceExceptionReport>      I have no idea what it means, please help me to sort out this error. Thanks a lot


title: Geoprocessing Ungroups Layers

text: Is there a fix for this, am I only imagining this, or is it a bug: ArcMAP 10.1 for Desktop Build 3035 on a 64 bit Windows 7 system When I run a geoprocessing task that modifies the input data (such as Snap), if the input layer is in a group, the group is removed once the process is complete! I have lost groups with detailed definition queries to this problem. I suppose removing the layer from the group before processing will help alleviate this. However, is there a more definite fix? I can easily see myself forgetting to separate that layer and subsequently losing my group. Plus, there is no 'save map every x minutes' feature (that I know of), so closing without saving will bring back the groups, but will negate any changes I made while working.


title: My @media query breaking the state of the map in ArcGIS Javascrpit API

text: Anybody knows why my map is not displaying again after resizing my window? I am using the next media query to hide the map when the width is less than 767px. @media (max-width: 767px) { .map { display: none !important; } } The map is hiding but is not restoring again when I maximize the window. If I use { opacity: 0} it's working. Why display:none is creating an inconsistent state of the map? I need help, thanks PS: sorry for my English.


title: Why does ArcGIS Resample tool change cell size and numbers of columns and rows?

text: I am working with images of oxygen distribution within individual plant root systems submerged in water. The program I use to acquire these images, LookatRGB, splits the green band in half and makes two green rasters. However, in this process, it changes the cell size to (1.4580744, 325.25). When I use the resample tool in ArcMap, the rows and columns change from the correct number of 1953, 1301 to an incorrect number of 1953, 290212. I have tried changing everything in the environment setting to the correct numbers and projecting to a UTM coordinate system, with no results. As of now, the only way I have been able to fix the problem is by changing the properties in Imagej, then exporting as a tiff. I used this corrected layer in the environment settings, but I need to be able to process thousands of images in the future using ArcMap's model builder/python. Fixing individually in ImageJ then importing into ArcMap will not work. Any help would be greatly appreciated.


title: Feature class field count caching issue

text: In our application, we exposed a custom file format to ArcScene through a custom plugin data-source. However, we experience some problems which we ascribe to caching issues. We generate a dataset with 5 fields, in particular OID, Shape and 3 custom columns. This dataset is added to the scene through a standard feature layer. ArcScene properly calls **IPlugInDatasetHelper.get_Fields** to obtain the **IFields** from our dataset. Upon user interaction, this dataset might get regenerated where the number of fields might change. In this case to OID, Shape and a single custom row. If ArcScene now calls **IPlugInDatasetHelper.FetchAll** , the last parameter ( **object FieldMap** ) still contains 5 entries. ArcScene does not call **IPlugInDatasetHelper.get_Fields** anymore, despite the column count having changed. Is there a way to tell ArcScene/ArcMap the fields in our custom data-source have changed? We already tried ISceneGraph.Invalidate on our feature layer or ActiveView.Redraw of no avail. Thanks!


title: How To Display ArcGIS Javascript API Graphic on Postback

text:
This code uses ArcGIS JS API 3.5 to have a user designate a location on a map. It then blasts those coordinates into a SQL Server 2008 database and returns (using the confirm location button) some information from an ArcSDE geodatabase. The problem I have is when the user clicks the 'Confirm Location' button and the page postsback. On postback it clears both the map extent and the graphic which the user had just defined, which leaves the user in the dark as to where they have just pointed. Is there any way to avoid this reset?               <!DOCTYPE html>                          <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>         <meta http-equiv="X-UA-Compatible" content="IE=7, IE=9, IE=10"/>         <meta name="viewport" content="initial-scale=5, maximum-scale=1,user-scalable=no"/>         <title>Find Project Location</title>              <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.5/js/dojo/dijit/themes/claro/claro.css"/>         <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.5/js/esri/css/esri.css"/>

          <form id="Form1" runat="server">
         <asp:HiddenField runat="server" ID="HiddenCoord" Value="" />              <asp:HiddenField runat="server" ID="HiddenLat" Value="" />         <asp:HiddenField runat="server" ID="HiddenLong" Value="" />                   <asp:Button ID="Button1" runat="server" Text="Calculate Location"              onclick="Button1_Click" />              <asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1"           CssClass="ogmodefaultgrid" PagerStyle-CssClass="pgr"            AlternatingRowStyle-CssClass="alt"            AutoGenerateColumns="False" AllowSorting="True" RowStyle-Wrap="true"           AllowPaging="true" PageSize="15"           CellSpacing="2" Font-Size="Small" PagerSettings-Mode="Numeric">           <Columns>              <asp:BoundField HeaderText="latitude" DataField="latitude"                 SortExpression="latitude"                 ItemStyle-HorizontalAlign="Left"                   HeaderStyle-HorizontalAlign="Left"/>              <asp:BoundField HeaderText="Longitude"                 InsertVisible="False" DataField="longitude"                 SortExpression="longitude"                 ItemStyle-HorizontalAlign="Left"                   HeaderStyle-HorizontalAlign="Left"/>              <asp:BoundField HeaderText="Township Section and Range"                 InsertVisible="False" DataField="trs"                 SortExpression="trs"                 ItemStyle-HorizontalAlign="Left"                   HeaderStyle-HorizontalAlign="Left"/>              <asp:BoundField HeaderText="County"                 InsertVisible="False" DataField="county"                 SortExpression="county"                 ItemStyle-HorizontalAlign="Left"                   HeaderStyle-HorizontalAlign="Left"/>           </Columns>             </asp:GridView>              <asp:Button ID="Button2" runat="server" onclick="Button2_Click"              Text="Submit Location" />         <asp:SqlDataSource ID="SqlDataSource1" runat="server"></asp:SqlDataSource>
     </form>


title: Apply edits with PHP

text: I trying to develop a PHP script that will simply applyedits to a feature services. Right now I'm trying to use the In the ESRI restend point example. I'm thinking if someone can help me, point me to some doc, show me how to use the esri endpoint. I will be able to take that script learn from it and move from there. There are several moving parts I'm hoping to accomplish but right now I'm stuck on this piece. If I hit this esri rest endpoint: > sampleserver3.arcgisonline.co...r/0/applyEdits and add these parameters to the add input box > > [{"geometry":{"x":-13085962.2699721,"y":4061306.82523268,"spatialReference":{"wkid":102100}},"attributes":{"description":"Test > Nat","type":5}},{"geometry":{"x":-13072136.6421672,"y":4073467.58686212,"spatialReference":{"wkid":102100}},"attributes":{"description":"klsf","type":0}}] I can add a feature. I want to create a simple PHP script that will do this for me. CAN someone show how to do this? If I can get this working I'm hoping I can feed the parameters from an xml feed and consistently push data to my rest points. Thanks.


title: Coupled Hidden Markov Model Matlab Error

text: I want to train CHMM using Matlab and I am new to use this software. I am using BNET CHMM which is this:               function bnet = mk_chmm(N, Q, Y, discrete_obs, coupled, CPD)     % MK_CHMM Make a coupled Hidden Markov Model     %     % There are N hidden nodes, each connected to itself and its two nearest neighbors in the next     % slice (apart from the edges, where there is 1 nearest neighbor).     %     % Example: If N = 3, the hidden backbone is as follows, where all arrows point to the right     %     % X1--X2     %   \/      %   /\     % X2--X2     %   \/      %   /\     % X3--X3     %     % Each hidden node has a "private" observed child (not shown).     %     % BNET = MK_CHMM(N, Q, Y)     % Each hidden node is discrete and has Q values.     % Each observed node is a Gaussian vector of length Y.     %     % BNET = MK_CHMM(N, Q, Y, DISCRETE_OBS)     % If discrete_obs = 1, the observations are discrete (values in {1, .., Y}).     %     % BNET = MK_CHMM(N, Q, Y, DISCRETE_OBS, COUPLED)     % If coupled = 0, the chains are not coupled, i.e., we make N parallel HMMs.     %     % BNET = MK_CHMM(N, Q, Y, DISCRETE_OBS, COUPLED, CPDs)     % means use the specified CPD structures instead of creating random params.     %  CPD{i}.CPT, i=1:N specifies the prior     %  CPD{i}.CPT, i=2N+1:3N specifies the transition model     %  CPD{i}.mean, CPD{i}.cov, i=N+1:2N specifies the observation model if Gaussian     %  CPD{i}.CPT, i=N+1:2N if discrete               if nargin < 2, Q = 2; end     if nargin < 3, Y = 1; end     if nargin < 4, discrete_obs = 0; end     if nargin < 5, coupled = 1; end     if nargin < 6, rnd = 1; else rnd = 0; end          ss = N*2;     hnodes = 1:N;     onodes = (1:N)+N;          intra = zeros(ss);     for i=1:N       intra(hnodes(i), onodes(i))=1;     end          inter = zeros(ss);     if coupled       for i=1:N         inter(i, max(i-1,1):min(i+1,N))=1;       end     else       inter(1:N, 1:N) = eye(N);     end            ns = [Q*ones(1,N) Y*ones(1,N)];           eclass1 = [hnodes onodes];     eclass2 = [hnodes+ss onodes];     if discrete_obs       dnodes = 1:ss;     else       dnodes = hnodes;     end     bnet = mk_dbn(intra, inter, ns, 'discrete', dnodes, 'eclass1', eclass1, 'eclass2', eclass2, ...               'observed', onodes);          if rnd       for i=hnodes(:)'         bnet.CPD{i} = tabular_CPD(bnet, i);       end       for i=onodes(:)'         if discrete_obs           bnet.CPD{i} = tabular_CPD(bnet, i);         else           bnet.CPD{i} = gaussian_CPD(bnet, i);         end       end       for i=hnodes(:)'+ss         bnet.CPD{i} = tabular_CPD(bnet, i);       end     else       for i=hnodes(:)'         bnet.CPD{i} = tabular_CPD(bnet, i, CPD{i}.CPT);       end       for i=onodes(:)'         if discrete_obs           bnet.CPD{i} = tabular_CPD(bnet, i, CPD{i}.CPT);         else           bnet.CPD{i} = gaussian_CPD(bnet, i, CPD{i}.mean, CPD{i}.cov);         end       end       for i=hnodes(:)'+ss         bnet.CPD{i} = tabular_CPD(bnet, i, CPD{i}.CPT);       end     end      I put the parameters in mk_chmm(4, 4, 4, 1, 1, 0) in the editor window, but it gives me an error:               Undefined function 'mk_dbn' for input     arguments of type 'double'.          Error in mk_chmm (line 70)     bnet = mk_dbn(intra, inter, ns,     'discrete', dnodes, 'eclass1', eclass1,     'eclass2', eclass2, ..      Any ideas how can I solve it please?? Sorry I am a beginner.


title: How to make a good table or view for QGIS in PostGIS?

text: I have a PostGIS db from OpenStreetMap (osm2pgsql) with my custom table. There are two problems with it:   1. When I list tables, the columns from my table are scanned for geometry type, and it takes several minutes. OSM tables are read instantly. I don't see anything special in those tables with pg_dump. How do I set the metadata to avoid this scanning?   2. ( **solved** ) QGIS tries to load all the points from that table, and there are 15M of them. Filter settings are available only after the layer is created. How can I filter points before reading them?~~ **edit** question 2 is solved: after tables are scanned, `Set Filter` button works fine.


title: Looping on the Select_analysis tool

text: Im trying to perform a loop on the `Select_Analysis` tool in Arcgis. Code looks like this:               inputfile = open("locality.txt", 'r') # locality.txt is a txt file of locality names     loc_list = []     for line in input_file:         loc_list.append(line)     for i in loc_list:         arcpy.Select_analysis("locality.shp", "AOI.shp", " \"LOCALITY\" = '%s'" % (i))      where 'LOCALITY' is a field in 'locality.shp'. The error returned is "AOI.shp" already exists. I conceptually understand why this isn't working, but is there a way I can make a selection in python for the list of localities in 'locality.txt' and create a new shapefile/FC based on that selection. I only want one shapefile with all the selected localities in this shapefile. There are about 600 localities, so creating 600 individual shapefiles and merging them into one at the end of the script is something I would like to avoid. I feel like there is a simple solution to this and I am overlooking something easy. I'm also aware of list concatenation, but only recently aware, so haven't yet used it in any of my code.


title: How to add point coordinates to a non geo-referenced csv file?

text: I have a csv file with information but not georeferenced. I'd like to load it in QGIS and add points (with coordinates) in the same file and later save as a shapefile. Is there any way to doing that or just creating an independent layer with the points and then joining both layers? If that is the case should I have a common ID to do that. I do not have one. Does the number ID could work on that?


title: Creating shapefiles using Java and Accumulo

text: I have tracking data with latitude and longitude stored in an Accumulo database table. We want to move toward using Geoserver for some layer display features on the client side. Right now I'm looking through the Python script project that will generate shape files. I'm wondering if anyone has other suggestions on ways I can get down to the basic functions needed to take Lat/Long trails and convert them to shapefiles for geoserver to pick up.


title: POSTGIS raster/Java with GDAL bindings - Load byte array in Gdal Dataset Object

text: I would like to load a raster as java.awt.image.BufferedImage (or equivalent class that would allow to perform some display) out of my PostGIS database. My Raster is inDb (loaded with raster2pgsql) I already created a proper DAO to "connect" the Postgis database and my Java package. So far, I managed to import an display tiles from my raster using POSTGIS ST_AsPNG queries as presented in the code extract below.               public BufferedImage test_raster() {              byte[] content = null;         Dataset dattaset = null;              try {                  ResultSet result = this .connect                                     .createStatement(                                                 ResultSet.TYPE_SCROLL_INSENSITIVE,                                                      ResultSet.CONCUR_UPDATABLE                                              ).executeQuery(                  "SELECT ST_AsPNG(rast) as tmp FROM bath50m  WHERE ST_Intersects(rast, ST_GeomFromText('MULTIPOLYGON(((50 50, 50 0, 0 0, 0 50, 50 50)))',4326))"                                              );             while(result.next()){                 if (result.absolute(result.getRow())){                      content = result.getBytes("tmp");                      ByteArrayInputStream bis = new ByteArrayInputStream(content);                 BufferedImage image = ImageIO.read(bis);                      }             }                 } catch (SQLException e) {                     e.printStackTrace();         }            return image;     }      That is interresting but I'd like to keep the geographic metadata that are embedded with the raster. I decided to give a try to extract tiles using the POSTGIS ST_AsGdalRaster so metadata would be passed along with the image. I properly compile GDAL to get the java bindings and set PATH so that I can use it (I tried succesfully the Nasa Worldwind GDALtest.java) According to the doc, it returns the raster tile in the designated GDAL Raster format. Raster formats are one of those supported by your compiled library. Use ST_GDALRasters() to get a list of formats supported by your library. Actually ST_AsGdalRaster returns a bytes array that I can't cast to the Gdal Dataset type. My intention was to adapt the openfile method from the GDALtest.java to pass byte array or whatever I could. I am not sure where I am going with that. I know I am doing something wrong but I miss support/experience to realize it. Any help would be welcome. Thanks for reading me edit: I realize I need to clarify meaning. I try to use the GDALDataset Class with a byte array as input. Is it possible?


title: How to execute 2 step floating catchment area (2SFCA) in ArcGIS?

text: I would like to execute a 2 step floating catchment area (2SFCA) in ArcGIS. I've been referencing **this paper** , but something's awry with my output, i.e. various null values, etc. The purpose of this method is to identify the population to facility ratio for medical treatment facilities. I have calculated a service area with 15, 30, 50, 55 minute break values. Joined centroid county populations to summed, which would ideally give the population reach per service area. Next, a service area is created around a centroid with the same break values and a spatial join is conducted to identify the number of facilities within each service area by using the county centroid as the proxy. After my series of spatial joins I am receiving a number of null values which makes me think my method is incorrect. The first step that I am taking is to create a service area of 15, 30, 50, 55 minutes around medical facilities. The second step is spatially joining the county centroids to the service areas and summing population. This gives me the population per service area in addition to the number of facilities per service area. Next I add a field and divide the count/population. My goal is to gather the measurement or ratio for each county. I.E. 1:4 ratio for a county based on the above parameters. The method which I have chosen is as follows: Create service areas Join weighted points to service areas Select tracts(polygons) by location that intersect service area Attribute join points to tracts feature to point spatial join points to county to determine the population that has access to facilities within a threshold.


title: Find Minimum Value of Point within a buffer output as a point file

text: I have a series of 30m buffers along a polyline (river). Within each buffer I have a series of points each point represents a 10m x 10m cell with an elevation value known as "Elev". I want to find the one point with the minimum elev value within each buffer and output it as a point file. In a future geoprocessing set I'll like to snap this point back to the river. ArcGIS 10.1, arcinfo license.


title: Programatically export labels to CAD based on another field value

text: The problem: I have a fairly simple procedure to export both the polyline features (architectural cad layer) and the ID's (attribute fields from polygon features that fill the rooms in another layer) I would like to automate this process preferably with python however anything that gets the job done is acceptable. Here is my current procedure: (1) Select features by building number fieldfor the CAD layer (2) Rt click>>Data>>Export data... (Selected features) and yes to add a layer... (3) Turn on labels for the room polygon layer to show the room ID field in red for readability and select the polys by building number... (4) Set the zoom to 1:100 so all ID's fit in rooms. Rt Click layer>>Convert labels to annotation. (selected features)... (5) Use the "Export to CAD" tool in the conversion toolbox and export the CAD and annotation layers that were created from previous steps... Repeat for each floor and building in our data set... How can I automate the process of converting attributes to CAD or turning on lables, converting to anno and then exporting to CAD based on the other attribute of building number... EDIT >> Simplified question...


title: help with editing shapefile

text: I am not sure how this is done but I Have a shapefile with state borders for a country. What I would like is to sort of delete/dissolve the state borders and be left with only the country border. In the data attribute table, there are only polygons for the states and none for the country.   How is this done in Arcinfo or Global Mapper 10?


title: Stratified OpenLayers Clustering

text: I have an OpenLayers map with point clustering, but I want to apply a much finer granularity to the data represented in the map. Specifically, I want to stratify the clusters according to an attribute on the feature (we'll call it 'category'). So, say I have five categories: effectively I need to cluster points only with other points from the same category. I suppose this could be accomplished with five different layers, but this quickly becomes cumbersome as the number of categories gets large (I have 50+ at the moment). Has anyone seen anything like this with OpenLayers?


title: 1990 US Census Block Boundary File?

text: Does anyone here know of a source from which 1990 Census Block polygons can be downloaded? For Illinois, specifically, if not for the entire country? The Census Bureau has "no plans to create Block level boundary files", and I know that NHGIS doesn't have the block-level data. I searched the old questions here and found nothing.


title: UnicodeEncodeError when using arcpy.gp.TraceGeometricNetwork_management()

text: I am creating a python tool (run through ArcMap) which will eventually go through a feature class selected by a downstream trace and use the obtained values to do some function. I am trying to follow something like this: Link. But when using `arcpy.gp.TraceGeometricNetwork_management` I receive an error: `'<type 'exceptions.UnicodeEncodeError'>: 'ascii' codec can't encode characters in position 29-44: ordinal not in range(128)'.` I do not understand which specific feature/layer is giving me the error, and I don't know where the non ascii character would be introduced--or if this is even the issue. The affected code segment is below (I removed unrelated code):               ...     #Defines the input feature layer and other variables     inLayer = arcpy.GetParameterAsText(0)     in_geometric_network = arcpy.GetParameter(1)     sourceList = []          ...     #Define inLayer as 'Source'/flag for future downtrace     for row in arcpy.SearchCursor(inLayer):         featureID = row.OBJECTID         if featureID not in sourceList:             sourceList.append(featureID)     sourceCount = len(sourceList)          for i in range(sourceCount):         currSource = '[OBJECTID] = %s' % sourceList[i]              #Error handling, need to have showPyError step         if arcpy.Exists("TempFlagLayer"):             arcpy.Delete_managment("TempFlagLayer")              # Make flag layer         arcpy.MakeFeatureLayer_management(inLayer, "TempFlagLayer", currSource)              for row in arcpy.SearchCursor("TempFlagLayer"):             facID = row.getValue("FACILITYID")              #Where Error Appears to Occurr         arcpy.gp.TraceGeometricNetwork_management(in_geometric_network, "outGroupLayer", "TempFlagLayer","TRACE_DOWNSTREAM")      What is the Difference between **arcpy.gp.TraceGeometricNetwork_management** and **arcp.TraceGeometricNetwork_management** ? I have read that this may be a text encoding issue and tried a few presented solutions to no avail. Is this a 10.0 issue that would be resolved by going to 10.2? Any suggestions would be much appreciated. **Edit:** This issue seems to be resolved by using ESRI ArcMap 10.2


title: Change Which FeatureClass a RelationshipClass Points at

text: When you use ArcGIS' Project tool it creates a new featureclass. This is awesome, unless the featureclass you projected had been related to twenty-some tables. All of those relationships still point to the original featureclass, but not the new one, as described in this ESRI article. So, does anyone know if there is a good way to point an existing relationship class at a different featureclass without deleting the relationship class?


title: Print last digit in Numpy Array

text: I'm sure this is pretty basic, but is there a way to print a certain indexed portion of each segment in an array? For example, if I have the numpy array: ([1,2,3], [4,5,6], [7,8,9]) I'd like to print out 3,6,9.


title: how do I select more than one features from raster attribute table

text: for ex: "lc_2001" = 21, 22, 23, 24 AND "lc_2006" = 11, 31, 41, 51


title: Possible to call Telogis Geobase server from OpenLayers or Leaflet

text: I've been creating mapping solutions some time with various platforms and one I am currently working on is utilizing Telogis. I'm having a lot of trouble with their JS library, and it's not playing well with mobile/touch at all. I don't believe their Geostream server is setup to expose a WMS compliant endpoint, but they have something internal whipped up which follows a format like: Geostream/tile.aspx?t=-174,-79,300,4,129 or Geostream/tile.aspx?t={lat},{lng},{tileDimension},{4/not sure},{zoomLevel} Has anyone worked with OpenLayers or Leaflet specifically to work with Geostream/Telogis or done something similar? It's almost worth it at this point to create a Telogis implementation versus get basic functionality (available already in openlayers/leaflet) working on their platform. I know OpenLayers has their XYZ tile layer, but I don't think that's going to work in this case.


title: Selecting raster data by location: for raster and feature class data

text: I have rasters covering certain spots in my environment, I'm looking for a way to extract the values which occur at locations which are defined by a selection of feature layers. I've tried with the SelectLayerbyLocation tool (from ArcMap 10.2 (advanced license)), which seems to do the right thing, but not for this type of data. Does anybody have experience with this or recommendations for tools to use? Currently it is set up like this:               arcpy.SelectLayerByLocation_manager('codist_{0}'.format(FIDa), "INTERSECT", out_flab).save(overlap) #find out if villages overlap with cost layers      where 'codist_{0}'.format(FIDa) is the raster (FIDa a list of values), and out_flab is the feature layer extracted from a table using a cursor in previous steps. Ultimately I need to find the minimum value within the rasters at the zones defined by the feature classe (so the values of the raster cannot be altered by this operation)


title: Change marker icon on click using leaflet

text: I have a map with many (>100) markers on it. I would like to make it so that clicking on these changes the icon to a highlighted version. I've created two custom icons, one regular, and one highlighted. I've gotten this to work with single markers, but can't find any way to set it up so each icon can be changed by clicking on it. Here is working code for one icon:               var testmarker = L.marker([44.0, -73.0], {icon: unselectedIcon});          testmarker.on('click', function(e) {       testmarker.setIcon(selectedIcon);     });      However I have many markers and use a for loop to place them:               //points is a 2 dim array with lat/long pairs     for (i = 0; i <= points.length-1; i++) {         var marker = L.marker([points[i][0], points[i][1]], {icon: unselectedIcon});         }          marker.on('click', function(e) {       marker.setIcon(selectedIcon);     });      I tried giving each marker a unique variable name by using an array:               for (i = 0; i <= points.length-1; i++) {         testmarker[i] = L.marker([points[i][0], points[i][1]], {icon: unselectedIcon});          testmarker[i].on('click', function(e) {     alert(e.latlng); e.setIcon(selectedIcon);      });      }      Which just gives me "undefined" in the alert. Changing `testmarker[i].on` to `this.map.on` only gives an alert on clicking the map (no icon change). Changing that entire line to:               testmarker[i].on('click', function(e) {     alert(e.latlng); testmarker[i].setIcon(selectedIcon);     });      Changes the last one (when any is clicked), while also giving an undefined alert. How can I set the markers up so that each can individually be changed with a click, but without using hundreds of repeated code blocks for each one?


title: Filter geojson or shapefiles

text: I'm trying to create a geojson file with a few shapes of roads from OSM. Now, I've been able to get shapefiles of the greater region (province) these roads are in from http://download.geofabrik.de/ . I've also been able to convert a shape file to geojson using ogr2ogr. My problem is that it contains way too much data. Is there a way to filter a shapefile or geojson file by name, type or ID?


title: QGIS: how to identify a visible raster layer among large view (composition of rasters)?

text: I have QGIS project loaded with many raster files. For a given area, (ex: under my mouse pointer), I am looking for way to identify which (raster)layer provides the visible data. To start, I will already be happy with a simple solution using the GUI. _I am working with QGIS 2.4 on Ubuntu_


title: finding the definition of missing srid in postgis

text: I am converting a spatial Oracle database to POSTGIS, and one of the problems I encounter is that we use SRID in Oracle that do not exist in POSTGIS. I am talking about the following SRID:   * 90112 : dutch RD   * 327680: Belgian Lambert 72   * 8037: WGS84 The problem is that I do not know how to translate these SRID to POSTGIS, since they do not exist in `spatial_ref_sys`. If I visit the spatial reference I do not find any reference to the SRID at all. I was able to find   * 31300: Belgium Lambert 1972   * 4326: WGS84 Are these SRID comparable? Where can I find definitions to add SRID if they are not defined on spatialreference.org? Are the Oracle SRID's standard or not? A lot of questions, I hope you can shed some light here. Thanks :)


title: What's an analogy for a Network Link (KML)?

text: I'm trying to communicate how a product could/should/does behave with Network Links but am often getting tripped up by explaining the difference between the "link" and the "fetched content" -- which is a very important distinction when it comes to saving KML/KMZ, for example. I'm aware of the shortcut to target file analogy, but I'm looking for something for more of the non-technical folks. **Any ideas of a real-world (preferrably non-technical) analogy to Network Links?**


title: How does the radius work in Trilateration

text: I've been trying to understand the trilateration algorithm based on the wikipedia article. As of now, I have a system where I have the distance of 3 sensors wrt my position and i have the exact GPS coordinates of those 3 points. How do I include the radius?


title: How do I install ArcGIS Developer help in Visual Studio Express 2008?

text: I would like to install ArcGIS 10 Developer help in VS Express (2008) so that it works with the F1 key. Is it possible? How?


title: Tiled Map Services from Geowebcache in QGIS?

text: Can QGIS consume Tile Map Services from GeoWebCache? I know there is a article on the QGIS website which states that it does support tiled map services but it lists Tile Cache from Meta Carta labs and ArcGIS Tile Map Service. No mention of GeoWebCache, and unfortunately no luck so far in loading layers from GeoWebCache. Does anyone know if GeoWebCache is an option or not for QGIS? Thanks


title: Rasterlayer divide

text: i´m new to qgis at all. I´m a blender user and found that beautiful NZ heightmaps at koordinates.com wich are CC 3.0 and free to use. I want to use this maps for heightmap displacement if i can export them correct. So i got this 32 tif files from NZ and after i imported them and clicked on local histogram i can see my heightmaps for every seperate layer. My target is to merge these layers and then split them into 10-30 kilometer squares and save every part of these squares as a *.png with the highest possible resolution. Is it possible to get more detail on the slope or terrain at all into blender? Where do i start? What should i read and think about? Is it possible to safe the currently used Layer from Open layer too at the same time? Thank you very mutch for any help!


title: How to get default parameter value for script tool from csv file?

text: I am fairly new to python scripting. I have just figured out how to read and write input parameters for a python script from a csv file. Now I am being asked to pre-populate the script tool dialog in toolbox with values from the csv, so that the user can see right away what the parameters are in the csv and does not have to browse to them. My hunch is that this might work with the tool validator class, but I don't even know how to start with that. Has anybody tried something similar before? Any help would be appreciated. Thanks! Update: I was able to solve the problem. Please see my code below.(Note: that there is also a CVSHelper class, that is not shown in this code)               source_csv_file_path = str("C:\\Tool_Sources.csv")     source_csv = CSVHelper(source_csv_file_path)     source_csv_data = source_csv.read_csv_dict()          class ToolValidator(object):       """Class for validating a tool's parameter values and controlling       the behavior of the tool's dialog."""            def __init__(self):         """Setup arcpy and the list of tool parameters."""         self.params = arcpy.GetParameterInfo()         #Group the following parameters in the dialog box         self.params[0].category = "Defaults"         self.params[1].category = "Defaults"         self.params[2].category = "Defaults"         self.params[3].category = "Defaults"         self.params[4].category = "Defaults"            def initializeParameters(self):         """Refine the properties of a tool's parameters.  This method is         called when the tool is opened."""         if not os.path.exists(str(source_csv)):             self.params[0].value = str(source_csv_data[0]["Workspace"])         self.params[1].value = str(source_csv_data[0]["feature class1"])         self.params[2].value = str(source_csv_data[0]["feature class2"])         self.params[3].value = str(source_csv_data[0]["feature class3"])         self.params[4].value = str(source_csv_data[0]["SQL"])         return            def updateParameters(self):         """Modify the values and properties of parameters before internal         validation is performed.  This method is called whenever a parameter         has been changed."""         return            def updateMessages(self):         """Modify the messages created by internal validation for each tool         parameter.  This method is called after internal validation."""         return


title: Raster spplot legend: how to add a title beside it

text: After studying for a while how to create a chart from a raster object, I got almost everything I needed except to add a title to spplot's legend. What I tried:   1. to use `mtext("XXX (m)", side=4)`,   2. to add a `sp.text` outside the grid,   3. to use `legend.args = list(title="XXX (m)")`.  The below picture pinpoint, the feature I added manually to my plot, and in which I would like to include using R. ![enter image description here](http://i.stack.imgur.com/Y4onB.jpg) Here is one example, of what I got so far:               require(raster)     require(sp)     require(lattice)          north <- list("SpatialPolygonsRescale", layout.north.arrow(type=1), offset = c(0.95,0.85), scale=0.1)     scale <- list("SpatialPolygonsRescale", layout.scale.bar(),           offset = c(0.55, 0.03), scale = 0.4, fill = c("transparent","black"))     txt1 <- list("sp.text", c(0.55, 0.08), "0")     txt2 <- list("sp.text", c(0.75, 0.08), "0.2")     txt3 <- list("sp.text", c(0.95, 0.08), "0.4")     raster_layout <- list(north,scale,txt1,txt2,txt3)     cuts <- c(110,120,130,140,150,160,170,180,190,200)     spplot(raster(volcano), scales = list(draw=T), at=cuts, col.regions = palette(gray(seq(0,0.9,len=9))), sp.layout= raster_layout, add=T)        Thank's for your help.


title: how to calculate raster layer statistics using arcpy?

text: I'm trying to write a script that will, in part, calculate statistics for a raster layer in an Arcmap mxd, but when I run the script I get an "invalid parameter" error (Error 000840), saying that the value isn't a Mosaic Layer, Mosaic Catalog, or Raster Catalog. The Calculate Statistics tool in the toolbox works fine for a single raster, so I'm not sure how to fix this. Relevant code block:               import arcpy     inRaster = arcpy.GetParameterAsText(0)     arcpy.CalculateStatistics_management(inRaster, "1", "1", "-9999")      Any suggestions?


title: Does shapefile or MapInfo TAB have advantage as source format for OGR conversion to GeoJSON?

text: I'm relatively new to OGR and GIS in general. Most of the sources I look at give a choice of ESRI shapefile and MapInfo formats. I'm using ogr2ogr to convert these to GeoJSON for import into JSON-based databases. Can any experienced OGR users tell me if there is any advantage in the choice of a source format here? I'm more interested in preserving the integrity of the data than speed, etc.


title: How to see print commands through Python Script while programming plugin for QGIS?

text: This might sound like a silly question. Is there a way that from running a custom plugin made for QGIS that a Python Shell can appear along when the plugin is run, like a debug screen. I'm asking this to know if there is a way to see print commands through a Python Script while programming a plugin for QGIS.


title: How to migrate geoserver?

text: I have a geoserver installed on a server and I want to move the geoserver to another server. What is the easiest way to do that?


title: GeoServer - update test server to production

text: I have GeoServer (v2.2 from OpenGeo Suite) running on a test server hosting many different WMS services sourcing many different PostGIS db tables. I want to push this setup onto a production server now but I'm not sure what the best method would be for migrating this info without recreating all the Workspaces, Stores, and WMS layers again. Both servers are the same: _Windows Server 2008 R2 Standard_ My thoughts so far are:   1. Stop GeoServer on test   2. Make backup of all dbs in PGAdmin on test   3. Restore backup(s) to production db   4. Copy data directory from test and paste it to same location on production   5. Start GeoServer on production Thoughts? Thank you


title: How to calculate polygon areas in acres or square miles instead of feet?

text: I have a layer in State Plane NAD83. When I use "Vector|Geometry Tools|Add/export geometry columns" or Field Calculator they both create the area in feet. What if I want acres or square miles? Thanks How to calculate polygon areas in QGIS?