Creating weighted list using Select tool in ModelBuilder?

I've done a raster to point conversion and have a column of the grid codes. Let's say it is composed of 10 numbers [9,5,7,1,7,3,7,2,8,1]. Right now I am doing a selection on those numbers based on the top 50% of the Max value(Select values greater than 4.5, which gives {9,8,7,7,7,5}) What I would like to do is take the original array and select all of the values that make up greater than 50% of the total(Total is 68/2 = 34, so SUM(9,8,7,7,7) > 34) and have those as my selection points. I think I can sort the data and use another 1 or 2 calculate fields to get the sum of the column and the 50% value, but how would I go about adding the values to get above 50% and save them as the selection?


Locating shapefile of European railways for goods transportion?

We are trying to make a project about European goods trade so we need railway data in shapefile format. More specifically, we are trying to find the potential of mine products being exported from Turkey to Europe by using Geomarketing tools. Basically, we need a European railways layer for ArcGIS (excluding passenger- only railways).


How to release Events

I want to use the OnCreateFeature-Event to combine it with other actions. So I use               Events.OnCreateFeature += delegate(IObject obj) { LoopTools_OnCreateFeature(obj); };      to listen to this event. That works very well. But how can I stop listening? I tried               Events.OnCreateFeature -= delegate(IObject obj) { LoopTools_OnCreateFeature(obj); };      but this didn't release the event. So when I looped through some sweeps, it happened that I have wired the event two or more times and the corresponding actions are done to often. I also tried               Events.OnCreateFeature -= LoopTools_OnCreateFeature;      but that has the same effect. What am I doing wrong? I'm thankful for any suggestions.


Counting self intersections of linestring using PostGIS?

Is there a way of using PostgreSQL + PostGIS for finding the number of self intersections in a linestring? I have a linestring that goes forward but in circles, and I need to find the number of times it crosses itself.


How do you memorize the meaning of longitude and latitude?

Longitude and latitude are concepts I usually don't need an then I sometimes suddenly need to learn their meaning for a period of time b/c I am using them. Is there an aide-memoire to finally remember their meaning until the end of my days? What is the etymology of these two terms?


Can OGR handle Esri's Geodatabase extensible markup language (XML) files?

The USDA Forest Service distributes GIS data as Esri Geodatabase extensible markup language (XML) files. I downloaded one in the hopes that I would be able to convert it to something less esoteric using OGR. However:               $ ogrinfo ~/Downloads/S_USA.National_Trails.xml     FAILURE:     Unable to open datasource `/Users/martijnv/Downloads/S_USA.National_Trails.xml' with the following drivers.      Unfortunately, neither the FileGDB driver nor the OpenFileGDB driver's pages explicitly mention this XML format. It seems to be defined here on ESRI's website. Any way to read / convert this with FOSS4G tools?


Cannot see the shapes in arccatalog or arcmap after creating spatial indexes

I created a spatial index on a feature class, but when i try to load it in arcmap, i cannot see the shapes. When i remove the spatial index, i can see the shapes in arcmap/arccatalog.


Can you use wildcards for column headers in Field Calculator?

I know you can use wildcards for fields like so (in the Field Calculator):               case when "column" ILIKE '%example%' then 1     else 0     end      Can you do something similar for the column headers themselves? I ask this because I'm joining several layers (using the **Joins** properties) and it would make it easier for me to edit one set of filters instead of editing several filters since the column names will have to include the joined layer name. I'm using QGIS 2.2.


BBOX and Projections of WMS services in Geoserver

we have tried to overlay a raster layer on Google map and have some difficulties to align the raster images onto the base map. When it is on the overview (Zoom level 1), it looks like this: ![Overview of the raster](http://i.stack.imgur.com/d7qjr.png) On a lower resolution, you could still spot the mis-alignment in high altitude area such as North Europe and Canada: ![Zoom in](http://i.stack.imgur.com/O4m6G.png) BUT when we zoom into the highest level, the problem has gone: ![enter image description here](http://i.stack.imgur.com/UOUrq.jpg) We have tried these approaches to address this problem:   1. Change the projection of the raster layer on Geoserver from WGS 84 to Web Mercator, does not even shown the image on Google Map.   2. We try to change the bbox option in the request but it returns strange results that we cannot even zoom in. Do you have any idea why this happen? What can we do to address this problem? Thank you very much!


How to calculate wait time on a one-lane road with two-way travel?

I want to know how to calculate the wait time on a single-track/one-lane road (only room for one car at a time) for one car waiting for another car to pass by. For example, two cars drive on the one-lane road in opposition to each other. When the two cars meet in the road, one car should wait for the other car to pass. I wonder if Network Analyst (especially, Vehicle Routing Problem) can solve this problem.


How to zoom to an ILayer?

I used `IFeatureLayerDefinition.CreateSelectionLayer()` to create a new `IFeatureLayer` then i cast this one to `ILayer` and set it to the Map, my problem is that i can't zoom programmatically to this `ILayer`, i tried to call `ICommand.ControlsMapFullExtentCommandClass` but it didn't work. This is my code :               public static void myFunction(ITable table_commune, string code_commune)     {                  if(table_commune == null || code_commune == null) return;                  ILayer layer = (ILayer)table_commune;             IFeatureLayer featureLayer = (IFeatureLayer)layer;                  IFeatureLayerDefinition featureLayerDef = (IFeatureLayerDefinition)featureLayer;                  IFeatureLayer new_featureLayer = featureLayerDef.CreateSelectionLayer("Commune", false, null, "NUM_COMMUNE = " + (code_commune));             ILayer new_layer = (ILayer)new_featureLayer;                  Map.AddLayer(new_layer);             Map.ActiveView.Refresh();                  ICommand command = new ControlsMapFullExtentCommandClass();             command.OnCreate(Map.Object);             if(command.Enabled) command.OnClick();     }


Facebook Place Api

Do you know if there are a requirements or restriction on Facebook Place API? Is it possible to download the data? Is it open-source?


Can I change the font type in all Text_Elements in a page?

I want to change all the font styles in a number of mxd's from "Lucinda Sans" or whatever the current one is to "Arial" without changing the font size. I wrote a simple script to find/replace text but can't figure out how to change the font except by adding html code as in the example below (see image as well). But this doesn't change the root font and also I want it to change the font of all text strings in the Text and Legend elements. No need to search/replace any text. Thanks in advance. Screen capture and Code are below ![enter image description here](http://i.stack.imgur.com/IUBtV.gif)               import os, arcpy, arcpy.mapping     oldText = arcpy.GetParameterAsText(0)     newText = arcpy.GetParameterAsText(1)     pdf = arcpy.GetParameterAsText(2)     mxd=arcpy.mapping.MapDocument("Current")          # Loop through each text element in the map document     for textElement in arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT"):              # Check if the text element contains the out of date text         if textElement.text == oldText:              # If out of date text is found, replace it with the new text             textElement.text = '<FNT name="Arial">' + newText + '</FNT>'          #while PDF = 1:     # Export the updated map to a PDF     #path = r'P:\2011\Job_031_TownPlanning_SeriesProduction\Working\draft_output\esri\2\wetland\'     #arcpy.mapping.ExportToPDF(mxd, newText + "-TownPlanning_Wetlands_Overlay_Ver2.pdf")          #arcpy.mapping.ExportToJPEG(mxd, outFile)     #outFile = newText + df.name + ".pdf"          # Clean up the MapDocument object by deleting it     del mxd          arcpy.RefreshActiveView()     arcpy.RefreshTOC()


Out of Range error when creating thumbnails of MXDs

I am tryting to create thumbnails of all the mxd's in a directory but no mater how high I set the value of the "While" loop it gives me an "Index out of range" error... Also can I get it to look at subdirectories as well? best,               #Make thumbnails from all mxd's in current directory          import arcpy, glob, os, sys     from arcpy import env     from arcpy import mapping     env.overwriteOutput = True          #path = sys.argv[1] # for using in toolset, use directory parameter     path = os.getcwd() # Script in same directory as files being processed     mxdList = glob.glob(path + "\*.mxd")     env.workspace = path     x=0          print 'Reading mxd files from ' + path          mxd_List = glob.glob('*.mxd')     count_Mapdocs = len(mxd_List)     print mxd_List,count_Mapdocs          while x < 50:      mapDocs=mxd_List[x]      mapDoc=arcpy.mapping.MapDocument(mapDocs)      framesList=arcpy.mapping.ListDataFrames(mapDoc)      mapDoc.activeView=framesList[x]      mapDoc.makeThumbnail()      mapDoc.save()      print "Created thumbnail for " + mxd_List[x]      print "x= "+ str(x)      x=x+1      print "x updated =" + str(x)


Looking for a region growing algorithm

I work with a raster set representing land values and I would like to automatically create polygons with random shape but with certain size and/or land value given a centroid point of each polygon. The centroid point will act as the initial raster cell (a pixel called as a seed cell) that will belong in that certain polygon and then a region growing algorithm will begin adding pixels around a centroid pixel until the constraint of size and/or land value of a polygon will be satisfied. Is anybody who has any idea about an existing region growing algorithm? or at least which is the class of ArcObjects or Interfaces that I may work with, so as to read the value of each pixel, create a new polygon by adding new pixel to it? I hope that the above make sense and somebody may help me. ### Edit Basically I intend to automatically create polygons with regular shapes and a series of constraints such as size, land value etc. using a genetic algorithm (GA). But first I need to create a set of random solutions in order to feed the GA.So, for instance on land block which is an area enclosed by roads I have already saying 4 centroid points. Each centroid point represents the approximate location of each new land parcel. In addition, each centroid is associated with attributes of each parcel i.e. size and land value. So, I want to begin by each centroid as a seed point of the region growing algorithm to starting creating a random shape for each parcel based on each centroid. I hope that the above make sense. I look forward how can I create this region growing algorithm or if there is already one in VBA and ArcObjects.


Display Feedback "Stutters" When Moving Features

I have a custom tool for moving features that implements IDisplayFeedback and geometry-specific CoClasses to show the user where they are moving the feature.                   IMovePolygonFeedback polygonFeedback;         bool feedbackStarted;              public override void OnMouseDown(int Button, int Shift, int X, int Y)         {             feedbackStarted = false;                  //A BUNCH OF STUFF HERE TO SELECT A FEATURE ON MOUSEDOWN                  geometry = feature.Shape;                  polygonFeedback = new MovePolygonFeedbackClass();             polygonFeedback.Display = doc.ActiveView.ScreenDisplay;             polygonFeedback.Start(geometry as IPolygon, doc.CurrentLocation);             feedbackStarted = true;         }              public override void OnMouseMove(int Button, int Shift, int X, int Y)         {             IPoint point = doc.ActiveView.ScreenDisplay.DisplayTransformation.ToMapPoint(X, Y);             if (polygonFeedback != null && feedbackStarted)                 polygonFeedback.MoveTo(point);         }      What sometimes happens when the mousedown and mousemove happen quickly is that the feedback display stutters for a second, leaving a (what I assume to be) graphic, then continues on with a new graphic moving around with the mouse until mouseup. Looks kinda like this: http://i.imgur.com/99fj8.png At mouseup I change the feature shape to the new position and store the feature. I union the original feature extent with the new feature extent and pass that envelope to a partial refresh. Problem is sometimes parts of the "stutter" aren't in that envelope so I get dangly bits: http://i.imgur.com/v1oxx.png I'm trying to avoid straight refreshes but these dangly bits are not pretty and don't go away until a refresh happens (forced by user or move/pan, etc.) Questions:   1. Does anybody know why the "stutter" is happening and how can I prevent it?   2. Is there a way to partially refresh the dangly bits?   3. What is the feedback? Is it a graphic? Can I trap it during the onmove to add it to the partial refresh envelope?   4. Is there an infintely better way to do this that I'm mising?  Help!


Table Borders won't print when added to display

I've encountered this problem every so often over the last few years. When adding tables to the display in ArcMap, the following occurs when printing the map:   1. All table borders visible on the display but do not print   2. All Table borders visible on the display, but only top and left border prints   3. Only top and left table borders visible, yet all borders print   4. All table borders visible and all print (as it should be) What frustrates me about this is that it is extremely inconsistent - I can have 4 tables on my display and 2 will print perfectly while the other 2 won't. I can move the tables slightly, then the original 2 won't print right while the other 2 will. Today I can print it perfectly, tomorrow I can open that same mxd and print without making any changes, and the tables will print wrong. As a workaround I've always had to draw a rectangle around the table, align the borders and group each table with its border (and if its more than 3 tables, this quickly becomes annoying). This problem has "haunted" me since version 9.2.


Why does ESRI make me store my DBF doubles as strings?

As far as I can tell I have to store all numeric values in a shapefile's associated DBF file as strings (yes, the N type is essentially a string). Can anyone confirm that ESRI does not support the use of Double (O) nor Long (I) data types in the .DBF file? I'm using this DBF reference **Based on the response** thus far I apparently did not provide enough information. My question is not one of precision but rather one of optimization. When manually setting a dbf field to type O (for double) in the dbf file, I receive this message when trying to load the standalone table into ArcMap. ![Field type fail](http://i.stack.imgur.com/yXcEp.png) Storing the number 1.23456789123434 as type N (defined in linked document as: "Number stored as a string, right justified, and padded with blanks to the width of the field.") costs me 15 bytes while storing the same number as type O (double) would cost me only 8 bytes. Please correct me if I am wrong on this.


How to overlay map onto a corner of an image, using that image's GPS exif data?

I have several hundred JPG images taken during a time lapse of a drive, with each image containing embedded GPS information. Is there an OS X friendly workflow that can allow me to:   1. create a highway map image (say a 300x300 pixel Google map representing approx a 3mi x 3mi area) centered around the geo coordinates taken from the embedded GPS exif data of that image   2. overlay that map image onto the corner of the original image, and    3. repeat for all images in the time lapse sequence. I think with a combination of ImageMagick and shell scripting, I can probably do (2) and (3), but I don't know how to do (1).


Problem with geotiff in qgis only in some PCs

Helllo I'm having some weird problem opening a 16bits geotiff with qgis. In my pc it opens and displays perfectly, but in another pc (with the same version of qgis) it displays all wrong the image getting pixels of several colors without any sense. ![enter image description here](http://i.stack.imgur.com/9RqaR.jpg) Any ideas? Thanks


Georeferencing an image in C# with GDAL

I want to upload a jpeg or some raster image into a C# form and then on entering the latitude and longitudes I need to be able to create an GEOTIFF file of the same image. How can this be done in C#.NET? you had asked me to use GDAL libraries i did add references, i'm using Visual studio 2010, i have included library files, i have computed llx lly lux luy also, but how to tag it to an image, is there any inbuilt function or anything? this is the code i have used               using System;     using System.Collections.Generic;     using System.ComponentModel;     using System.Data;     using System.Drawing;     using System.Linq;     using System.Text;     using System.Windows.Forms;     using OSGeo.GDAL;     using OSGeo.OGR;     using OSGeo.OSR;          namespace geo_tagging     {         public partial class Form1 : Form         {             public Form1()             {                 InitializeComponent();             }                  private void button2_Click(object sender, EventArgs e)             {                 int orx = pictureBox1.Image.Height;                 int ory = pictureBox1.Image.Height;                 int ctrx, ctry, lux, luy, llx, lly, bufx, bufy;                 bufx = orx / 108000;                 bufy = ory / 108000;                 ctrx = int.Parse(textBox2.Text);                 ctry = int.Parse(textBox3.Text);                 lux = ctrx - bufx;                 luy = ctry - bufy;                 llx = ctrx + bufx;                 lly = ctry + bufy;                      Gdal.GCPsToGeoTransform(             }                  private void button1_Click(object sender, EventArgs e)                  {                 OpenFileDialog dlg = new OpenFileDialog();                           if (dlg.ShowDialog() == DialogResult.OK)                 {                                      PictureBox PictureBox1 = new PictureBox();                 string Chosen_File = "";                 Chosen_File = dlg.FileName;                 textBox1.Text = dlg.FileName;                 pictureBox1.Image = Image.FromFile(Chosen_File);                 int X = pictureBox1.Image.Height;                 int Y = pictureBox1.Image.Width;                 label2.Text = X.ToString();                 label4.Text = Y.ToString();                      }                      dlg.Dispose();             }                  private void button3_Click(object sender, EventArgs e)             {                 textBox1.Text="";                 textBox2.Text="";                 textBox3.Text="";                 pictureBox1.Image.Dispose();                  }                 private void pictureBox1_Click(object sender, EventArgs e)             {                 OpenFileDialog dlg = new OpenFileDialog();                           if (dlg.ShowDialog() == DialogResult.OK)                 {                     PictureBox PictureBox1 = new PictureBox();                     string Chosen_File = "";                     Chosen_File = dlg.FileName;                     textBox1.Text = dlg.FileName;                     pictureBox1.Image = Image.FromFile(Chosen_File);                     int X = pictureBox1.Image.Height;                     int Y = pictureBox1.Image.Width;                     label2.Text = X.ToString();                     label4.Text = Y.ToString();                      }                      dlg.Dispose();             }                           private void textBox1_Click(object sender, EventArgs e)            {                textBox1.Text = "";            }                  }      }      * * * **never mind got it guys, we need to use a exe file to call it as a process and pass arguments into it!** thanks for the help


Does anyone know how to get the QGIS Web Client measure tool to show units in feet and miles?

Does anyone know how to change the QGIS Web Client measure tool (distance and area) so that it shows feet or miles rather than meters?


Why are GeoJSON coordinates different exported from QGIS vs. ogr2ogr?

I have a shapefile with a Google Mercator projection (900913) that I need converted to GeoJSON. I need to do this on a regular basis amongst other things so I wrote a shell script to do it using ogr2ogr. I am also converting this to a 4326 projection so the coordinates are more usable. This is how I am using ogr2ogr to do that: `ogr2ogr -f "GeoJSON" -s_srs EPSG:900913 -t_srs EPSG:4326 output.geojson my-shapefile.shp -lco WRITE_BBOX=YES -lco COORDINATE_PRECISION=6 --debug on` For some reason all of my coordinate arrays have 3 values, the last one always being 0.0. Like so: `[ -122.633291, 48.628477, 0.0 ]` Where is the extra 0.0 coming from?? However, if I export from qgis the coordinates come out as expected.. `[ -122.633291, 48.819157 ]` I also notice that the longitude is slightly different between the two. Any ideas on how I could improve my ogr2ogr command? Or perhaps this is a bug? Pete **Here are some more details about the shapefile being converted.** Storage type of this layer:ESRI Shapefile   Geometry type of the features in this layer: Polygon   The number of features in this layer: 431   Editing capabilities of this layer: Add Features, Delete Features, Change Attribute Values, Add Attributes, Create Spatial Index, Fast Access to Features at ID, Change Geometries      In layer spatial reference system units : xMin,yMin -19951913.23,2139102.40 : xMax,yMax 20021888.10,11554793.57      +proj=merc +lon_0=0 +lat_ts=0 +x_0=0 +y_0=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs


How to write an address search plugin?

I am migrating some users from MapInfo to QGIS, and before they sign off on it, they want a very simple address search in the same way that we currently have one working in MapBasic. I;ve been having a look around, but can;t seem to get my head around modifiying the quick find and find by attribute plugins which already exist. Essentially they currently have the following: A mapbasic routine which presents the user with portions of the address which they can fill in Such as               field 1: Building name/number     field 2: Street Name     field 3: Locality     field 4: Town     field 5: Postcode      The process then queries a specific layer using like statements, returns a list of matching records which when clicked zoom to the relevant address. They are adamant that using the QGIS query builder is going to be 'too complicated' for these users and want me to simplify the process in QGIS to a similar one to the above. So we have a vector layer containing addresses available in the project - is it possible to mirror this MapInfo functionality - and if so, can anyone provide me with some guidance or point to a tutorial for doing this type of task. Thanks Edit: 15:22 11/06/2013 To Clarify: The addresses are held in a MapInfo tab file, which is loaded in to the project. All of the fields that would be queried are of type string - there is an additional useful field called searchAddr which has field 2, 1 and 3 concatenated (split by commas). The data also contains the coordinates as integers for each location. So in terms of code (hopefully, if I use how it works in SQL to explain that will make it clear), we would be doing soemthing like:               Select * from <layer>      where searchAddr like '%<field1>%'      and searchAddr like'%<field2>%'      and searchAddr like '%<field3>%'      and Town like '%<field4>%'      and Postcode like '%<field5>%'      Therefore if the user puts in 42 as the House Number in field 1 and postcode AB12 3CD in field 5 the query would be               Select * from <layer>      where searchAddr like '%42%'      and searchAddr like'%%'      and searchAddr like '%%'      and Town like '%%'      and Postcode like '%AB12 3CD%'


OGC WMS Validation

We're trying to validate our WMS server with OGC standards,to do so OGC has a test page available. Here,only stacked on a single error                wms:profiles-basic-1 (View Details): Failed      When we look into detail http://cite.opengeospatial.org/test_engine/wms/1.1.1/exec_summary page requires following conditions in order to validate WMS 1.1.1 standards: >   1. It must support image/png or image/gif for GetMap requests.   > >   2. It must contain the CITE dataset in layers that are subsetable and > resizable and support EPSG:4326.   > >   3. The EPSG:4326 support must be precise up to the ten-thousandth of a > degree.   > >   4. The default style for the cite:Lakes layer must fill in the polygon > with non-white pixels. > Condition 1 is clear and is supported on the system.The problem is I believe on the others (2,3,4)   What causes validation test to fail ? Best Regards


Modify default options in QGIS

I would like to change some default QGIS options. For example, the default font used by QGIS composer on my system is ubuntu. I would like to change that. I would also like to get no border when creating an object. Is there a config file I can create or modify in my .qgis user folder? A user option file (like in scite editor) for example, would be valuable if it does not exists yet.


How to split a polygon into multiple small parts by grid

we delineated a river basin in shape file and generated a line-featured shapefile using Hawths tools. now our task is that we want to divide this basin into small polygons by gird in order to compute the area within the grid at the boundary. Does anyone know how to implement this using arcgis 9.3? Your help will be greatly appreciated.


Can I say WGS84 is more accurate than NAD83 in terms of their reference ellipsoids?

Other than its application, can we say the reason of common adoption of WGS84 is due to its accuracy?


How to load and view .gri and .grd files in QGIS

An online GIS Repository called DIVA-GIS (http://www.diva-gis.org/gdata) offers data in three formats - ERSI files, "DIVA gridfiles", and DBF files The DIVA gridfiles have extensions .gri and .grd How can these file types be opened in qGIS? The "Add Raster" menu option does not seem to work


What does feature mean in QGIS?

I cant understand the meaning of feature in QGIS `QgsFeature` class. How it is related to layer and geometry? I have read qgis documentation but i cant understand what is feature.


Interpolation for timeseries in ArcGIS

I'm trying to calculate average rainfall value from a number of points using Inverse Weighted Distance tool in ArcGIS 9.3. My problem is that: each point has it own time series, therefore the interpolation process should be able to carry out for all years (kind of iteration so to speak). Following is a sample attribute table: ID X Y Name Rain1990 Rain1991 Rain1992 Rain1993 .... Rain2010 1 xx1 yy1 AA 1210 1189 1863 1269 ......   2 xx2 yy2 BB 1492 1502 2187 1923 ...... ...... Could anybody show me how to do that. Any suggestion would be much appreciated Nice weekend every1 thecatalyst Edit 1: I finally did this by using C++ code which required ArcGIS mask grid, data files & locations of all the points. If someone needs the code, contact me and I'd love to share! Edit 2: I recently used R to do this interpolation task. You can use either hydroTSM, gstat or spacetime packages. Few example links below: http://spatial- analyst.net/wiki/index.php?title=Spatial_interpolation_exercises_%28NL%29 http://www.geostat-course.org/Topic_Bivand_2012


Geowebcache bounding box to tile conversion is not working properly (EPSG:4326)

I am trying to make Geoserver and built in Geowebcache work together. I have a page with google maps and I am rendering images from a published WMS layer using getTileUrl function. Unfortunately I am getting wrong tiles when geowebcache is activated. Here is a request which uses caching (caching is enabled for png8):                   http://myserver/geoserver/wms?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&TILED=TRUE&TRANSPARENT=TRUE&WIDTH=256&HEIGHT=256&FORMAT=image/png8&LAYERS=layername&SRS=EPSG:4326&bbox=28.7841796875,40.94671366508002,28.828125,40.979898069620155      response headers:                   Cache-Control:no-cache         Content-Disposition:inline; filename=layername.png8         Content-Type:image/png         Date:Fri, 30 May 2014 08:19:17 GMT         ETag:91591a0d685881053a9d4761f42086f8         geowebcache-cache-result:HIT         geowebcache-crs:EPSG:4326         geowebcache-gridset:EPSG:4326         geowebcache-layer:layername         geowebcache-tile-bounds:28.7841796875,40.95703125,28.828125,41.0009765625         geowebcache-tile-index:[4751, 2980, 12]         Last-Modified:Thu, 29 May 2014 16:31:31 GMT         Server:Apache-Coyote/1.1         Transfer-Encoding:chunked      Here is a second request which hits directly to geoserver (caching is enabled for jpeg):                   http://myserver/geoserver/wms?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&TILED=TRUE&TRANSPARENT=TRUE&WIDTH=256&HEIGHT=256&FORMAT=image/jpeg&LAYERS=layername&SRS=EPSG:4326&bbox=28.7841796875,40.94671366508002,28.828125,40.979898069620155      response headers:                   Content-Disposition:inline; filename=layername.jpg         Content-Type:image/jpeg         Date:Fri, 30 May 2014 08:19:01 GMT         geowebcache-cache-result:MISS         geowebcache-miss-reason:no tile cache for requested format         Server:Apache-Coyote/1.1         Transfer-Encoding:chunked      Although I am requesting for the same bounding box, the first request which uses geowebcache returns wrong portion of the map while the second works fine. Also, the first request finds a tile in the 12th zoom level while my map is actually in zoom level 13. I guess, bbox -> tms tile mapping conversion is not working properly. Anyone can propose suggestions on how I am doing wrong? Note: my wms layer has native & declared srs:4326 Note 2: I am not using openlayers. Edit: I can check I am using the correct bounding box using the following url:                  http://www.maptiler.org/google-maps-coordinates-tile-bounds-projection/        Google: (4751,3072)        TMS: (4751,5119)        Zoom:13             == Tile Boundaries ==        WGS84 datum (longitude/latitude):        28.7841796875 40.94671366508002        28.828125 40.979898069620155      But webgeocache finds [4751, 2980, 12]. In fact when I look at webgeocache directory tile x=4751 exists only in level 12 but not in level 13. Edit 2: Example for topp:states layer Google: (301,382) TMS: (301,641) Zoom:10                   http://localhost:9090/geoserver/gwc/service/wms?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&TILED=TRUE&TRANSPARENT=TRUE&WIDTH=256&HEIGHT=256&FORMAT=image/png8&LAYERS=topp:states&SRS=EPSG:4326&bbox=-73.828125,41.50857729743935,-73.125,42.032974332441405              response headers:         Cache-Control:max-age=3600, must-revalidate         Content-Disposition:inline; filename=geoserver-dispatch.image         Content-Type:image/png         Expires:Fri, 30 May 2014 10:47:17 GMT         geowebcache-cache-result:HIT         geowebcache-crs:EPSG:4326         geowebcache-gridset:EPSG:4326         geowebcache-tile-bounds:-73.828125,41.484375,-73.125,42.1875         geowebcache-tile-index:[151, 187, 8]         geowebcache-tile-index:[151, 187, 8]         Last-Modified:Fri, 30 May 2014 09:43:38 GMT         Server:Jetty(6.1.8)         Transfer-Encoding:chunked              Correct tile should be:         http://localhost:9090/geoserver/wms?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&TILED=TRUE&TRANSPARENT=TRUE&WIDTH=256&HEIGHT=256&FORMAT=image/jpeg&LAYERS=topp:states&SRS=EPSG:4326&bbox=-73.828125,41.50857729743935,-73.125,42.032974332441405


Extract boundary from detailed layer in ArcGIS or QGIS

Is it possible to return the boundary (outside) permiter of a polygon layer? Let's say you have the map of the USA, for simplicity, broken down to the county level, is it possible to return the boundary map of the whole country from that map?


Transactions in Geoserver / WFS - Is it possible to know which "action" failed?

I'm trying to implement transactions for some queries to Geoserver. I'm using plain HTTP Post to make the requests, from Java. One of those queries looks something like :               <wfs:Transaction service='WFS' version='1.0.0'                                 xmlns:wfs='http://www.opengis.net/wfs'                                                        xmlns:gml='http://www.opengis.net/gml'                                     xmlns:ogc='http://www.opengis.net/ogc'                                     xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'                      xsi:schemaLocation='http://www.opengis.net/wfs                                                 http://schemas.opengis.net/wfs/1.0.0/wfs.xsd'>                                                                       <wfs:Insert>                                                                  [[FEATURE_TO_INSERT_1]]                                              </wfs:Insert>                                                              <wfs:Insert>                                                                  [[FEATURE_TO_INSERT_2]]                                              </wfs:Insert>                                                              <wfs:Insert>                                                                  [[FEATURE_TO_INSERT_3]]                                              </wfs:Insert>                                                               </wfs:Transaction>          If all three inserts succeed, they are commited. If one fails, none are commited and something like this is returned :               <?xml version="1.0" ?>     <ServiceExceptionReport        version="1.2.0"        xmlns="http://www.opengis.net/ogc"        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"        xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd">        <ServiceException>           java.lang.RuntimeException: Parsing failed for DIAMETRE: java.lang.NumberFormatException     Parsing failed for DIAMETRE: java.lang.NumberFormatException     null     </ServiceException></ServiceExceptionReport>      This is fine, but I'd like to know _which one of those three inserts actually failed_! Is there a way to give each action of the transaction an `id`, and make Geoserver output it somewhere in the returned `ServiceExceptionReport` so I'm able to identify which action the error is related to? Update : I'm currently using WFS 1.0.0. Maybe there are more options for transactions with a newer version?


recover toolbar in visualizer qgis 1.8.0 lisboa

I accidentally removed the toolbar in the printer visualizer. Anyone knows how to recover it? I would expect a button of show toolbar or something, but I can not find it anywhere... Thanks!


Leaflet rendering TileMill tiles in the wrong order

I'm stumped, and quite a lot of searching has turned up nothing helpful. I'm on the first step of what will ultimately be a map with three raster layers and three layers of markers (with controls to toggle between the rasters and their associated data, with popups/tooltips for the data), but I can't get the Tilemill tiles to render properly. (I created the rasters in QGIS, ran them through GDAL to colorize and re-project them, and then put them into TileMill.) To wit: ![enter image description here](http://i.stack.imgur.com/xgFxM.jpg) That's in Chrome. This is Safari: ![enter image description here](http://i.stack.imgur.com/WU4Wn.jpg) And here's the code, which looks quite innocuous to me (I've commented out everything but the tiles at this point, so that's all I've included):                          <title> - Leaflet demo</title>                                Map

                Has anyone ever encountered this problem? If so, how did you overcome it? I'm eager to start into the rest of the process of making this map (by which of course I mean "uncovering the next problem to solve"). _Edited to add:_ I tried re-exporting a new MBTiles file, uploading it as new data, and creating a new Mapbox project from that data. No dice. Next step in isolating the issue would be to set up the MBTiles file on a server, skipping Mapbox, but that seems more likely to create problems than to fix them.


How can the scale be projected correctly in Quantum GIS when it is imported from google earth (KML) files?

While importing KML files from google Earth to Quantum GIS, the scale is not being projected properly and the area of a particular selected feature is not being calculated in the attribute table by the field calculator. How can the area of a selected feature be calculated by the field calculator, as right now it is showing up zero as the value?


ArcGIS JSAPI draw toolbar tooltips not displayed in IE10

I am experiencing an issue where draw toolbar tooltips are not displayed in IE10 when using the ArcGIS JSAPI. Try the following example in IE10 and chrome (draw a polygon to see what I mean) http://developers.arcgis.com/en/javascript/samples/graphics_add/ Has anyone else experienced this issue and is there any way to get the tooltips to display in IE10?


What is Spatial Reference System in Laymans Language?

I am trying to understand the concept behind the Spatial Reference System, Why is it used and what is so specific about the number. I went through many definations and almost all went over my head. So Could any one help me understand what is SRID, and its importance in GIS. I thought, it was a reference to draw maps from a real world place, expressed in map. But then I inserted a point in PostGIS, with SRID 300 and then inserted the same point with SRID 350, I found the two points showing the same place, in QGIS viewer. I am totally confused.


Sending GPS Location to server

Is it possible to send my current location on iPhone or Android to the server so that others can view my current location?


Does ArcGIS (arcObjects SDK for java) support multiline labels using TextSymbol?

Is it **possible** to add multline labels using textsymbols in ArcGIS 10.1 (SDK for Java) in a 3d model? In my system, even the spaces are getting omitted, for a String `s="this is \n war"` Label produces output:`thisiswar` any help or alternative would be much appreciated. thank you


GetFeature with WFS layer is not working as the click co-ordinates are returned in spherical co-ordinates. using geoserver 2.1.3 and openlayer 2.11 layer information is in EPSG:4326 WMS works fine WFS trasaction works fine trying to GetFeature information on click from the WFS layer as the total number of features are small and it is a custom vector layer.               control = new OpenLayers.Control.GetFeature({         protocol: wfs_layer_protocol,         box: false,         hover: false,         click: true     });          control.events.register("featureselected", this, pickNodeId);     map.addControl(control);     control.activate();      the WFS post request has the following bounds -14710846.457064 4317003.9227542-13710750.910779 6517099.4690396


ArcIMS vs ArcGIS Server

having never used ArcIMS I am not able to answer the following question. "Why don´t we use ArcIMS anymore?" I have recently taken over a position which used to administer ArcIMS clients but now use ArcGIS Server architecture. Colleagues who have been here a while still ask why ArcIMS needs to be replaced and the only answer I can give is that the software is not supported or developed by ESRI anymore. But regarding stability, functionality,supported formats etc I can´t say much. Could anyone give me a concise little list of reasons why ArcIMS is "old" and should be replaced by ArcGIS Server? It would also help me to understand how Server GIS in ESRI has developed. Thanks for any comments, Robert


How can i detect the number of polygon is drawed in a edit session in QGIS

I am working with qgis 1.8 and i want to know how many polygon drawed in one edit sessions is there any signal emitted with qgis ???


Validate a gml file

I receive a gml-like response from a RESTful Web service. It looks good for me but I can not imported in QGIS. Is there an online validation tool for a valid gml file? Or am I missing something for the schema? The response I received is as               <Polygons>     <DriveTime duration="30">     <Polygon>     <exterior>     <LinearRing>     <posList>41.0296010971069 -73.9398550987244 41.0188937187195 -73.9155864715576 41.0581398010254 -73.8332319259644 41.017370223999 -73.8251423835754 40.9897971153259 -73.7459421157837 40.9789824485779 -73.6955809593201 40.9320545196533 -73.7493538856506 40.862123966217 -73.8021397590637 40.8192944526672 -73.8084053993225 40.8174920082092 -73.8013029098511 40.8047890663147 -73.6684370040894 40.7836532592773 -73.5890650749207 40.7572603225708 -73.6199641227722 40.7433986663818 -73.6648964881897 40.7084226608276 -73.6869120597839 40.6833171844482 -73.6838436126709 40.6573748588562 -73.6869549751282 40.6232357025146 -73.7346339225769 40.6431698799133 -73.7853598594666 40.6136870384216 -73.8205289840698 40.6405091285706 -73.8775634765625 40.629415512085 -73.8853740692139 40.6116271018982 -73.897111415863 40.5840969085693 -73.9238047599792 40.5747413635254 -73.9734792709351 40.58349609375 -73.9834785461426 40.6026148796082 -74.015429019928 40.5769944190979 -74.0807676315308 40.5689263343811 -74.0921187400818 40.5981302261353 -74.1254639625549 40.6105327606201 -74.1812968254089 40.5980658531189 -74.2316579818726 40.6317758560181 -74.238395690918 40.680570602417 -74.2200064659119 40.6869649887085 -74.2736077308655 40.714066028595 -74.295859336853 40.7720446586609 -74.269380569458 40.8061408996582 -74.2862892150879 40.8088231086731 -74.290087223053 40.8478331565857 -74.2046213150024 40.8865427970886 -74.2311215400696 40.8948683738709 -74.2362928390503 40.9156179428101 -74.1825199127197 40.9354877471924 -74.133939743042 40.950014591217 -74.1370940208435 40.9720087051392 -74.080445766449 40.9833598136902 -74.0716052055359 40.9472250938416 -73.9906239509583 40.9620308876038 -73.9610767364502 41.0296010971069 -73.9398550987244</posList>     </LinearRing>     </exterior>     </Polygon>     </DriveTime>     </Polygons>


Can't remove the little islands when creating a svg map with kartograph.py

I'm new to python and to kartograph. I'm using it to create a map of France, Italy, Portugal and Spain. But I don't want the little islands (mainly the French ones ), causing the generation of a big useless map, for me. I used a python script to create my map ( thanks to rmbianchi ):               # file: makeMap.py     from kartograph import Kartograph     K = Kartograph()          def myfilter(record):         return record['iso_a3'] in ["FRA","ITA","ESP","PRT"]               config = {         "layers": {             "FTC": {                 "src": "ne_50m_admin_0_countries.shp",                 "filter": myfilter,                 "attributes": {"iso_a3":"iso_a3", "name":"name", "id":"iso_a3"},             "bounds": {         "mode": "polygons",         "data": {             "layer": "FTC",             "filter": {                 "filter": ["ISO_A3", "in", ["FRA", "ITA", "ESP", "PRT"]]             },             "min-area": 0.50         }     }             }         },      }          K.generate(config, outfile='ftc.svg')      But, little islands are still displayed, how can I avoid that ? Thanks in advance, if I forgot to give some informations, don't hesitate to ask ! Regards.


How to calculate/record attachments' file names using Field Calculator?

I have a point feature class containing attachments corresponding to jpg files (sometime more than one jpg per feature). I would like to use the "field calculator" to calculate/record a new field that would contain file paths or names of attachment files. Does someone know how to do that? I am new to Python and VB script...


British National Grid to KML results in offset polygons

I have a shape file of English wards from ONS. It is similar to the files available here: http://www.ons.gov.uk/ons/guide- method/geography/products/census/spatial/2011/index.html except I had to explicitly ask them for ward shapes, for which they have just released census data. They sent me a shapefile, and I would like a KML. The shapfile lines up perfectly (I use MapWindowGIS to view it) with The other shape files in that set, suggesting there is nothing wrong with the coordinates of this one file. When I convert it to KML, all the coordinates are offset. I use Google Earth to view it, and it does not line up with the other KML files (for example MSOA). In both cases I am looking at the clipped to the coastline versions. I am specifically looking at Lambeth, and I can see that the border does not line up with the Thames and is in land too far east and and possibly a bit too far south. To convert from shapefile to kml I have tried postgis, a Shape2Earth plugin for map window GIS and an appplication called shp2kml. In all cases I get the same result. I have tried converting the Shapefile from BNG to WGS84 then converting that to KML. I also tried converting to ETRS89, and then to WGS84 as suggested in one of the answers here: Converting from British National Grid (27700) to WGS84 (4326) to Web Mercator (102100) My prj file looks like this:               PROJCS["British_National_Grid",     GEOGCS["GCS_OSGB_1936",         DATUM["D_OSGB_1936",             SPHEROID["Airy_1830",6377563.396,299.3249646]         ],         PRIMEM["Greenwich",0.0],         UNIT["Degree",0.0174532925199433]     ],     PROJECTION["Transverse_Mercator"],     PARAMETER["False_Easting",400000.0],     PARAMETER["False_Northing",-100000.0],     PARAMETER["Central_Meridian",-2.0],     PARAMETER["Scale_Factor",0.999601272],     PARAMETER["Latitude_Of_Origin",49.0],     UNIT["Meter",1.0]     ]      Any idea what I am doing wrong?


Clip for each feature

I want to clip a polyline feature class by a polygon feature class (buffers created from points). Several polygons overlap, so I want to get each polygon feature clipped with each polyline feature. Using the Clip_analysis tool, I get the orange lines: ![enter image description here](http://i.stack.imgur.com/Nh9g5.png) whereas I want the following red lines: ![enter image description here](http://i.stack.imgur.com/7jxe9.png) In a python script, I tried the following code to clip every polyline with each polygon:                       temp = arcpy.ValidateTableName("clip_temp")         bufferCursor = arcpy.SearchCursor(buffer)         n = 0         for pRow in bufferCursor:             arcpy.AddMessage(n)             feat = pRow.Shape             arcpy.Clip_analysis(inputPolylineLayer, feat, temp, "#")             if n == 0:                 arcpy.Copy_management(temp, clip)             else:                 arcpy.Append_management(temp, clip)             n=n+1      But the execution is very very slow and it crashes before finishing. I also tried the Intersect_analysis tool but I didn't get the right geometries: ![enter image description here](http://i.stack.imgur.com/ohJnD.png) Do you have any idea of a better methods to do it?


Reprojecting raster data from a rotated pole grid

I have some raster data (ASCII grid files) that use a custom rotated-pole projection, that I'd like to reproject into something more useful, such as lon/lat WGS84. A description of the grid projection is here, but I can't see how I can use this to create a projection string for use in GIS. http://ukclimateprojections- ui.defra.gov.uk/ui/docs/grids/prob_land_25km_rotated/index.php This SE question seems to discuss using rotated pole data, but I can't work out how to apply it to my problem: Lon/lat transformation I found a thread here asking exactly same question (about the same dataset), but with no replies: http://lists.osgeo.org/pipermail/gdal- dev/2011-March/028174.html The header of the ASCII grid data looks like this:               ncols 39     nrows 52     xllcorner -0.50     yllcorner -0.50     cellsize 1.00


Make two layers editable in leaflet draw

I use Leaflet draw to draw markers and polygons on a map. The created features are saved to two separate feature groups. One feature group for the markers and one for the polygons. Now I want to edit the features. How can I add two feature groups as editable layers:               'edit': {       'featureGroup': featureGroupMarker, featureGroupPolygon     }


Problem when executing Dissolve method in ArcEngine

I'm always having a problem in GP.execute() when trying to execute this method. Here is my code:                Friend Function DissolveFeatures(ByVal pInFLayer As ESRI.ArcGIS.Carto.IFeatureLayer, ByVal DissolveField As String, ByVal OutName As String) As ESRI.ArcGIS.Carto.IFeatureLayer                      Dim GP As New ESRI.ArcGIS.Geoprocessor.Geoprocessor                 Dim Dissolve As ESRI.ArcGIS.DataManagementTools.Dissolve = New ESRI.ArcGIS.DataManagementTools.Dissolve                 Dim pFLayer As ESRI.ArcGIS.Carto.IFeatureLayer = New ESRI.ArcGIS.Carto.FeatureLayer                      Try                     GP.AddOutputsToMap = True                     GP.OverwriteOutput = True                     GP.SetEnvironmentValue("workspace", "Database Connections\IFE connexion.sde")                          Dissolve.in_features = pInFLayer                     Dissolve.dissolve_field = DissolveField                     Dissolve.out_feature_class = "Database Connections\IFE connexion.sde\" & OutName                          RunTool(GP, Dissolve, Nothing)                               pFLayer.FeatureClass = CType(GP.Open(OutName), IFeatureClass)                     pFLayer.Name = pFLayer.FeatureClass.AliasName                      Catch ex As Exception                     MsgBox(ex.Message & "Dissolve Features")                 End Try                      Return pFLayer                  End Function               Private Shared Sub RunTool(ByVal geoprocessor As ESRI.ArcGIS.Geoprocessor.Geoprocessor, ByVal process As IGPProcess, ByVal TC As ITrackCancel)                  ' Set the overwrite output option to true             geoprocessor.OverwriteOutput = True                  Try                 geoprocessor.Execute(process, Nothing)                 ReturnMessages(geoprocessor)                  Catch err As Exception                 Console.WriteLine(err.Message)                 ReturnMessages(geoprocessor)             End Try         End Sub                        ' Function for returning the tool messages.         Private Shared Sub ReturnMessages(ByVal gp As ESRI.ArcGIS.Geoprocessor.Geoprocessor)             ' Print out the messages from tool executions             Dim Count As Integer             If gp.MessageCount > 0 Then                 For Count = 0 To gp.MessageCount - 1                     Console.WriteLine(gp.GetMessage(Count))                 Next             End If         End Sub      This returns an error: `Error HRESULT E_FAIL has been returned from a call to a COM component` Please help.


Problems closing dbf-table edited with ArcObjects

To change values and add new values to a dbf-file, I connect to the dbf and use the ITable interface to make the edits. At the end I release the COM- objects of the table and the workspace. But when I try to open the changed file, it says the file is read-only. Did I forget to release something else? Or is there another reason for the read-only status? Thanks and regards Fab


How to update/delete data from a datagridview?

I wanna be able to update/delete data from a datagridview, and when I do that of course the data in my PostgreSQL database should be edited too. So I've thought about giving the user the ability to select a layer, choose an attribute, choose a logical operator (=, < or >) and then type the criteria he wants for his search. So for example he could make a search like this one : > Layer : Activity > > Attributes : Id > > Logical Operator : = > > Criteria : 15 And when he clicks on Search, the result should display on the datagridview The thing here is, if I want to update a row or a number of rows, how can I be able to do that? Same thing for deleting? Is it possible to edit data in the datagridview and then I don't know do like an update button and save the changes accordingly but how am I gonna do that ? # **EDIT** So now I have this idea : I have two forms : > **Form 1 : Activity** contains : > >>   * the datagridview linked to PostgreSQL database (and the DB is linked to ArcCatalog) >>   * a button named Update on which I can click and show the Form2 where I can edit my data (I pass the values from the datagrid view to my textboxes fields in Form2) >>   * a button named Delete on which I can click and delete the IFeature. >> > > **Form 2 : UpdateActivity** contains : > >>   * the fields of the selected Ifeature, with the values already passed >>   * A Validate button on which I can click and update the data after I finish editing, also the form should close and then I see the updated data in the datagridview in form 1 >> >>> **P.S** : How can I call the datagridview in the second form? >>> Here's some code : On Activity Form:               // This is the Update button that pop up the Form2, and it's where I pass the values     private void btnUpdate_Click(object sender, EventArgs e)         {             updf = new UpdateForm();                  //Loading data from datagridview to UpdateForm             updf.txtIdActivity.Text = this.TableAttributaire.CurrentRow.Cells[0].Value.ToString();             updf.txtNameActivity.Text = this.TableAttributaire.CurrentRow.Cells[1].Value.ToString();             updf.txtAddressActivity.Text = this.TableAttributaire.CurrentRow.Cells[2].Value.ToString();             //Update Data             updf.ShowDialog();               }      On Activity Form:               //Clicking on this button should I create another form like I did with the update ?     //Or just delete straight from the datagridview with a messagebox?     private void btnDelete_Click(object sender, EventArgs e)         {             //Haven't done it yet?         }      On UpdateActivity Form:               //This is the validate click button on which I can click and save and update the data     private void Validate_Click(object sender, EventArgs e)         {             IFeatureClass pFeatClass;             IQueryFilter pQF = new QueryFilter();             // assume pFeatClass is an IFeatureClass object             // and pQF is a queryfilter that allows to select the features in question.             IFeatureCursor pCur = pFeatClass.Update(pQF, true);              IFeature pFt = pCur.NextFeature();             pFt.set_Value(indx, pValue); // I don't know what to do here ??             pCur.UpdateFeature(pFt);       //But where is the datagridview in all this? How can I call it in this second form and update tha data ?     //Also like I said before I should be able to close this form after I validate and refresh the datagridview in Activity Form         }      **Updating/Deleting from the map** : > How can I select an object on my map in Activity Form, and display the > Update Form accordingly and be able to edit the data? Same thing for > deleting?


Calculating Map Resolution Without Pre-Defined Scale Levels

I am trying to determine the formula necessary to calculate map resolution (change in lat,long per screen unit). I am interested in only WGS84 coordinate space. Every formula I have found thus far seems dependent on a map that has predefined zoom levels, i.e. a tiled map. For example, the common formula I find is: Map resolution = 156543.04 meters/pixel * cos(latitude) / (2 ^ zoomlevel) How can I adjust this formula for a map without zoom levels?


ArcGIS 10 Add-In compile problem - Why are new edits to code igonred by ArcMap?

I've been compiling and debugging my Add-In (a toolbar with a few menus, custom commands, custom selection tool and a context shortcut menu) with no issues until **suddenly** the edits and changes I do in Visual Studio are reflected in the Add-In. There are no errors and compile success. I first noticed this when I was wanting to debug but application was ignoring new edits and additions. The Add-In is still there but some commands don't seem to not respond to current changes. What am I doing wrong?


Geoserver 2.4.0 via the web admin interface, not adding layers in Internet Explorer, but working in Firefox

For some reason I cannot seem to add layers via Internet Explorer, but I can via Firefox 23. In addition the styles that I upload also appear broken in Internet Explorer 8, but do not in Firefox. Is there any sort of modification to enable it to work in any browser?


Statistics to shades in a world map

Is there any API or web service to create statistical world maps where the values are different shades of a colour? Something like http://www.visualizingeconomics.com/wp-content/uploads/sachs- gdpdensity.png


Compiling a list of units that border each other

I have a shapefile of U.S. counties. I am interested in compiling a list of those that border each other. In particular, I am interested in those that border each other but are in different states. For example, I am interested in knowing that Rabun County borders counties in North Carolina and which ones and not the counties in Georgia that it may also border. I work with ArcGIS 10.1 and use ArcMap. I see that there is a feature called Polygon Neighbors. However, I don't fully understand how to use it. I'm not sure what to put into the "Input Features" or how to proceed from here. I would very much appreciate any help!


How can I change the CSS style of the geoserver rendered map produced when I click on "Open Layer "Tab under "Common format"?

I have tried many times with left no stone unturned, but all efforts came in vain. I might be of less knowledge in this area. Then through surfing I found this site as a newbie. I will be very obliged if I get a solution to the below mentioned scenarios. In GeoServer when I click on "layer preview" button then "Open Layer" for preview, rendered map aligns to the left. I need to align center and give some CSS style and others to the rendered page as below.   1. Left side panel for navigational purpose through layers made from PostGIS data.   2. Middle side is intended map.   3. Right side is for showing some attribute table for the left panel chosen layer ![enter image description here](http://i.stack.imgur.com/LuTA3.jpg) How can I do these?


Wavelet vs Discrete compression for imagery

What is the main reasons to choose wavelet (jp2, sid, ecw) instead of discrete (JPEG) compression methods for raster data? Lets limit this question to aerial imagery and lossy compression. Why should we give preference to wavelet compression instead of "classic" JPEG? It will give smaller size but may be there any drawbacks, what do you think? Will it lead to more CPU processing for decomression (during viewing)?


Difference between Albedo and Surface Reflectance

Can anyone tell me what is the difference between Albedo and surface reflectance? I know for sure that they are not the same. Any links / comments are most welcome. Thanks GBh


qgis: module crashed or killed

using Grass 6.4.3. via Qgis 2.2.0 Valmiera (standard installation package): Why would Grass modules suddenly produce a "module cashed or killed" error. specifically in relation to r.surf.idw2 and r.surf.contour (i havent managed to go further into the workflow) (it was fine a few hours ago)


Calculated distance doesn't match Google Earth

I have a google earth route that measures 190.1km in Google Earth. I then pulled down the .kml file, extracted the points and measured them using Vincenty's formula (ellipsoid earth) and got 190.2. BUT, if I measure the SAME points along the SAME route to a different distance along that route, I'm way off. Sometimes as much as 2km. For example, If I want to know the lat and lon of the point closest to 100km, I measure the distance between all the points along the route until the measurement is as close to 100km as it's going to get. When I compare that point to the route in Google Earth, it's around 98km. Any ideas of why this is the case?


How to create atlas along line/route in QGIS

I'd like to create a mapbook along a given route that is designated by a single linear feature. Is it possible to have QGIS (2.2) automaptically compose a series of pdfs that over lap by a given percent and rotate the map to optimize space? Thanks.


Is there a way to force ArcCatalog to use a specific tessellation scheme for a SQL Server spatial index?

If I Recalculate a spatial index from ArcCatalog, the tessellation scheme is always set to "Geometry Grid". Even when the previous index was Geometry auto grid. ArcCatalog always changes it back. Is there a way to specify the tessellation from ArcCatalog? Alternatively, can SQL Server default to a specific tessellation scheme? _Microsoft SQL Server 2012 - 11.0.2100.60 (X64)   ArcGIS Desktop 10.1 SP1_


Using GDAL to read dted files

How do I get the elevation at a certain point using gdal to read in a dted file? I don't see much useful information out on the web. I'm sorry I should have been more specific. How would I accomplish this in python?


What causes ModelBuilder error occurred in script on this page MdDlgContent.htm?

I've been creating a model in Arc 10.0 for a few days now without problems. Then I added the Calculate Field Tool. I selected Make Variable --> From Parameter --> Expression. When I check off "Model Parameter" on the expression variable once it's been added to the model, save and close the model, then try to open it in Toolbox, I receive two popup errors, both saying "An error has occurred in the script on this page." The first error says Error: Expected ')' in Line 79 Character 70 (Code 0): ![enter image description here](http://i.stack.imgur.com/BSFW5.jpg) The second says The value of the property 'IntForm' is null or undefined, not a Function object in Line 465 Character 1 (Code 0): ![enter image description here](http://i.stack.imgur.com/Aey0I.jpg) Both messages are referencing the following URL: file:///C:/Users/MYUSERNAME/AppData/Roaming/ESRI/Desktop10.0/ArcToolbox/Dlg/MdDlgContent.htm. I located this article in ESRI support and followed the instructions, to no avail. (It must not be the exact same issue, as my message box doesn't reference Internet Explorer in the title). I also tried downloading SP5. I opened the MdDlgContent.htm to take a look but that wasn't much help either because, despite some familiarity with Python and JavaScript, I am hardly a programmer. Any help troubleshooting or resolving this issue would be greatly appreciated!! I posted this same question in the ESRI Forums as well: http://forums.arcgis.com/threads/79448-Model-Builder-An-error-has-occurred-in- the-script-on-this-page.-MdDlgContent.htm


Having problems creating VRT in QGIS from png files

This is similar to a question asked by someone else, re OS tiles, however, there is a difference! I am a bit of a amateur in GIS and python, but if I take it slow I can usually just about work it out! This one though: I have a large amount(over 10k) of geo-refd png files which I have mosaicked in Arc, but also want to be able to access them in other programs such as QGIS over the web and within a private network using Geoserver - so I have tried creating VRT's with them, and sometimes it works, but sometimes it doesn't: it seems that on selecting over 200-odd png's, the vrt stops being created: is there a limit on the amount of rasters for a VRT, or can some-one give me some help please!! This is so frustrating ;o) The error message is: " **The process failed to start. Either the invoked program is missing, or you may have insufficient permissions to invoke the program.** " and the code is:                   gdalbuildvrt -allow_projection_difference          "F:/Historic Buildings/GIS/Data/Mapping/Landranger/Raster/15k/Data/SX/SX.vrt"          "F:/Historic Buildings/GIS/Data/Mapping/Landranger/Raster/15k/Data/SX/1.png"          "F:/Historic Buildings/GIS/Data/Mapping/Landranger/Raster/15k/Data/SX/2.png"          "F:/Historic Buildings/GIS/Data/Mapping/Landranger/Raster/15k/Data/SX/3.png"          "F:/Historic Buildings/GIS/Data/Mapping/Landranger/Raster/15k/Data/SX/4.png"          "F:/Historic Buildings/GIS/Data/Mapping/Landranger/Raster/15k/Data/SX/5.png"          "F:/Historic Buildings/GIS/Data/Mapping/Landranger/Raster/15k/Data/SX/6.png"          "F:/Historic Buildings/GIS/Data/Mapping/Landranger/Raster/15k/Data/SX/7.png"      with an additional +200 similarly addressed png's I am using QGIS 1.8.0 Lisboa, on W7 64bit Any help would be gratefully received


OpenLayers - vector boxes and paths

I'm using OpenLayers to make warehouse map. How to prevent drawing lines (paths) over some vector objects already on the map?


Arctoolbox and python

I am trying to use arctoolbox and python so that the user can enter in parameters. In my script I have the following lines               _StationInterval = arcpy.GetParameterAsText(0)      I just want the user to be able to enter in a value for the station interval. However I get the error:               <type 'exceptions.NameError'>: name '_StationInterval' is not defined     Failed to execute (Final3Test).      Before I used arctoolbox, I had the station interval set to a value in the script, i.e. _StationInterval = 10000 Am I missing something in my script??


How to move an existing line to a parallel offset of another existing polyline

I'm currently trying to modify an existing line to be offset x distance from another existing polyline, is there any tool/addon that does that? I currently use Copy Parallel and create a dummy line that I move/snap my line to. I was just wondering if there was any way to directly specify that I want an existing line to be offset parallel from another line x units.


OGR CreateLayer returns TypeError

I'm trying to create a shapefile layer based on the spatial projection of an already existing raster. (Ultimately, this will be used in gdal.Polygonize to get a shape from my raster data.) However, I am encountering an error when trying to use CreateLayer.   * raster_uri- location of the raster file that I want to make into a shapefile. I know this exists.   * out_uri- Location I want the new shapefile to print to.   * layer_name- String layer name input.   * filed_name- String field name input. This is the code that I was using.               raster = gdal.Open(raster_uri)     driver = ogr.GetDriverByName("ESRI Shapefile")     ds = driver.CreateDataSource(out_uri)          spat_ref = osr.SpatialReference()     proj = raster.GetProjectionRef()     spat_ref.InportFromWkt(proj)          layer = ds.CreateLayer(layer_name, spat_ref, ogr.wkbPolygon)      It yields this error message:               TypeError: in method 'DataSource_CreateLayer', argument 2 of type 'char const *'      Outputing the type of spat_ref shows up as `<class 'osgeo.osr.SpatialReference'>` so I'm unsure what char const * it's complaining about. Interestingly, if I try to do this all from a python shell using the same file, layer creates just fine. Any ideas on what might be the issue?


A WMS layer fails to show at some scales

I am tring to overlay my WMS layer on Google but at a particular scale it doesn't show the data of my layer. What can be the problem?               <html xmlns="http://www.w3.org/1999/xhtml">     <head id="Head1" runat="server">         <title>Untitled Page</title>         <script type="text/javascript" src="http://maps.google.com/maps/api/js?v=2&sensor=false"></script>         <script type="text/javascript" src="http://openlayers.org/api/OpenLayers.js"></script>         <script type="text/javascript">             var map;             function init() {                 map = new OpenLayers.Map('map', { allOverlays: true });                 map.addControl(new OpenLayers.Control.LayerSwitcher());                 var gmap = new OpenLayers.Layer.Google("Google Streets");                 var wms = new OpenLayers.Layer.WMS("OpenLayers WMS", "http://localhost:5555/geoserver/cite/wms",                 {                     layers: 'cite:view_test',                     transparent: true,                     projection: "EPSG:4326"                 });                 map.addLayers([gmap, wms]);                 map.zoomToMaxExtent();              }     </script>     </head>     <body onload='init();'>         <div id='map' style='width: 500px; height: 500px; background-color:Gray'>     </div>     </body>     </html>      I am new to Openlayers: can anyone help me?


How to store and serve the time a GeoTIFF refers to

I'm writing software that creates temperature maps as GeoTIFF files. I need to store the time to which the GeoTIFF file refers; not the raster creation time, but the time during which the temperature was as the raster data says. What I did was store it in the GeoTIFF file as a GDAL metadata item; i.e. in a GDALMetadata private tag. The metadata item is called "TIMESTAMP". I now need to serve the GeoTIFF file as a WCS with MapServer.   1. Is storing the time as a GDAL metadata item a good idea? Is it standard practice?   2. How is this going to be accessed with WCS? Through `DescribeCoverage`?   3. How can MapServer be told to get the metadata item from the GeoTIFF and somehow serve it to the client?


Custom marker/icon based on attribute data in leaflet/geojson

I would like to add different icons to my leaflet map based on attribute data. My layer is a geojson layer, it is coming from geoserver with jsnop. I can see my data with the default marker, but when I try to change the code to add custom style I get this error: > Cannot read property 'labelAnchor' of undefined It would be great if I can get some help.               var WFSLayer = null;     var ajax = $.ajax({         url : URL,         dataType : 'jsonp',         jsonpCallback : 'getJson',         success : function (response) {            WFSLayer = L.geoJson(response, {                     pointToLayer: function(feature, latlng) {                         var smallIcon = L.Icon.extend({                             options: {                                 iconSize: [27, 27],                                  iconAnchor: [13, 27],                                  popupAnchor:  [1, -24],                                 iconUrl: 'leaflet/icons/' + feature.properties.pcp + '.png'                             }                         });                         var myIcon = new smallIcon();                         return L.marker(latlng, {icon: smallIcon});                     },                 onEachFeature: function (feature, layer) {                     popupOptions = {maxWidth: 600};                     layer.bindLabel('
'+feature.properties.musno+'
');                     //sidebar.setContent('
'+feature.properties.musno+'

'+'
'+feature.properties.exchange_name+'

'+feature.properties.pcp, popupOptions);                     layer.bindPopup('
'+feature.properties.musno+'

'+'
'+feature.properties.exchange_name+'

'+feature.properties.pcp                         ,popupOptions);                 }             }).addTo(markers.addTo(map));         }     });


Calculating the distance between points and multiple lines

I have a point shapefile of about 100 points and a polyline shapefile of about 200 lines and I am interested in finding the distance between every point and each individual polyline. My polyline shapefile represents individual fault lines in a region. So for each polyline (or fault line) I want to calculate the distance to each of my points. I know that I can calculate the distance between the points and the closest polyline to each point but I'm not sure how to go about calculating the distance between my points and each individual line. Any ideas?


Can I tie-in a data collection form with an online map service to crowdsource values for map features?

Apologies if this has been covered before. I've done some research but unfortunately my Google Fu has failed me. I want to be able to collect some simple numeric data from multiple people over the web. I have a 10 x 10 grid of polygons (covering a total of 25 Hectares) and each value that I collect should pertain to one of the 100 cells within that grid. Example of the grid: ![](http://i.stack.imgur.com/v3C5U.jpg) I've managed to work around doing this in the past as I've only had four features over a similar area. All I did then was to export the features as a KML and import them into Google Maps Engine. I then ran a Google maps iframe alongside a google forms iframe and used a simple labelling system to refer the Google form questions to the map. Example: ![](http://i.stack.imgur.com/V02zs.jpg) Of course doing this for 100 features in place of 4 could become a little unwieldy. My question therefore, is whether anyone is aware of a relatively straightforward means of acquiring feature specific data from multiple people?


Populating a Value List in one Parameter, from Values Derived from a Second Parameter, Python

Using the Validator in the ArcGIS 10.1 tool GUI, can I loop through and List feature classes from a workspace type parameter (ie a file geodatabase) and then go on and list the values of a field in a feature class from that list? I'm trying to do this:               if self.params[0].value and arcpy.Exists(self.params[0].value):         for fc in arcpy.ListFeatureClasses(self.params[0].value):           if fc == "TestFC":             value_set = set(row.getValue("SITE")                           for row in arcpy.SearchCursor(str(self.params[0].value)))             self.params[1].filter.list = sorted(value_set)      where `param[0]` is a workspace type parameter where the user chooses a geodatabase. `param[1]` will be a string type parameter set as a value list. I want to read in a setted value list from all the values in the 'SITE' field so the user can choose which site the tool will further process on. Maybe in other words:   1. User opens tool   2. User chooses a file geodatabase as the first parameter   3. User will then choose a SITE from the list derived from the first parameters testfc feature class, 'SITE' field Thanks, Mike


ArcObjects - find nearest feature to a point - has to be FAST

I've seen lots of discussion on this, especially using **IIndexQuery.NearestFeature()** on a **FeatureIndex** instance. Something like this:               private IdDistancePair FindNearest(IGeometry g, IFeatureClass fc, string where = "")     {     IFeatureIndex fi = new FeatureIndexClass();     fi.FeatureClass = fc;          //you can optionally set a FeatureCursor on the IFeatureIndex      //to reduce the number of features indexed.     //also, limiting subfields may speed up the indexing operation     IQueryFilter qfilter = null;     if (!string.IsNullOrEmpty(where))     {       qfilter = new QueryFilterClass();       qfilter.WhereClause = where;       IFeatureCursor fcursor = fc.Search(qfilter, true);       fi.FeatureCursor = fcursor;     }          //create the index     fi.Index(null, ((IGeoDataset)fc).Extent);          int fid;     double distance;     ((IIndexQuery)fi).NearestFeature(g, out fid, out distance);          return new IdDistancePair(fid, distance);     }      However, it appears that the FeatureIndex is an in-memory thing unrelated to any existing spatial index on the query feature class. It takes a long time (dozens of seconds) to build. (and the above doesn't work for me anyway, always returning a FID of -1 after a 45s wait). I only need to do one query per layer, repeated for ~5 layers. The docs on the FeatureIndex class suggest that the above approach is expensive in such a circumstance. I need this to complete in say 10 seconds or less. I CAN limit the search to a radius, say a few thousand meters. But there are still likely to be thousands of query features inside that radius, so I'd prefer to avoid any brute-force loop/measure the distance solution in favor of one that uses a spatial index, if possible. Any suggestions?


access attributes of one class for use in another class in python add-in

I want to get combobox attribute 'dem' and use it for further processing in class ExtentData. But I am not sure how to get attributes from one class to another for processing in pythonaddin. In following code, I want attribute 'dem' from class ComboBoxFrame right after if statement in class ExtentData. Any suggestion would be appreciative.               import arcpy     import pythonaddins     import wx          class ExtentData(object):     """Implementation for ExtentData_addin.tool (Tool)"""         def __init__(self):             self.enabled = True             self.checked = False             self.cursor = 5             self.shape = 'Rectangle'              def onRectangle(self, rectangle_geometry):         """"""              dlg = None         extent = rectangle_geometry              if extent != None:             self.dlg = ComboBoxFrame()               class ComboBoxFrame(wx.Frame):         def __init__(self):             wx.Frame.__init__(self, None, -1, 'Input Data Selection', size=(350, 300))             self.Bind(wx.EVT_CLOSE, self.OnClose)             panel = wx.Panel(self, -1)                  DemList = ['DEM1', 'DEM2', 'DEM3']             self.Dem = wx.ComboBox(panel, -1, "", (15, 30), wx.DefaultSize,DemList, wx.CB_DROPDOWN)             self.Bind(wx.EVT_COMBOBOX, self.OnSelect, self.Dem)                  self.btnApply = wx.Button(panel, label="Apply", pos=(65, 200))             self.Bind(wx.EVT_BUTTON, self.OnClose, id=self.btnApply.GetId())             self.Show(True)              def OnClose(self, event):             self.Show(False)              def OnSelect(self, event):             dem = str(event.GetValue())          app = wx.PySimpleApp()     app.MainLoop()


How to reference a number variable in r.mapcalc within QGIS graphical modeler

I need to run the following formula in r.mapcalc: (xor(abs(A-B),abs(A-C))>120)*A I would like to however use a user defined number input variable instead of the 120. I already have this variable loaded up in the graphical modeler but Im not sure how to reference it within the formula....


Georeferencing a jpeg in QGIS but the scale is way off

I've gone through the really helpful walk-through(s) of how to georeference a jpeg in order to make it a layer, but after inputting the coordinates (either by typing in actual coordinates or clicking "From map canvas" and aligning points) and loading the new layer, the scale is way off (and I think the jpeg isn't even remotely in the right place--hard to tell because of how off the scale is). Any ideas?


Calculate actual Landsat image corner coordinates to derive azimuth (heading)

This is the continuation of an unsolved problem I had (see this thread if you like). I have a Landsat image and I would like to estimate the satellite azimuth for my location. As the satellite follows a near-polar orbit (see Landsat Handboook), the satellite must have an azimuth angle different than 0°, getting bigger as it moves poleward. If I have the coordinates of the corners of my image, I can estimate how the image is tilted against North direction (estimate the azimuth). So, the idea is:   1. to choose one of the two sides of my image (wether the left or right) to get the angle of the normalized direction (see also How to calculate orientation of line segments using open source GIS?)   2. to use the coordinates of the chosen corners (e.g. lower and upper left, as `a` and `b` variables, see below) in the following MATLAB function (inspired gist.github.com/604912)              function d = line_dir( ax, ay, bx, by )          dx= bx - ax;     dy= by - ay;     m= sqrt((dx^2)+(dy^2));     r= atan2(dx/m, dy/m);     d= (-r*180)/(pi);          if d<0         d=-d     end     end      However, the coordinates of the corners in the metadata file refers to the background image, not the real image (see the figure below to understand), so can I find now the real corners of the image, to then find the azimuth angle? ![enter image description here](http://i.stack.imgur.com/xMsbj.jpg)


ArcObjects SQL Server Connection not recognizing instance

I am trying to make a connection to a SQL Server database with SdeWorkspaceFactory. This is from my Windows 7 x64 Desktop to a Network database. If I use this:               SDEWorkspace = NewObj(esriDataSourcesGDB.SdeWorkspaceFactory, esriGeodatabase.IWorkspaceFactory2)     connectionString = "server=SQLServer;" + \                         "instance=hbffcacqsql01;" + \                         "database=ACQ_HBED_PROD;" + \                         "authentication_mode=OSA"          result = SDEWorkspace.OpenFromString(connectionString, 0)      or this:               connectionProperties = NewObj(esriSystem.PropertySet, esriSystem.IPropertySet)     connectionProperties.SetProperty("SERVER", "SQLServer")     connectionProperties.SetProperty("INSTANCE", "hbffcacqsql01")     connectionProperties.SetProperty("DATABASE", "ACQ_HBED_PROD")     connectionProperties.SetProperty("AUTHENTICATION_MODE", "OSA")          SDEWorkspace = NewObj(esriDataSourcesGDB.SdeWorkspaceFactory, esriGeodatabase.IWorkspaceFactory2)          result = SDEWorkspace.Open(connectionProperties, 0)      I get this error:               Traceback (most recent call last):       File "C:/Users/tstanley/Downloads/ArcMap_Python/FirstTry.py", line 88, in <module>         result = SDEWorkspace.OpenFromString(connectionString, 0)     _ctypes.COMError: (-2147216021, None, (u'Entry for SDE instance not found in services file', u'esriDataSourcesGDB.SqlWorkspace.1', u'esri_csGeoDatabase.hlp', 0, None))      If I leave out the instance parameter, the connection window pops up and if I put the same value into the window, I get a connection. ![enter image description here](http://i.stack.imgur.com/Gcx94.jpg) Can someone tell me what I'm missing? I've read a bunch of other posts of people with this error and they mention replacing the instance with a service number, 5151. It seems that they are trying to connect to an SDE database, which this isn't. I'm really new to ArcObjects so I have just about everything still to learn. Any help is appreciated.


How do I use variables inside a arcpy toolbox function?

I have a point file and I need to make a lot of buffers in specific increments but I can't figure out how to interate through a list inside the buffer function. Here is what I have:               import arcpy       city_pts = "C:\Urban_Land_Project\Cities\WI_cities.shp"     buffer_sizes = [1,2,4,7,10,15,20,30]     for x in buffer_sizes:         arcpy.Buffer_analysis(city_pts, "C:\Urban_Land_Project\City_buffers\WI_city_buffers*km.shp","2 Kilometers" ,"FULL","ROUND","NONE"," #")      I need to have each buffered file to be named "WI_city_buffers*km.shp" with the * being the buffer size. How do I get the arcpy.Buffer_analysis to iterate through my list and apply each buffer distance and proper name?


R plot raster with real colors

I'have a raster image from Scran25 IGN. In Qgis, it opens perfectly but in R (with rgdal or raster packages), I do not know how to keep the original colors like this exemple? ![IGN scan25 from Banyuls](http://i.stack.imgur.com/CcBl7.jpg) I have tried               library('rgdal')     library('raster')          scan25<-readGDAL("./Banyuls/MyCreate/etudehydoAOC/etudehydoAOC/Scan25/vrt_4communes.vrt")     communes<-readOGR(dsn = "./Banyuls//MyCreate/Surface_4communes/",layer = "4communesAOC")          scan25<-raster(scan25)     test<-aggregate(scan25,10,mean)          plot(communes)     plot(test,add=T)      And the result is ![IGN scan25 import in R with bad colors](http://i.stack.imgur.com/Jd7Wh.png)


Erdas grids names to field names in tables renamed when saved

I am trying to use zonal stat on several imagine rasters and save values to a table with several automatically added fields that will have the same name of the corresponding raster, I can do it but my problem is when the name of imagine raster is added to the table as anew field name the .img is converted to _img so the name of the field is no longer the same and calculate field value breaks since it gets the field name from NAME in the iterate raster tool which will have the .img, if i have my input grids in esri grid format it should work but I want to keep it in Erdas format , is there anyway to do that, thanks. raster


Creating model that simulates water flowing down crack, then splitting at 'Y' joint?

Maybe this is a simple problem, but I've been given a task of simulating how water flows in one line, along a crack, and then hits a 'Y' junction, where half the water flows in each of the split directions. I'm having trouble imagining how to do this. I had thought about just creating 2 routes, that diverge at the 'Y' joint. Is there a better way to do this?


Geodjango- get the distance between 2 points

Sorry to be asking yet another geodjango newbie question. What I want to do is quite simple, I have 2 locations defined by gps coords, lat / long like returned by google maps: http://gmaps-samples.googlecode.com/svn/trunk/geocoder/singlegeocode.html I need to calculate the distance between them. I know I could use the google API but I'll be processing bulk queries so I'd rather do it on my own server. I've spent a few hours with the docs, installed geodjango OK, but I can't seem to find an example of this. Everything in the literature is way more complicated than I need. Thanks for any feedback


Implementing OpenLayers3 basemap from tiles created using gdal2tiles

I recenty discovered the gdal2tiles.py tool which is working great with OpenLayers 2.x, but I wanted to use the new release of OL and I'm having some troubles. I have googled for a solution but i did not found a way to go. Here is my code, inspired from the solutions offered here: https://groups.google.com/forum/#!searchin/ol3-dev/TMS/ol3-dev/JLn0lfHvI7w/q7C3O8_b0-UJ (still referring to the dev version of OL3, different it seems to the release).               var tileUrlFunction = function(tileCoord, pixelRatio, projection) {       if (!tileCoord) { return ""; }            var x = tileCoord[1];       var y = tileCoord[2];       var z = tileCoord[0];            if (x < 0 || y < 0) { return "";}            return 'http://localhost/map-tiles/'+ z.toString()+'/'+ x.toString() +'/'+y.toString() +'.png';     }          var layers = [       new ol.layer.Tile({         source: new ol.source.XYZ({           tileUrlFunction: tileUrlFunction         })       })     ];          var map = new ol.Map({       target: 'map',       layers: layers,       renderer: 'canvas',       view: new ol.View({         center: [2900,-3900],         zoom: 3       })     });      I've tried several combinations of the `x`, `y` and `z` assignment without success. Tiles on the browser are completely wrong and or missing. Any help would be much appreciated.


Whitebox is not finding my java

I was recently presented to the software Whitebox GAT 'Iguazu'. Unfortunately, I tried to use it in two different machines: one with Windows 7 (64) + JRE 7 (65) and other with W7 (64) + JRE 7 (67) . In both computers I could not start the program. I tried double click and also open specifying the program path. Nothing happens. Am I doing something wrong?


Save map canvas as image with drawings

Is there any way to save the map canvas as an image, with the drawings on map? I draw a line on map, and saved it as image, but only the map saved(without line). I used the following code.. iface.mapCanvas().saveAsImage('/home/kasun/output_canvas.png', None, 'PNG') Please help me to find a solution to this problem. Thank You


Chloropeth Map in R, Data on map not represented as in listed in the file

Below is the code for creating the Chloropeth Maps, once created, the actual problem is that the heat intensity indicated by the map is not according to the dataset column called **value** mentioned in the **fill** property of the MAP code. I do not understand why that is so! I am attaching the Map for better understanding, the scale is actually not correct and neither the map. Scale and Mapping are opposite to the data. note: This is the link from where i downloaded the shape file zip file (http://www.gadm.org/country)               #Data     1. The Shapefile has all columns such as **lat, long,order,group, id** etc     2. There is a **indiamap csv** file listing state against every id     3. I merged to make a new file (**merge.map**) with some of my values and **indiamap csv**.     4. Finally as the code mentioned I merged **merge.map** and **india.map** to get a final file.               # Reading Shapefile         india.shp<- readShapePoly("IND_adm/IND_adm1.shp")         draw.india<- fortify(india.shp)              #Reading data for the corresponding states.         india.map<-read.csv("indiamap.csv", header = TRUE,sep=",")              #merging the state file with main file with lat and long         indiamap1<-merge(x=merge.map,y=india.map,by="id")              #Sorting the dataframe         indiamap1<-arrange(indiamap1,group,order)              #Creating the MAP         ggplot(indiamap1, aes(x=long, y=lat, group=group)) +                 geom_polygon(aes(fill=value),colour="white") +                 scale_fill_gradient2(low="337", mid="87", high="83",                                      midpoint=median(indiamap1$value)) +                 coord_map("polyconic")      ![enter image description here](http://i.stack.imgur.com/rnTN3.jpg)


Does QGIS attribute edit form support "relationship" data?

Consider I have a geometry table having one-to-many relationship with a no- geometry table. When I create a feature (geometry), I would like to be able to add the relative no-geometry table data in the corresponding feature attribute edit form as well. Is this possible?


OpenLayers: WMSGetFeatureInfo shouldn't return feature when a layer is hidden

In OpenLayers, I have a map with several layers. I created a control to query the layers and return feature info.                var info= new OpenLayers.Control.WMSGetFeatureInfo({          url:'http://onesharedocean.org/geoserver/ocean/wms',          title:'select polygon',          output:'features',          infoFormat:'application/vnd.ogc.gml',          format: new OpenLayers.Format.GML,          eventListeners: {             getfeatureinfo: function(event) {                console.log(event);                if (typeof(event.features[0])=='undefined'){                   console.log('nada');                   return;                };             roiName=event.features[0].attributes.name;             if (typeof(roiName)=='undefined') {roiName=event.features[0].attributes.Name}             thisPolygon=event.features[0].gml.featureType;             document.getElementById('infoblock').innerHTML='fid: '+thisPolygon+'  Selection: '+roiName;          }          }       });      Is there an option to say that I don't want any information to be returned if the user set the layer visibility to off (from the layerSwitcher), or should I query the layerSwitcher and check if the corresponding layer is off or on (and how can I do that)?


how can we convert vector data to raster data in geotools

In my project iam able to open and save shape file. I want to convert this vector data to image format as a tiffimage plese help me the procedure to do the same.


Accuracy problems with Openlayers\Openstreetmap\AnimatedCluster

I am working on a OSM map that clusters several points with a modification of AnimatedCluster (https://github.com/acanimal/AnimatedCluster). However, somewhere the accuracy seems to lack. Can someone help me figure out at which point it might go wrong? The image below displays how a cluster ends up in the middle of the sea, as well as the cluster's longitude/latitude coordinates. The points are still in the sea when I zoom in ![Wrong clusters and their coordinates](http://i.stack.imgur.com/9Fup9.jpg) The code I used to display them goes as follows:               var coor=clusters[i].geometry.getBounds().getCenterLonLat().transform(map.getProjectionObject(),fromProjection);     coords = coords +coor.lat+","+coor.lon +"; ";      If I type in the coordinates manually into Google Maps or Openstreetmap, none of the coordinates are in the sea. However, they are all in different places using Google and OSM. Could it be OSM and/or Google can't handle more than 1-2 decimal places? Or could it be an issue with the AnimatedCluster? I couldn't find anything while debugging there. Parsing between geometry and long/lat seems to cause inaccuracy (the original latitude was 21) on the 13th decimal place, but that should not be visible on the map. This is the code for adding the features:               map = new OpenLayers.Map('geoMap');     osm = new OpenLayers.Layer.OSM();     map.addLayer(osm);          vector = new OpenLayers.Layer.Vector("Features", {     renderers: ['Canvas','SVG'],     strategies: [         new OpenLayers.Strategy.AnimatedCluster({             distance: 50,             animationMethod: OpenLayers.Easing.Expo.easeOut,             animationDuration: 10,             clusterType: clustertype         })         ],         styleMap:  new OpenLayers.StyleMap(style)     });          map.addLayer(vector);          for (var i = 0; i < dataselect.length; i++) {     var lon = dataselect[i][5];     var lat = dataselect[i][6];     lon = Math.round(lon * 100000) / 100000;     lat = Math.round(lat * 100000) / 100000;     var select = getRandomArbitary (0, 4)        var lonlat = new OpenLayers.Geometry.Point(lon,lat);     lonlat.transform(fromProjection, map.getProjectionObject());          var f = new OpenLayers.Feature.Vector(lonlat, null, null);     features.push(f);        }     vector.addFeatures(features);      I'd appreciate any help whatsoever :)


ST_Intersects incorrectly returning false in PostGIS

I have a shapefile created from ArcMap that contains about 400 geometry's. I've added this shapefile into PostGIS using the shp2pgsql tool. I am trying to use the ST_Intersects function to determine if a given point, using Lat and Long, is within one of the 400 geometry's. I have a point that I know to be within one of the shapes, but ST_Intersects is returning false for this. The record where cocnum equals "MA-500" contains the point Lat: 42.3581, Long: -71.0636.                                   SELECT                              cocname,                             cocnum,                              geom,                                        st_intersects(geom, point(-71.0636,42.3581)::geometry)                         FROM                              public.coc                         WHERE cocnum like 'MA-500'      However, I get the following result: ![Query Result](http://i.stack.imgur.com/nAR7J.png) When I create a KML of the geometry using `st_asKml(geom)` and then insert that into google maps, along with the point `google.maps.LatLng(42.3581, -71.0636)` I get the following result: ![map](http://i.stack.imgur.com/iIOf8.png) Any ideas on why ST_Intersects is returning false for this? Any guidance given is greatly appreciated, Thanks! Ed


How to extract pixel value counts from a raster in QGIS?

How does one go about obtaining a summary of the counts of cell values within a raster in QGIS? I know QGIS is doing this, in order to provide the summary statistics and histogram in the properties of the layer. I do not need the summary statistics nor a histogram image, but rather counts of individual values. It looks like there was at one point an attempt to add a special feature for this (Feature #4321, http://hub.qgis.org/issues/4321). Am I missing something really obvious?


Shapefile for India which includes Telangana (state)?

I need a shapefile for **India** which is up-to-date to display the regional borders. By up-to-date, I mean that it **includes Telangana** as a state. Many shapefiles that I downloaded do not have Telangana as a state as it was partitioned a month ago, it is displayed as part of Andhrapradesh. So I need the latest shapefile.


Converting shapefile to KML using JavaScript or PHP?

My client needs to generate maps from shapefiles. Through my initial search, I came to know that we need to convert shapefiles to .kml then we can generate maps from google maps. So I searched for a script but could not find anywhere regarding that. So please help me with this problem. I am new to this, tell me am I going in right way? One more thing, can we generate shapefile lines on a jpg image on the right place if I take an image of a state?


Sending e-mail on feature update in ArcGIS JavaScript application?

We have an ArcGIS feature service that users can edit to change a "project status" attribute. An example would be a change from "pending" to "in- progress". Certain groups need to be notified when that attributes new value impacts them. For instance, a change to "in-progress" would let accounting know that charges may start coming in to the job. I'd like to e-mail the appropriate parties using the user's default email client but I'm not sure how to handle the attribute change event. I am new to the JavaScript API and at this point any information will be useful. I've investigated the ArcGIS JavaScript API guide related to event handling but would benefit from a more specific example. If my question needs clarification please let me know.


Postgres geometry in a pdf file with php

Is there a way to draw a postgres geometry in a pdf file using a php script? Thank you.


How to implement a spatial query on polygon data for a specific point?

I have vector data fed into a database which returns a report at province level upon querying. This is implemented in a web tool. I want to add an extra functionality at point level, where I can input lat/lon and run a spatial query to calculate some attribute, say _distance to coast_ , based on that point. Let us assume I have data which contains the distance from centroid of the province. Please suggest me an open source approach to implement this. How feasible would it be to divide the province into grids and dynamically take up the values?