Overlaid raster gets shifted around when printing to pdf or when resizing graphics device with mouse

I've spent the past couple of days learning how to use the `maps`, `raster`, and `rgdal` packages to create nice images, but I'm running into trouble when trying to make pdf's for actually presenting. I'm overlaying two rasters -- one has my data and the other is a mask. The problem is that the mask moves around depending on the size of the output pdf, AND also with simple resizings of the graphcis device. I've made a little minimal example here:               library(raster)     library(maps)     library(mapdata)     library(rgdal)     lat = seq(from=36,to=40,by = .01)     lon = seq(from=-121,to=-117,by = .01)     d = expand.grid(lon,lat)     colnames(d) = c('lon','lat')     d$z = sin(d$lat)-cos(d$lon)+rnorm(nrow(d))     head(d)     coordinates(d)=~lon+lat     gridded(d)= TRUE     r = raster(d)     dd = expand.grid(lon[lon<120],lat[lat<37])     colnames(dd) = c('lon','lat')     dd$z = 1     coordinates(dd)=~lon+lat     gridded(dd)= TRUE     rr = raster(dd)     map('usa',xlim=c(-123,-116),ylim=c(35,41))     plot(r,add=TRUE)     plot(rr,add=TRUE,col="black",legend = F)     dev.copy2pdf(file = "example.pdf",height=8,width=8)      Here is the output when first rendered on my screen: ![enter image description here](http://i.stack.imgur.com/r63PQ.png) And here is the output when I resize the window! ![enter image description here](http://i.stack.imgur.com/qsd69.png) and the example PDF is different again! (Unfortunately SE doesn't seem to support pdf images, but if you run the code you can see it on your own machine) Any idea how to work around this behavior? Thanks!


Which interfaces/classes do I use to access the highlighted rows in an ArcMap attribute table?

I've tried to use various interfaces to access SelectionSet of table windows/tables but all I get back is the selected records (cyan). I want the highlighted rows/features (yellow). I would like to 1) programmatically specify the highlighted row/feature and 2) programmatically access the highlighted rows(s). I saw some old examples on the old Esri forums where the yellow feature was manually being drawn on the map, but surely there's a way to access in ArcGIS 10?


(Smooth) Isoline Extraction from TIN - Algorithms

Can anyone point me to a clear document or algorithm for extracting smooth isolines from a Triangular Irregular Network? I've seen some examples using the jagged linear methods, but can't seem to find good documentation on how to do the process using a smoother method like Natural Neighbor / Radial Basis / Quadric / etc... Thanks!


ArcGIS Surface Length Tool equivalent in FME

I am trying to calculate the 3D length of a line. I currently have a rather complex and cumbersome model built in ArcGIS Model Builder that uses a tool called "Surface Length". I was wondering if there is an equivalent tool in FME? Ultimately I want to calculate the 3D length of a shapefile. I have DEM data for the same area. Thanks!


If a shapefile with geometry esriGeometryPoint is valid is it guaranteed to have a non null featureclass?

I have been given a point shapefile but it's feature class is null. I haven't seen this before so I'm wondering if the data is bad or if it's something I need to handle with code.               //I was using this to determine if my layer was a point layer, but it's FeatureClass is null     public void isPointsLayer(ILayer layer)     {     IFeatureLayer fl = layer as IFeatureLayer;     if (fl == null && fl.FeatureClass == null) return false;      esriGeometryType type = fl.FeatureClass.ShapeType;     if (type == esriGeometryType.esriGeometryPoint) return true;     }      * * * edit: I guess ILayer.Valid returned false, thanks for the answers.


Very Inaccurate Geocodes in Canada (Quebec)

_Edit_ : Found this page detailing the standard geocoding abbreviation types which may be of use when trying to match foreign street types. It appears that we'll have to create a much more robust version. The problem is as listed in the title: Our current geocoding attempts (using a proprietary list of addressed and a proprietary streets network) in Quebec are coming up with abysmal match rates (40-50% overall). We have tried looking at problems with characters sets and postal code inconsistencies, but nothing seems to be nailing it down. Presuming these two factors are **not** the issue, what suggestions might be offered as possible pitfalls when geocoding in this area? Important notes: 1. Geocoding with ArcGIS 10  2. Using FSALDUs as post code in "ABC XYZ" format.  Here are some example addresses.                   ARC_Street          ARC_ZIP     CITY                           STATE     1134 BRIDGE ST W        A7R 3L1     NAPANEE                         ON     75 RUE PRINCIPALE       G0A 1A0     SAINTE-CHRISTINE-D'AUVERGNE     QC     43 RUE PRINCIPALE       G0A 1A0     SAINTE-CHRISTINE-D'AUVERGNE     QC     325 RANG SAINT-JACQUES  G0A 1A0     SAINTE-CHRISTINE-D'AUVERGNE     QC     325 SAINT-JACQUES RANG  G0A 1A0     SAINTE-CHRISTINE-D'AUVERGNE     QC     125 RUE PRINCIPALE      G0A 1A0     SAINTE-CHRISTINE-D'AUVERGNE     QC     168 RANG SAINTE-ANNE N  G0A 1A0     SAINTE-CHRISTINE-D'AUVERGNE     QC     168 RANG SAINTE-ANNE    G0A 1A0     SAINTE-CHRISTINE-D'AUVERGNE     QC


How to convert field values from lower case to upper case in ArcGIS 10.1?

Using the Field Calculator in ArcGIS 10.1, I am able convert the first letter in a value from lower case to upper case. How do you convert the entire value to upper case, though? I can't seem to locate a VBScript for it. For example, I want to convert _small_ to _SMALL_.


How to automatically add vertices to lines every x meters?

I've made a vector grid using lines; the grid coverage is 100 km x 100 km and the lines are at vertical and horizontal intervals of 1000 metres. Each line in the grid is defined by two vertices, one at each end, and each line has an ordinate attribute for labelling. My wish is to to add vertices to the lines, so that each line will have vertices at intervals of (say) 500 metres. Does anyone know how to do this? The background to this is that the grid will be displayed on OpenLayers and given the strangeness of Google Mercator the lines need to be pegged to the ground with vertices at frequent intervals. One other obvious use for the ability to add vertices to grid lines would also be to make nicely curved lat/lon graticules for projected maps.


Get Annotations selection Arcobjects

i have annotations stored in mxd document, when i select some annotation , i tried to get the selection through graphics selection, so i got always the rectangle of the dataframe (because i'm working on a axPageLayoutControl), and when i use features selection i get nothing; so none of them return the annotation selection. How could i get the annotation selection in Arcobjects ? i'm using Arcobjects 10.1


Parse error while inserting values into polygon feature

I created a polygon as follows               create table boundary (id int, name text);      table created;               select AddGeometryColumn ('',boundary', 'latlon' 4326,'POLYGON', 2);      geometry column added; then i'm trying to insert values as follows               INSERT INTO boundary (id , name, latlon) VALUES ('1', 'river', GeometryFromTerxt('POLYGON(82.240 16.988,82.243 16.991,82.240 16.988)', 4326));      finally i got an error as follow > <--parse error at position (position number) within geometry.


How do I automatically fill a table column?

I would like to solve basic problem. I need to automatically fill the table. How is in Qgis possible to fill it like : if column SPECIES contain string DOG -> write to column CODE integer 1? Thanks for any advice.


Which spatial weighting function does ArcGIS' GWR use?

I am running Geographically Weighted Regression and originally was using ArcGIS to carry out the analysis until I read/heard mixed reviews about it. I have now tried a different programme to run it (SAM) and get different results. Does anyone know what the spatial weighting function is in ArcGIS? I think it is Gaussian but am not 100% sure. I cannot select this with Arc but there are different options to chose from with SAM. Thanks!


How to use SQLite db with QGIS plugin?

Hi I would like to use SQLite for storing some information in my plugin for QGIS. I have a problem: if I put the db let say test.db among the resources as file, after compilied the resorce.qrc file, QGIS find the db, but if I insert some row in the db, qgis does not find any more I have to compile again the file, I tried to recompile the file every time I commit something in the db, it seems to work, but is a dirty solution and I do not think I can use it on every system different from the mine, is there a better solution?


Online map with rivers

Is there any internet map source (zoomable, tiled, i.e. "google like") with good display of rivers? I.e. well labelled even on larger scales? So that I'm for example able to track Donau river (with label) on scale like this.   * Basic google map is just terrible, rivers are not well displayed, often lost on larger scales, and in 90% cases not labelled.   * OpenStreetMap - similar, furthermore they denote roads as blue (!!!) which is even more confusing! (really bad practice)   * OpenCycleMap - even worse... Thanks in advance!


Albers Conic versus State Plane Zone in terms of accuracy

I'm trying to determine if an Albers Conic (Alaska Albers) is suitable as a projection for a corridor 800 miles long by 50 miles wide, that goes from the north coast of Alaska to the south coast. This corridor spans 2 state plane zones (west to east). I need to support survey grade accuracy in my GIS for the corridor, and Albers won't cut it I think. Should I create a new coordinate system composed of a merge of the 2 state plane zones to address the accuracy need? thanks,


Basic question about downloading SRTM 3 arc resolution data

I want to be able to download high resolution 3 arc degree resolution (90 meters) from NASA's earthexplorer.gov site. However it is a bit confusing for a beginner like myself. I want to be able to do this for my country i.e. India. I go here http://earthexplorer.usgs.gov/ and by pressing shift I zoom into the area of interest by creating a rectangle. Then it displays 4 coordinates and then I ask for datasets. I get so many options and each are of very small sizes. Am I supposed to download all of it or just any one of it ? If I am supposed to download all of it is there a way to do it all in one download ? I presume then I will have to use progamming code to concatenate these separate .hgt files together.


ossim-extract-vertices.exe (in commandline) not working on WIN7 op. I would like extract the image bounds from the pan-sharpened Landsat 8 image. 3 years ago it worked :-( . Have you any solution? BR Janos


Creating Home ranges (MCP) of marine mammals excluding solid land

I use ArcGIS 9.3 and the Hawth's tools for Home range analyses. I try to create MCP of marine mammals which all works fine. However, the MCP include some land as well. How can I create a MCP so that it only considers the water area? Thanks!


How to display places names when using Quantum GIS and shapefiles?

I am new to the world of geo systems. What I would like to do is displaying some information on a map for given regions. I downloaded shape files from cloud made web site and load layers using Quantum GIS. Now I would like to display the places names but I do not know how to do. Are these information already present in the file how can I do to display them ? If so, I guess It should be possible to do joins with the data I want to display. Can you please help me on this subject ?


GeoTIFF file creation from .Tiff file

im not sure if this question is suitable for GIS I'm working on a software that displays a map, like this ![enter image description here][1] i also have some export functions which exports the the about image as `.bmp/.Tiff/.Jpg/.PNG/.Wmf/.SVG` This is .TIFF export ![enter image description here][2] Now i have to export it as `GeoTiff` also The software i am working on is in `Delphi 7`. **information** i have come across this steps to creating a geotiff but since i am new to GeoTIFF , i am stuck after the 1st point. **question** so please tell me is it possible to convert the `.TIFF` file to `.geotiff`? **what i have tried** remotesensing geotiff how to write geotiff files in delphi possibly-compressed but i cant figure out how to create the meta data for the tiff to create the geoTiff


What exactly does the ArcGIS Server service do? SQL Server service?

What is the purpose of the ArcGIS Server service? It's not used at all to do a direct connect to an SDE database, right? That would just use the SQL Server service? While we are on the ArcGIS Server topic, what exactly is the windows user account that ArcGIS Server creates (default 'arcgis') used for? What is its purpose? If I create an SDE database and create a user for it, when that user connects to the database using a direct connect from his laptop- what is going on? What windows user account on the server is being used, or is that user just directly connecting to the SQL Server service over the network? Any reading material on this subject so I can better understand what's going on? Thanks for any help.


How to modifiy how selection highlights are displayed?

I have got a layer of points that are showed with a litlle symbol. When I select one, a red square comes around it. The problem is that this points are inside other layers (polygons) and some of them are red too. I would need to change the color of this square and the width, so that it becomes easily visible. I could not find anything related to this in the documentation, neither in the asked questions. Can you please help me for that? Thank you for your answer Best regards Thank you for your answer. I already tried this, but it doesn't affect the red square that remains exactly the same. My selection colour is setted to Blue under the Project's properties and the square is still red. And one thing that could be really usefull for me, would be to have the width of the square's lines increased. Do you have an idea for that ? Thank you


How to build a model creating shp polygonal objects using for that the parameters of xls file?

Could somebody advise which instrument I can use in ModelBuilder (ArcGIS10) for build a model which will create shp polygonal objects from a table (created previously in Excel) with necessary parameters (that include coordinates of latitude and longitude and distances). Some details.   I need to create many polygonal objects by 4 steps:   1. Create 2 circles with the same center (with coordinates X1, Y2 – they will be in the table) and radiuses Rmax and Rmin (they will be in the table);    2. Create a new polygonal object (“bagel”) = Circle (max) – Circle(min);    3. Create a polygon triangle by coordinates of 3 their vertexes (all coordinates will be in the table);    4. Find a resulting polygonal object (as a shapefile) that will be equal a space of intersection of “bagel” and that triangle.


Combining raster images?

I've decided to work on GIS implementation in transportation. I've these small tiles of images, with world files. I want to combine them to create a base map. I don't know coding/programming, so please suggest some other other method to combine these tiles.


Failed to publish globe service on ArcGIS Server. Error 001369

I'm trying to publish a globe service on our ArcGIS Server and in ArcGlobe I get this error message > " _Failed to publish service._ " ---> Went to Results: [h=1]001369 :  > Failed to create the service.[/h] [h=2]Description[/h]The creation of the > service failed. This is a generic error. Many different conditions could > cause this failure. Check the server logs for the specific issue. [h=2]Solution[/h]Check the server logs for the specific issue. --> Went to ArcGIS Server Logs: > SEVERE 22.08.2013, 10:15:20 Failed to construct instance of service > 'glob_4.GlobeServer'. Server SEVERE 22.08.2013, 10:15:20 Failed to > initialize server object 'glob_4': 0x80030003: null Server SEVERE > 22.08.2013, 10:15:20 (null) glob_4.GlobeServer Unfortunately I really don't know how to solve that. The service is published (I can see it on the server) but apparently it cannot start. I also tried saving a service definition file and then publishing it on the server-> same problem. So thanks for any advice. PS: We use ArcGIS Server 10.1 on Linux


How to generate features to test different implementations of LinearRing?

I have some code that throws the following exception:               Points of LinearRing do not form a closed linestring      and I want to check if my code is calling this correctly by supplying some features that either violate or do not violate the constraints of LinearRing.validateConstruction. Is there an existing Java utility that can be used to generate appropriate feature data for this?


Agent Analyst extension for ArcGIS

I am trying to create agent based model for simulating movement of occupants in different rooms of different floors of a building. I am using Agent Analyst tutorial downloaded from ESRI website and PhD dissertation of Elizabeth Groff as a guide. Since the building has three different floors, I have created a 3D network dataset and created a toolboox which can find shortest route, closest facility and OD matrix from room centre to all the emergency exits. I have created the following according to the two guides above.   1. csv file containing the activity space (i.e. the door of the room occupied, nearest exits of the floor, bends on the staircase and exit of the ground floor).   2. Point shapefile of path that the agents have to follow.   3. csv file containing the list of all neighbouring nodes.   4. Point shapefile of occupants. There are more than one occupants in few rooms. I intend to show the movement of these occupants as vector agents in Agent Analyst.   5. Point shapefile of all emergency exits. I also want it to be include in the model. So I want to:   1. Show the movement of these agents from their present location to the nearest exit on ground floor.    2. The occupants are of different sex and age, thus I want the agents to move at different speed from one node to another and while they are moving downstairs. How can I do that? Lastly, can anyone tell me if movement of agents can be shown in ArcScene because I tried to show the movement, it does not. I tried the same in ArcMap and it works. I haven't tried the same in ArcGlobe. I am using ArcGIS 10 and Agent Analyst extension for ArcGIS. Thanks in advance. ......


Which Graduated Symbology to use in QGIS

I am trying to map demographics data for a county in the UK based upon a combination of Census data. I want to compare the the averages for the county alone to the averages of the UK as a whole and display it using a sort of traffic lights symbology (red, orange, yellow, green, where red is way above average and green is way below average). **My problem is I'm not sure about what type of graduated symbology to use. Can someone please explain what Graduated Symbology is best to use in my situation?** I used Natural Breaks (Jenks) at first and was very happy with that but then I read on the ESRI website: " _Natural Breaks (Jenks) are data-specific classifications and not useful for comparing multiple maps built from different underlying information_." This makes me think using Jenks and then comparing the county averages to the national averages or comparing different categories (health data versus accessibility data) isn't appropriate. So then I thought it would be best to use Equal Interval or Quantile symbology or define my own bands (split the results in four so I can assign colours to each 25%). Any advice/help/information would be great. ![enter image description here](http://i.stack.imgur.com/MUmDP.jpg)


Creating management zones in NDVI ortho maps with contour like lines

This question is hard to explain so if you have a possible answer I would love to hear it. I work in the precision agriculture business which heavily relies on NDVI calculations but need to create like zones of crop health for field surveyors and field management purposes. The end users for maps I create are not GIS savvy so presentation is everything. Raster Classification, zonal fills, and reclassification's are not what I want because they are vague and distort the data. On the attached map there are geo-coordinate points over areas with possible health strains and areas that appear to be very healthy. **How do I create zone lines, almost like contour lines, to batch similar points into like areas?**   For example, in the Northwest portion of the map, the three points are over similar areas. How do I create a boundary lines showing different zones?   I'm looking for 5 areas:   i) worst;   ii) bad;   iii) OK;   iv) good;   v) best,   separated by contour like lines creating zones. I don't want to disrupt are high resolution photography. ![enter image description here](http://i.stack.imgur.com/gP0sg.png)


Can QGIS be installed on a Server

My question is whether QGIS can be downloaded and installed on a server for multi-user access. Rather than installing the software locally, can QGIS be stored on a server and accessed by many?


Qgis install can't find Gdal framework (Mac OS X 10.7)

After having installed Mac OS X 10.7 I can't install Quantum Gis as it maintains that I have not installe the GDAL Framework, which I have done (several times). Have anyone experienced the same problem (and solved it)?


What is the most common way of displaying geodata from Postgis on Leaflet?

For example, in my database I've some points with geographic coordinates. I want to display them on Leaflet JS layer. Which instruments should I use? Maybe there is some API...


Where can I get a multipoint shapefile?

I'm trying to find a multipoint shapefile to do some testing for an application I'm working on, but I cannot seem to find one (and do not have ArcGIS to create one). Can anyone suggest a place to find a sample multipoint shapefile?


What's the usual term for "ground plan based"

I don't know if "ground plan based" is the right word in the following context: A computer program reads a ground plan and produces a result ground plan. The result groundplan's deviation from the input ground plan must be within a prescribed tolerance to be called "ground plan based". Possible words for this situation might be: ground plan based, topographic planimetry, planimetric reconstruction But I'm not sure which is the common word? Which word would you use to describe that both of the ground plans match nearly 100%?


Anyone have success with OpenLayers and ArcGISCache?

* OPENLAYERS Has anyone had success using OpenLayers and the ArcGISCache layer beyond the examples? I'd like to mix tiles with **_different resolutions_** and although they seem to scale correctly they do not translate correctly. Code to translate the tiles appears to be missing with the exception of a % translation necessary after the scale:               transformDiv: function(scale) {              // scale the layer div              this.div.style.width = 100 * scale + '%';         this.div.style.height = 100 * scale + '%';              // and translate the layer div as necessary              var size = this.map.getSize();         var lcX = parseInt(this.map.layerContainerDiv.style.left, 10);         var lcY = parseInt(this.map.layerContainerDiv.style.top, 10);         var x = (lcX - (size.w / 2.0)) * (scale - 1);         var y = (lcY - (size.h / 2.0)) * (scale - 1);              this.div.style.left = x + '%';         this.div.style.top = y + '%';     },        * ESRI It appears that ArcGIS JSAPI has an even greater limitation...all the tiles must have exactly the same resolution. Can someone from ESRI discuss/confirm this limitation?


How to project geographic coordinates (lat/long) to a cartesian system (albers equal-area)?

I am using this matlab package http://www2.ocgy.ubc.ca/~rich/map.html#examples to project the latitudes,longitudes of my data to a specific projection. For this particular case I am using albers equal-area. Now when I do the projection, I am using the following code               m_proj('albers equal-area');     [x y] = m_ll2xy(longitude,latitudearray);      My question is when I specify the projection method, do I need to specify the geographical bounds. I mean do I need to pass the latitude, longitude bounds to the function m_proj I have got the following results. I am not sure if these points are correct.               lat                   lon                  x                      y     24.590960444058823    -119.6310020520101   -0.0778982228028     -0.3893279      Can anyone provide some suggestions?


Geoserver with ECW image file

I am trying to show ECW ortophoto as base layer in openlayers.   So i found this thread on GIS SE:                   Geoserver 2.1.1 with ECW (v3.3) support          1. Download Geoserver 2.1.1 from http://downloads.sourceforge.net/geoserver/geoserver-2.1.1-bin.zip 1a. extract to c:\bin\geoserver          2. Download imageio 1.1.1 installer from http://java.net/projects/imageio-ext/downloads/download/Releases/ImageIO-Ext/1.1.x/1.1.1/windowsInstaller/windows32-imageio-ext-installer-gdal-mrsid-ecw-1.1.1.zip 2b. Install it to c:\imageio 2c. Remove c:\bin\geoserver\webapps\geoserver\WEB-INF\lib\imageio-ext-1.0.8 2d. Copy c:\imageio\lib*.* to c:\bin\geoserver\webapps\geoserver\WEB-INF\lib (imageio installer will also copy gdal dll, ecw sdk dll to your java\bin directory)          3.Add Environment variables for GDAL_DATA c:\imageio\gdaldata GDAL_DRIVER_PATH c:\imageio\gdalplugin          4.Start geoserver      I did all this steps except number 3, what its means to Add Environment variables?   How I do that?


How to convert WKB to radians or utm in postgresql?

I am using PostgreSQL with postgis, the geometries are in UTM and stored as WKB with several shapes types (point, polygon, linestring...). Is there a way to convert the WKB to a list of points in radians or utm without the string parsing of the shape type and each point? Thanks.


OpenLayers - feaures from WMSGetFeatureInfo are not shown on layer (but they exists)

I have a project with google as base layer and geoserver serving WMS layers (structures - multipolygons) that are in EPSG:2039 The layers are showing fine on google base layer (I guess OL re-project them). Problem is , once I do WMSGetFeatureInfo and retrieve all the features (as in this example http://dev.openlayers.org/releases/OpenLayers-2.13.1/examples/getfeatureinfo- control.html) I don't see them on the map , the layer does have the features because I used firebug to query it (highlightLayer.features.length) but they coords are not in EPSG:900913 and I have no idea how to make them show. This is my code :                   new OpenLayers.Control.WMSGetFeatureInfo({                 url: geoserver,                 infoFormat: "application/vnd.ogc.gml",                 name: "infoControl",                 maxFeatures: 5,                 queryVisible: true,                 eventListeners: {                                getfeatureinfo: function (e) {                         if (e.features.length > 0 )                         {                                             highlightLayer.removeAllFeatures();                                                 highlightLayer.addFeatures(e.features);                             highlightLayer.redraw();                         }     });      I've tried reprojecting the feature before adding it to the layer by iterating e.features:                      Ext.each(e.features, function(feature) {                                       highlightLayer.addFeature(feature.geometry.transform(epsg2039,epsg900913));                                         });      but without any success. Is there any solution I can use in code ? (I don't want to use different base layer not reprojecting my geoserver data to 900913). Thank you !


How to visualize azimuthal data with uncertainties?

I am trying to make a figure showing azimuthal data with a different range of uncertainties at each point. This oldschool figure from a 1991 paper captures the "bowtie plot" idea that I'm aiming for: ![From Hillhouse and Wells, 1991. "Magnetic Fabric, Flow Directions, and Source Area of the Lower Miocene Peach Springs Tuff in Arizona, California, and Nevada"](http://i.stack.imgur.com/Q12Ns.png) Any suggestions on how I could make a similar figure? I'm a relative newbie at GIS stuff, but I do have access to ArcGIS through my university. My Arc experience has been limited to making geologic maps, so I haven't had to do anything too exotic. I've poked around in the symbology options in Arc and QGIS but haven't seen any settings that I thought would do the job. Note that this isn't just a matter of rotating bowtie-shaped symbols by azimuth; the angular range of each "bowtie" needs to be different. I'd rate my Python skills as 'strong intermediate' and my R skills as 'low intermediate', so I'm not averse to hacking something together with `matplotlib` and `mpl_toolkits.basemap` or similar libraries if necessary. But I thought I'd solicit advice on here before going down that road in case there's an easier solution from GIS-land that I just haven't heard about.


Help needed for georeferencing in QGIS

I am new to Quantum GIS. I just happened to browse to a tutorial on georeferencing in QGIS and I found it easy and interesting. I also calibrated the map and saved the points as per WSG84 standard. Now after I closed the software and when I restarted I am unable to see the coordinates when I load the GeoTIFF image. Can you please guide me where I am going wrong? Why am I not able to load the coordinates? How can this problem be solved?


can't add JPG files into QGIS?

I can't add JPG files into QuantumGIS. I get an error message "C:\Spatial_Days\Data\Working\AP_Coast_Export.jpg is not a supported raster data source". I am using QGIS 1.7.4 Wroclaw with GDAL 1.8.1 installed from OSGEO4W. Any ideas? Are som JPG libraries in the wrong place? Regards Richard


How should I get a Raster out of ArcMap and into Google Earth (.kmz) with transparency

RasterLayerExportClass will only create a .png with a single value transparency, however there is a bug in Google earth which prevents this from working. The other export options don't support transparency at all? (jpg, tiff) I do notice that the 3D analyst toolbox performs this correctly with the "Layer to KML" function, this I have no source for.


Identify primary routes in Postgis

I have a table of linestrings that make up a route network. I want to identify the primary routes and separate out the interconnections. Problem is that the primary routes are split into separate linestrings and have no ID to identify them separately. The diagram below illustrates the problem. There are three major routes parallel to each other and two intersections. I want to drop out the intersections and create three single linestrings to represent the three major routes. Then the intersections would be retrieved as separate geometries. I had thought that I could look for vertex's with 3 vertices connections at both ends and drop those out, but this can happen on a major route line. Also the highlighted interconnection is made up of two linestrings, so would not fit into this rule. ![major route problem](http://i.stack.imgur.com/qbMFv.png)


ArcGIS - Table columns lose formatting when I make a new copy of shapefile (Decimals, Thousands separator, Highlighting)

When I make a copy of a shapefile or I join two shapefiles and then create a subsequent shapefile, my number type columns (in the attribute table) will default back to numbers with many decimals and no thousands separator. This after I've cleaned up every column the way I like it. I also lose the highlighting of any columns I have a highlight on. I'm just looking for a way to avoid having to reformat every column if I happen to make a copy of the shapefile. That or is there a way to set a default of 2 decimal places and a thousands separator for the attribute table? I'm trying my best to get away from shapefiles, but we need it to transfer between multiple programs. Any ideas would be appreciated.


Hardware and software for capturing bathymetric lake elevations?

What hardware and software would you use for capturing bathymetric elevations (depth) in inland waterbodies (lakes and rivers)? Your device and software budget is $1,000. The budget is a soft target, to get setup, and doesn't include actual data capture. A 17' open boat with outboard motor and a ruggedized laptop running Windows XP Pro and Arcmap (Arcview license) is at your disposal, if you need them. The data captured should be suitable for building a raster elevation model and bathymetric contours. Depths are not expected to exceed 200m. Desired accuracy should be comparable to or better than a standard consumer handheld GPS (Garmin GPSMap, etc.). _(Actually the budget is a sham. If you've got a good solution for $5k or $50k I'd like to know about it too.)_


Finding lat/lon of corners of geotiff file

I am a GIS newbie. I just recently managed to turn a GeoTIFF file into a bmp file using gdal_translate. Now I need to find the latitude/longitude coordinates of the corners. I would prefer to use more of the gdal code or utilities, but that is not essential. Does anyone have a good way to do this?


Where can I find equipment that will allow me to recreate a form of Google Streetview?

I am looking for more affordable equipment that would allow me to recreate the concept of Google's Streetview, as well as software that would make a comparable UI map (without it "belonging" to Google, ie. not having everything available via Google Earth). What I would like to create are scientific maps along rivers, streams, and wetlands, with sampling data (temp., PH, TDS, dissolved oxygen...) available to the user along the path in various increments. Essentially I am looking for camera equipment that can take 360° shots, that can record the images with X,Y values that can be input to a digital map and brought up on screen the way Street View looks. I know this is more of an digital imaging question, but it will be set up through a GIS system for user interface. Thanks!


what is the suitable projection coordinate system for Iran

I am doing analysis for province wise Iran. I am using WGS1984 as my geographical coordinate system, and I do not know which is suitable Projection coordinate system for entire Iran. I feel the UTM will not be suitable because the country shares several zones in UTM system.


How to plot Storm Prediction Center (SPC) Shapefile using python

I am trying to make a plot of the SPC's thunderstorm outlook using Python. I have downloaded the shapefile from this website http://www.spc.noaa.gov/products/outlook/day1otlk.html. Then I use this code to try to read the data.                   from mpl_toolkits.basemap import Basemap         #draw basemap         m=Basemap(projection='mill',llcrnrlat=20,urcrnrlat=50,llcrnrlon=-130,\           urcrnrlon=-60,resolution='c')         m.drawcoastlines()         m.drawcountries()         m.drawstates()         m.drawmapboundary(fill_color='#FFFFFF')         shp_info = m.readshapefile('..\day1otlk_20140709_2000_cat','thunder')      But then I get ValueError: Shapefile must have lat/lon vertices - it appears this one has vertices in map projection coordinates. Convert the shapefile to geographic coordinates using the shpproj utility from the shapelib tools. I am pretty new to this but I understand I need to convert this shapefile to geographic coordinates but the error message is too vague and I have no idea how. Any help would be appreciated. Thanks.


How to calculate Network Service Areas in QGIS?

Is there any way in QGIS to apply service area buffers e.g if I have a point on a map I wish to show the service coverage of 1 mile, 2 mile, 3 mile, breaks using the road network?


How are bound variables specified in an ArcGIS REST SOE?

In the documentation for using handler functions with ArcGIS Server Rest SOE's, they don't explain how the keys in the boundVariables collection are determined. When I search through the entire solution for "customLayersID" I don't see anything. How would I know to use "customLayersID" as a key?               private byte[] CustomLayer(NameValueCollection boundVariables, string outputFormat,         string requestProperties, out string responseProperties)     {         responseProperties = null;              //The LayerID.         int layerID = Convert.ToInt32(boundVariables["customLayersID"]);              //Execute.         CustomLayerInfo layerInfo = GetLayerInfo(layerID);              string json = layerInfo.ToJsonObject().ToJson();              return Encoding.UTF8.GetBytes(json);     }


How to merge/union non contiguous polygons using Oracle Spatial functions

Is there any way of merging non contiguous polygons using the SDO_AGGR_UNION or a similar dissolve function? When i run the below query in oracle sql developer i managed to convert geometry type from polygon(2003) to multipolygon(2007), but in a gis system some polygons are not included on preview. `select shape from ( select nationalcode as nt,SDO_AGGR_UNION(SDOAGGRTYPE(shape, 0.5)) as shape from auadmunits where nationalcode = '1225' group by nationalcode) ;` I know that union is for adjacent shapes, but i am wondering if anyone else has faced this issue and has found a approach, not only handling oracle spatial. Thank you.


Guideline/scheme for naming properties in GeoJSON

Are there any guidelines/requirements for naming properties in GeoJSON? Should I add a vendor-prefix for my properties which only make in use with a specific application? I already read the specification however I didn't found any further information on this matter. **Examples:**               {         "foobar-id": 21     }      or               {         "com.foobar": {             "id": 21         }     }


Test for polygon orientation

I'm want to merge multiple geometries with Geotools (starting off with one geometry) but the result is a polygon that has a clockwise orientation. This gives a invalid geometry. My code for the merge:                   GeometryCollection geometryCollection =         (GeometryCollection) factory.createGeometryCollection(list.toArray(new Geometry[list.size()]));         Geometry all =  geometryCollection.union();      Why would something give an invalid geometry? And what can I use to test for orientation? Thx


How to switch to edit mode vector layers, in pyqt application based on qgis?

I do QGIS based application, I need to implement the ability to modify the geometry of vector layers in manual mode (editing nodes), how to do it?


OpenLayers legend graphics not using proxy

I'm using the OpenLayers/geoserver stack and my WMS requests are configured to go via a proxy using the following:               OpenLayers.ProxyHost="../gis/geoserver.seam?url=";      So far so good, all future WMS request are now channelled through this proxy script and WMS images are generated/returned as expected. My problem arises when viewing the legend, the request to get the layer image (WMS request) ignores the OpenLayers proxy definition and tries connecting direct (client browser->geoserver server which is not externally accessible - hence the proxy). Does anyone have any idea how I force the legend image requests to use the proxy? Thank you!


Adding attribute list to combobox in a python plugin

I am developing a simple plugin at the moment which contains 3 combo boxes:   * comboBox_1   * comboBox_2   * comboBox_3 Combobox 1 & 2 lists the vector layers available, however I would like the 3rd combobox to list the attribute column that both layers have in common (from the attribute table).                   # run method that performs all the real work     def run(self):         # show the dialog         self.dlg.show()         for layer in self.iface.legendInterface().layers():             if layer.type() == QgsMapLayer.VectorLayer:                 self.dlg.comboBox.addItem(layer.name())                 self.dlg.comboBox_2.addItem(layer.name())          Any tips/advice would be most welcome as I am new to this and followed various tutorials and the python cookbook.


QGIS - Atlas. Outputs missing

This really teases me. Somehow the Atlas-function in Print Composer are missing some of my polygons from my layer, when doing a print. I´ve looked at them once again,- they are there, and the geometry is right, but not all them are printed. How to solve this?


Updating Arc Toolbox paramaters with validation script

I'm simply trying to disable parameter 1 if parameter 0 if entered. I modified the following, but it does not work, do I need to return anything?               def updateParameters(self):       """Modify the values and properties of parameters before internal       validation is performed.  This method is called whenever a parmater       has been changed."""            if self.params[0].value == False:           self.params[1].enabled = False       else:           self.params[1].enabled = True            return [self.params[0],self.params[1]]


Proj4 Task not working - Northing Easting to Lat Lng

I usually post in StackOverFlow - if this is the incorrect area to post - I apologise. I have trying to convert a lot of northings / eastings to lat lng I have code below working: In ruby using this gem https://github.com/dark- panda/ffi-proj4                class PostCodeNode < Node       require 'ffi-proj4'        attr_accessor :postcode, :sector, :district            def self.from_northerns_and_eastings(northing, easting, postcode)          srcPoint = Proj4::Point.new(easting, northing)          srcProj = Proj4::Projection.new('+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +datum=OSGB36 +units=m +no_defs')          dstProj = Proj4::Projection.new('+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs')          dstPoint = srcProj.transform(dstProj, easting, northing, 0)          lat, lon = to_degrees(dstPoint.x), to_degrees(dstPoint.y)          new lat, lon, postcode       end             def initialize(lat, lon, postcode)          @postcode = postcode.gsub(/\s+/, '')          @sector   = if @postcode.length == 7 then @postcode[0..4] else @postcode[0..3] end          @district = @postcode[0..2]          super(lat, lon)        end       end     end      However, the lat / lon that I am out putting end up in the middle of the sea! So I know I am doing something very wrong!                    dstPoint = srcProj.transform(dstProj, easting, northing, 0)      This line in particular is where the "magic" happens! In the test library on the git repo the test specifies some unknown numbers to me, I am not sure if I have my input data correct! https://github.com/dark-panda/ffi- proj4/blob/master/test/transformation_tests.rb               def setup         @proj_wgs84 = Proj4::Projection.new(["init=epsg:4326"])         @proj_gk    = Proj4::Projection.new(["init=epsg:31467"])         @proj_merc  = Proj4::Projection.new(["proj=merc"])         @lon =  8.4293092923         @lat = 48.9896114523         @rw = 3458305         @hw = 5428192         @zw = -5.1790915237       end            def test_gk_to_wgs84         to = @proj_gk.transform(@proj_wgs84, @rw, @hw, @zw)              assert_in_delta @lon, to.x * Proj4::RAD_TO_DEG, TOLERANCE         assert_in_delta @lat, to.y * Proj4::RAD_TO_DEG, TOLERANCE         assert_in_delta 0, to.z, TOLERANCE       end            def test_wgs84_to_gk         point = @proj_wgs84.transform(           @proj_gk,           @lon * Proj4::DEG_TO_RAD,           @lat * Proj4::DEG_TO_RAD,           0         )         assert_equal @rw, point.x.round         assert_equal @hw, point.y.round         assert_in_delta @zw, point.z, TOLERANCE       end      There is no documentation with this ruby gem so I am doing a little bit of guess work, but I think I am nearly there. Can someone see my error, so I can return the right lon/lat. I am writing this in Jruby so any better Java Libraries could also be used :) Thanks!


Why does IDatasetContainer2.CreateDataset fail with ArcObjects at ArcGIS 10.1?

I have a small application used to check and generate network, created with the help of the following tutorial: http://help.arcgis.com/en/sdk/10.0/a...00000w7000000/ It worked just fine with ArcGIS 10, but since I had to upgrade to 10.1, the application fails on this line:               INetworkDataset networkDataset = (INetworkDataset)datasetContainer2.CreateDataset(deDataset);      The error code is "System.Runtime.InteropServices.COMException was unhandled Message=Exception from HRESULT: 0x80042262", which really isn't helpful. Is there something new I could have missed, or some help on what could cause such an error ?


Select features that do NOT intersect in ArcGIS (10.0)

I used the "create spatially balanced points" in Geostatistical Analyst in ArcGIS 10 to generate a large set of points with equal inclusion probability but a "spatially balanced" dispersal. I then buffered these using different buffer settings, with the idea of explicitly testing the influence of sampling unit size on population estimates (in my case, tree cover) using a fixed area sampled. This latter detail is key - I sum of the area for the sum of the selection of buffered points to be the same between comparisons. A toy example: what's the difference sampling 10 polygons 1 ha each in area (10 ha total) versus 100 polygons, each measuring 0.1 ha (again, 10 ha total). The point layer created by the tool qualitatively has the desired dispersion, but when you start buffering points, some start to overlap, reducing the total area (plus violating any possibility of independence between samples). What I'm looking to for is an efficient way to find features that DO NOT intersect. I saw a post asking a similar question for PostGIS, but was looking for a way to approach the question using ArcGIS. Any help is greatly appreciated!!!


How to limit input of Python script parameter to polyline only when using Layer file?

When the parameter is feature class I can filter the input to polyline only. How to do this when the input is **layer file** at CURRENT MXD? I'm looking for something that will operate before the script starts running. I'm using Layer file so the user can choose the input from the data frame at the current MXD.


PostGIS raster functions aspect and slope slow

I am trying to compute the raster and slope values from a DGM table (8184 x 5159) imported from tif file tiled in 500x500 tiles. In my query in which I merge the DGM table with a vector (point type) table consisting of 3000 (or 15000) points this query takes extremely long. Explain analyze tells me for a single point to compute aspect and slope it takes more than 3s. I set on both tables an index (gist (st_convexhull(rast)) on the DGM and a gist(geom) on the point table). Any idea how to speed up this query? Markus explain analyze select st_value(st_aspect(dem.rast,1,'32BF'),sat.geom,true) as aspect, st_value(st_slope(dem.rast,1,'32BF'),sat.geom,true) as slope from safer.st_dgm_tiled dem, safer.aoi_bolz_rsat_a sat where ST_Intersects(dem.rast,sat.geom) limit 1; ## And this is the query plan Limit (cost=0.00..1101.35 rows=1 width=64) (actual time=3332.439..33051.935 rows=10 loops=1) -> Nested Loop (cost=0.00..1101.35 rows=1 width=64) (actual time=3332.434..33051.913 rows=10 loops=1) Join Filter: _st_intersects(dem.rast, sat.geom, NULL::integer) -> Seq Scan on st_dgm_tiled dem (cost=0.00..3.87 rows=187 width=32) (actual time=0.103..0.119 rows=59 loops=1) -> Index Scan using aoi_bolz_rsat_a_gist on aoi_bolz_rsat_a sat (cost=0.00..3.35 rows=1 width=32) (actual time=0.006..0.007 rows=0 loops=59) Index Cond: ((dem.rast)::geometry && geom) Total runtime: 33065.589 ms (7 rows)


Feature attachments in Geoserver: Possible?

Is is possible to have a feature attachment functionality with Geoserver services, similar to what ArcGIS server offers in its feature service? If Geoserver does not have a built-in functionality to support add/remove/download of feature attachments, could anyone suggest a way to do so? Additional info: Feature attachments are the files that you want to associate with some features. For instance, geo-tagged images could be attached to corresponding point features, or some textual reports could be attached to land parcels. This functionality is a built-in for some formats including local and ArcSDE geodatabases. That is, the attachments reside in the geodatabase, and the relation is not provided by hyperlinks. This approach could provide better consistency between features and their attachments. ESRI products provide means for add/remove/query/download of feature attachments. For instance, your web-app can interact with feature attachments through ArcGIS server's REST interface.


How to create a circle vector layer with 12 sectors with Python/pyqgis?

From a given coordinate and radius I need to create a circle with 12 sectors. The sectors should start from north (0 degrees) in 30 degree steps clockwise. I could also imagine to create the sectors by triangles, if that would be easier.


Using the esri analysisTool Erase class in C#

I am trying to use eSRI.ArcGIS.AnalysisTools.Erase class but I keep getting blank layers. I can get the layer that can be used for the input and the layer for the erase. I don't really understand the output value though. Can that be a layer? Is it supposed to be a featureclass? If it is a layer or featureclass is it modified when Erase is called? Documentation on this feature is rather limited and doesn't give much of any explanation of how this class works. Is there a place where I could get better examples of how to use the Erase class in C#?               Erase erase = new Erase(inputLayer, intersectionsLayer, erasedLayer);      Could I do the following in order to modify the input layer:               Erase erase = new Erase(inputLayer, intersectionsLayer, inputLayer);      input layer is a polygon layer, roads or rivers on a map. intersectionsLayer is the intersection of the roads and rivers on the map erasedLayer is supposed to be the output.


how can I find sDNA toolbox for arcgis?

I am working on spatial structure of the city and security. I need the sDNA Toolbox to add in gis toolboxes. please help.It is a real emergency.


Where can I find historical political affiliation data for the United States?

I am collaborating on a research paper where one of our variables is political affiliation across the United States. I will be creating a series of historical maps. I'm looking for the percentage of the population that is Republican, Democrat, and Independent in each zip code in the US. If zip code isn't available, county would work too, or statewide if nothing else. I've searched online and have only found 2008 and 2012 election data. Does anyone know where I could find this historical political affiliation data? I need data from 1980 to present day.


Small issue with field calculator

What am I doing wrong in this field calculator logic? Pre-logic               def re_score(elev_t,f2, contour):      f2=contour      if elev_t.endswith('.5'):       f2 = "Midi"      return f2      Expression for field "Contourtyp"                re_score(!Elev_t!,f2,!Contourtyp!)      I just want to rename the contour type where the contours are at half meter intervals. The 'Elev_T' is a text column with all the elevations (converted to text as I couldn't think of a way to do it with numerical elevation data which has .25, .5, 75 and 1m intervals). I want all .5 called 'midi' and .25/.75 remain as 'minor' and 1m remains as 'basic' > Executing (Calculate Field (3)): CalculateField 328000_8123000 Contourtyp " > re_score(!Elev_t!,f2,!Contourtyp!)" PYTHON_9.3 "def re_score(elev_t,f2, > contour):\n f2=contour\n if elev_t.endswith('.5'):\n f2 = "Midi"\n return > f2" Start Time: Thu Apr 12 17:10:40 2012 ERROR 000539: : unexpected indent > (, line 1) Failed to execute (Calculate Field (3)). Failed at Thu Apr 12 > 17:10:40 2012 (Elapsed Time: 0.00 seconds) I have tried different indentation and no luck... Thanks


Dataset of unknown islands?

Recently I've reviewed ASTER GDEM v2 dataset and found many tiny (at least > 1ha) islets that's missing in other dataset such as WVS. I've change the altitude to 10m and they're still there. Anyone/Organization ever attempted to documented/confirmed those? Or those are just defects? I can't see them from Google Maps as the area isn't part of interest (no data). Note: - ASTER itself limit their scope (1 square degrees) to area with at least a significant island. So there are possibility of unknown islets everywhere else. - The area that I reviewed is not area of polar ice extent.


System Requirements for 3d GIS & 3d Modelling

I'm looking for system (hardwares) required for view, edit & analyse 3d GIS & modelling data. And what is the decent monitor size should be ? single/Dual screens ? Modern systems comes with 8GB Ram, 2GB Graphic Card, 1TB space, 3 button mouse. But do we need anything else for a workstation ? which has decent capability for 3d GIS & 3d modelling data ? And do you reckon 2 different set of systems for viewing and editing capable workstation ? your help is really appreciated. Thanks Bas


Can GDAL Retile run multi-threaded?

gdal_retile is currently using only one CPU of the available eight and it is taking a while (48 hours already) to retile 5TB of data.


How to get WKT or GEOJson by country or city name with Overpass API?

I'm trying to understand Overpass API, I'm experimenting with it, but cannot get what I expect. Overpass API doesn't return me neither polygon shapes, nor WKT, nor GEOJson, nor even a highlight of the area I'm querying for. My goal is to get either WKT or GEOJson of current OSM relations (exactly polygons (a set of lng/lat points)) for countries and cities. For example, I want to get a polygon for France. I make these queries in http://overpass- turbo.eu/:               relation         ["name"="France"]         ["coverage"="polygon"]         ["type"="boundary:administrative"];     out body;      The response I get, no any polygon lat/lng data:               <?xml version="1.0" encoding="UTF-8"?>     <osm version="0.6" generator="Overpass API">     <note>The data included in this document is from www.openstreetmap.org. The data is made available under ODbL.</note>     <meta osm_base="2013-11-08T11:43:01Z"/>               </osm>      The second version of my request, I provide only a name:               relation         ["name"="France"];     out body;      Now I get dilated information about the country, but no polygons either:               <?xml version="1.0" encoding="UTF-8"?>     <osm version="0.6" generator="Overpass API">     <note>The data included in this document is from www.openstreetmap.org. The data is made available under ODbL.</note>     <meta osm_base="2013-11-08T11:37:02Z"/>            <relation id="11980">         <member type="node" ref="17807753" role="admin_centre"/>         <member type="relation" ref="1362232" role="outer"/>         <member type="relation" ref="1263863" role="outer"/>         <member type="relation" ref="1263868" role="outer"/>         <member type="relation" ref="1628087" role="outer"/>         <tag k="ISO3166-1" v="FR"/>         <tag k="TMC:cid_58:tabcd_1:Class" v="Area"/>         <tag k="TMC:cid_58:tabcd_1:LCLversion" v="8.00"/>         <tag k="TMC:cid_58:tabcd_1:LocationCode" v="2"/>         <tag k="admin_level" v="2"/>         <tag k="currency" v="EUR"/>         <tag k="flag" v="http://upload.wikimedia.org/wikipedia/commons/c/c3/Flag_of_France.svg"/>         <tag k="land_area" v="administrative"/>          ...... and so on ......      How to get a set of lng/lat (WKT or GEOJson) of the territory (countries and cities only) by their name?


ogr2ogr DXF to PostgreSQL some LINESTRING coordinates mirrored to the negative longitude

I have been using **ogr2ogr GDAL tool** to migrate geospatial data from DXF file to PotgresQL database without much problems. But now there is a special problem I can not fix. I have a **DXF file with LINESTRINGs** that when I import them **to the PostgreSQL database** some of the linestrings are imported in the correct geometric coordinates but **some other LINESTRINGs are imported with the negative longitude** , so that LINESTRINGs are mirrored to the west. When I open the DXF file with my QUANTUM GIS viewer I can see all the LINESTRINGs together with the correct coordinates, but when I export them to the postgres database and I print them in a map (by a web application) or later I export then I see some of the LINESTRINGs mirrored "away home" from the original coordinates. That is my ogr2ogr commandline:               ogr2ogr -select "" -f PostgreSQL "PG:host=192.168.*.* user=**** password=**** dbname=****" C:\PATH\FILE.dxf -s_srs "EPSG:23031" -a_srs "EPSG:23031" -lco GEOMETRY_NAME=the_geom -nlt LINESTRING      There is no error output from the ogr2ogr tool, so it is difficult to get the reason of that problematic. Any help or recommendation? Thank you very much. **EDIT:** I have tried without much effect the ogr2ogr opions: -lco GEOM_TYPE=geometry -lco DIM=2 --config PG_USE_COPY YES -lco PRECISION=YES -clipsrc xmin ymin xmax ymax


How to convert between KML and Esri's shapefile (SHP) format?

My users are sending me point data that were digitized using GoogleEarth. How can I convert their KML to a shapefile?


Good KML conversion program

I recently used the GPSlogger app and created KML files from my routes. I haven't been able to successfully convert them to shape files. Does anyone know a good downloadable program that converts file types?


How can I convert Shapefiles (SHP) to KML?

> **Possible Duplicate:**   >  How can I convert KML to ESRI's shapefile format? I have SHP files, I want KML files, what tools can convert?


qgis build under ubuntu 12.04, but all the python plugins are not there

All the .so plugin show correctly, only the python plugin do not. I am confused and do not know how to fix this. I think there must be some python problem . The build process is successful.


How to avoid or deal with "unable to save" errors within ModleBuilder ArcGIS (10.1)?

Do you have references to best practice, or examples where you have recovered Models or can you share your expertise on how to avoid the "Unable to save model " error within Model Builder. Alternatively can you advise on situations to avoid which cause this error to occur. There is very little help information on this topic, so any shared advice would be much appreciated. There is a linked question here Do you use a proven workflow to edit and document ArcGIS ModelBuilder models? - that shares advice on how to track the building of models, so you always have a clean copy of the model to go back to. Please comment there if you have comments about the process of tracking edits / changes to Models. If you have specific expert advice about avoiding this specific error, or dealing with the error once it arises then I'd be very grateful.


EPSG code as dynamic text in ArcGIS

Is it possible to get ArcGIS to show the EPSG code for a coordinate system as dynamic text? The default text is quite verbose (see below), and I think just showing the "Coordinate System" is probably enough. However, it would be quite useful if I could also show "EPSG:32632" in addition to this.               Coordinate System: WGS 1984 UTM Zone 32N     Projection: Transverse Mercator     Datum: WGS 1984     False Easting: 500,000.0000     False Northing: 0.0000     Central Meridian: 9.0000     Scale Factor: 0.9996     Latitude Of Origin: 0.0000     Units: Meter      The documentation for ArcGIS 10.1 doesn't mention it, but I'm hoping it's just been missed out, or there is a work-around.


Postgis array query

I have a Postgis database with land cover vector data with the following layout:               select * from CLCtable limit 0;      outputs:               gid | code_06 | id | remark | area_ha | shape_leng | shape_area | the_geom      My problem is the following: I have a 2D point array and I want to get the 'code_06' value for each point. I'm currently doing a query inside a for loop that goes through all the points. I end up with a query for each point which takes too much time if I have for instance a 100x100 2D point array. The query I'm doing is something like this:               select a.code_06 from CLCtable as a      where ST_Contains(a.the_geom, ST_GeomFromText('POINT(1234 4567)', 3035));      Is there some way to this more efficiently?


How do I use a DHM in tiff format for distance and slope measurements?

I am a student and I have to work out a project about soil loss on a plot. I need basic measurements of this plot such as length, width, area and slope for my erosion calculations. I have got my hands on a 4 GB large DHM measured by LIDAR in a TIFF file format. My question is now, how do I preform these calculations on this file format? I guess I need to convert it so I can use it in IDRISI or ArcMap?


Prevent ArcGIS saving shapefiles into workspace

How can I stop ArcGIS creating output shapefiles as results of various tools? I have got a script returning a certain value. However in order to get this value a have to use several functions such as `arcpy.CreateThiessenPolygons_analysis` or `arcpy.Clip_analysis`. These functions (tools) return maps and save them into my workspace. I would like to work with them in the script but I dont want them to be saved into the workspace since I wont need them anymore. Thank you


Finding the latitude/longitude that is in the middle of 2 others?

Ok, so I will have a system/application that will always at the most have 2 points (latitude/longitude) on a map per street. So if the user wants to add another point on that street I want my app to calculate if the new point is outside the bounds of the previous two points. So basically it will be like a max min type situation, and I want to know if this new point is a new max or a new min or if it should be thrown out, because I only track the max and mins. What mathematical magic hoop am I going to have to jump through to figure that out? or should I go to math.stackexchange.com?


How to do parallel queries in postgis

Is there any way to do queries in postgis using multiple cores in a transparent way, other than splitting my queries among several client connections ?


Create a View with a new geometry field in PostGIS

I have a **table** in my data base. This table was created with differents fields as 'x','y' and 'z'. Now I need to make a **view** to generate a geometry column, but I found problems, because the created geometry field is not correctly named. I need to force my column "geom geometry" to "geom geometry(PointZ, 25830)". I did this: st_force_3dz(st_setsrid(st_makepoint(table.x, table.y, table.z), 25830)) Any solutions? Thank you.


Is there any way to configure MapFish config.yaml from Javascript?

I am using the mapfish print module in my webmapping application.In that I need to have various mapfish print layouts with different background pdf options. For that, am I need to create each config.yaml? or can we configure it from client side (from javascript)? System: Windows XP / Tomcat7 / Geoserver 2.4.0/printing-2.1-SNAPSHOT.jar For Example:                #===========================================================================      A4 portrait:     #===========================================================================     mainPage:       pageSize: A4       landscape: false       rotation: true       backgroundPdf: '${configDir}/MyCompany.pdf' #Here I need to change as per the client template            items:            - !columns                     absoluteX: 50           absoluteY: 690           width: 502           config:             borderWidth: 0.3             cells:               - padding: 2           items:             - !map               width: 500               height: 600      and my javascript code for layers:                   var printurl = 'http://xxx.xxx.x.xx:8080/geoserver/pdf/print.pdf?spec={' +     '"layout":"A4 portrait",' +     '"srs":"EPSG:404000",' +     '"units":"m",' +     '"dpi":300,' +     '"outputFilename": "mapPrint",' +     '"layers":[{"baseURL":"http://xxx.xxx.x.xx:8080/geoserver/cite/wms",' +                 '"opacity":1,' +                 '"singleTile":false,' +                 '"customParams":{},' +                 '"type":"WMS",' +                 '"layers":["Oxford_Map"],' +                 '"format":"image/png",' +                 '"styles":[],' +                 '"overview":true' +               '}],' +       '"pages":[{' +                 '"center":[' + osMap.getCenter().lon + ',' + osMap.getCenter().lat + '],' +                 '"mapTitle":"Sample Title",' +                 '"comment":"This is the map comment",' +                 '"scale":200000,' +                 '"rotation":0}' +                ']}';                    window.open(printurl);        Kindly suggest me the solution to achieve this. Thanks in advance


Is there a name for a situation when the place is clearly or unclearly named?

This is not specific to any system. Suppose there's a large red rock on a terrain which can be easily found and clearly seen and there's an artificial object such as a mall near that large red rock. That object could have a name that matches its location such as "Large Red Rock Mall" and so it would be intuitive to look for that mall near that rock or it could have some mismatching name that would make the search much harder. I'm pretty sure this arises in GIS systems and causes people to place some kinds of metainformation next to such badly named objects. Is there a widely used term for these two situations that would mean something like "how well the object name matches its location"?


What is the best plain text format for georeferenced raster data?

I have to translate satellite images in a file in `.txt` format or another, such as Excel or `.csv`, in which there are pixel values corresponding to (longitude,latitude) couples. What is the best file format to store this (in terms of dimension and limits of the file because pixels number is in the order of 10^5)? In your experience, is a matrix format representation better or a columns representation (one column is for longitude, one for latitude and one for value, so every row of the text corresponds to a pixel)?


Impossible to sum rasters because of nodata pixels

I have a set of rasters (.vrt) with daily soil moisture data. I want to sum the pixels of all rasters in order to have a measure by month. However, the whole world is not covered each day, which results in nodata values at places where measures exist for the other days. What I want to do, is sum the values of each raster. However, it seems that each time a nodata pixel is in the sum, the resulting pixel is directly categorized as nodata. **I would like to have the opposite: ignoring all nodata values and summing the rest.** I thought of 2 ways of solving the problem:   1. summing rasters ignoring nodata values    2. converting nodata pixels to value 0, then sum all the rasters ![enter image description here](http://i.stack.imgur.com/UH9Wx.jpg) Unfortunately, I can't find any tool to do this. Can anyone help me?


How to find out to which road each points belongs to?

I am new to GIS . I hava a folder it include a .mxd file and a .gdb folder, the .gdb folder hava many .gdbtable and .gdbindexes files etc, it's a road network data of a city. Now, I want to know which road it belongs to for a given latitude and longitude, which software or sdk should I use? is there have a similar open source project?


How to use GRASS with HEC-RAS?

I am trying to use HEC-RAS for the flood modelling of my flood simulation. How do I use the text file output of HEC-RAS with the GRASS script r.inund.fluv?


Why do you use ArcGIS for Desktop?

I'm new to GIS, having only dabbled with ArcGIS for Desktop for about 4 weeks in 2007. The business I am at wants to target writing complete solutions that involve GIS as it would benefit their hardware sales. They do not know which market they want to target but want me to pick the GIS software to use, yet I am very green to GIS markets. All i know if target platforms are windows, windows mobile, android and web applications. The idea of mobile applications means data connection is not 100% so internet based services may need to be ruled out, i.e. GoogleMaps. I was struggling to work out how to phrase this as a question, given the huge range of GIS products available, Esri's ArcGIS for Desktop, CadCorp, MapInfo, GoogleMap/Earth, qGIS, Manifold, openJump, openstreetmap etc. To avoid the what do I buy question, I instead ask **the question** why do you use Esri ArcGIS. From my experience its slow to navigate around maps and quite verbose to program in causing quite a lead time in development. Esri is also the most expensive product on the market, and i believe also the most popular. But why do people continue to use it, when other systems like CadCorp have the same functionality if not more, seem to be more responsive, can import Esri data and cost less. I feel that I must be overlooking something here. I know client demands in some industries like defense, want Esri but why is it still so popular, given I often hear how other products are betters (Is this a Windows vs. Mac example on market share vs. quality) P.s. This question has been spawned from **this one on StackOverflow**.


How to save selected feature("polygon") as image from the shape file using C#?

I am new to ArcGIS and trying a do following things..               1) Select polygon in the loaded shape file.(right click on polygon -> choose option  (select features).          2) Click button (build as Add-in) in C# on the toolbar and selected polygon save as image at specific location.      Thanks in advance.


Where can I get polygons for the Municipalities of Puerto Rico?

I'd like to find GeoJSON files to draw the polygons of municipalities of Puerto Rico. It might be nice get the Nokia Map (or any reasonable publicly available map) of the same regions and overlay the results.


Why are edits in shapefile table not saved?

I have created a shapefile (point data) and wish to change some parameters in the files table data. I can edit the data and see the coresponding change in my my symbology. However, when I save the shapefile, the data and symbology revert back to the way it was before the edits. What am I doing wrong? I have a shape file of a series of points. One column in my table has values between 1 and 6 that show up as color-coded points on my map. The data for the column came from a spreadsheet that I had joined with the shapefile. I was trying to update certain values in the column (I set the shapefile so I could amend it, opened the table and changed the value. The color of the point on my map changed, however, when I tried to save the changes, the color (and value) reverted to the previous settings. I did find a way to make it work. I amended my original spread sheet in Excel and exported it as a dbf. I then unjoined the dbf and shapefile and rejoined with the new data. Don't know if that's the correct way, but it worked.


Is there a way to only append new data?

Is there a way to append only newly added records from a database to another database? I looked online and couldn't find an answer. I figured this would be somewhat straight forward. We have a working database that I want only append new records to our 'live' database. Both of them are File GDB. * * * Update 1 I have two File GDBs. One is a working GDB where users can make edits. The other GDB serves as a 'live' GDB which needs to get updated when the 'working' has changes made. Right now I have to stop the service remove the live database and copy over the working database in it's place, then starting the service again for every client. I was looking at a way to just copy the updated records so I don't have to stop the service and know that only new updates went to the live database. Should I put the live database on a SDE?


Whats a Python Script/Method to use to get the number of fields with data in an attribute table?

I am doing some data migration and need the number of records with actual data, sans null and blank fields, without switching back and forth with select by attribute. Ideally I would like to run a script for a table or feature class that gives me the count of each field that has data.


Measure average distance between two lines with common endpoints

I have two shapefiles, each with a set of lines generated from start and end points. One shapefile has the straight lines generated from the XY To Line tool, while the other has lines generated from a least cost path tool in Python. ![enter image description here](http://i.stack.imgur.com/aS26Z.png) I am looking for a method to quantify the error or distance between them, something that attempts to capture the overall variation between the two lines, not just the greatest or shortest distance between them (The shortest distance would also be 0 as they have the same start and end points). I have considered closing them into polygons, then dividing the area by the straight- line distance to get an 'average polygon height'. I have also considered converting one set of lines into points and then averaging the distances generated from the Near tool for each line feature. However to do this I would have to delete the end points as they are essentially false '0' distances. Are there other methods to compare these features? An important aspect to note is that sometimes the least cost path line crosses over the straight line so I would often have two polygons.


Best simple GIS for Estate inventory and mapping

I think my GIS needs would be considered simple for the 3500 acre estate I manage:   1. **create maps** of our roads, trails, fields, and buildings, and **show distances** on the roads and trails;    2. **calculate areas** in SF or acres for tasks such as fertilizing fields or forestry projects. It would be nice if I could produce a database of the results so I can automatically calculate the miles of certain road types we have, water resources, or the acres of various areas to be fertilized or timbered. I want to **use layers of satellite photos or topo maps** (which I can geo-locate), my drawing layers, and **import Garmin data** also. I guess that can be done with a pretty simple system, no? I use fGIS (Forestry GIS) which was free but buggy, with no hope of being fixed now that they stopped updating the free version. It was relatively easy to learn, but extensive **editing of polygon areas** leaves visual anomalies, and the database does not update reliably when editing areas. Very frustrating. What's out there that can do my simple tasks (reliably) without having to learn a lot of complex things I'll never use. I'll pay for a simple program (up to $200?) if that's what it takes to get reliability. Thanks in advance for your suggestions!


Compute the area of a given polygon (in vector format) lying between specified lines of latitude

I have species distributions (in vector format) and I would like to calculate how much of the area for a given species distribution is within certain lines of latitude, such as temperate and tropic zones. Using the Wikipedia definition: The north temperate zone extends from the Tropic of Cancer (approximately 23.5° north latitude) to the Arctic Circle (approximately 66.5° north latitude). The south temperate zone extends from the Tropic of Capricorn (approximately 23.5° south latitude) to the Antarctic Circle (at approximately 66.5° south latitude). Thus, the tropics would be between 23.5° south latitude and 23.5° north latitude. For example, using this shapefile of the Atlantic Ocean (choose shapefile in the drop-down menue) plotted on a worldmap, one could easily calculate the total area of the Atlantic Ocean;               require(sp)     require(ggplot2)     require(rgeos)     require(rgdal)     require(maps)          setwd("~/test/iho")     ao <- readOGR(getwd(), layer="iho")     aof <- fortify(world, region="name")          # Not necessary for the calculation per se, but still nice. Although not the best looking map     world <- map("worldHires", col="gray90", fill=T)          # Plot      pp <- ggplot(data = world, aes(x = long, y = lat, group = group)) +     geom_polygon(fill = "grey50") +     geom_polygon(data = AO, aes(x = long, y = lat, group = group), fill = alpha("cyan", 0.5)) +     coord_equal()          # Total area     gArea(SpatialPolygons(ao@polygons))     [1] 7512.821      But how could we restrict the calculation of the area to specified lines of latitude, e.g. tropic and temperate zones as defined above? Any pointers on this would be highly appreciated, thanks! Plot ![enter image description here](http://i.stack.imgur.com/Xxzhi.jpg)


Error when using ServerStyleGalleryClass (Arcobject)?

First, I used: IStyleGallery styleGallery = new StyleGalleryClass(); I can run my program without error (on my computer). But this require using ESRI.ArcGIS.Framework (need install Arcgis Desktop). And, I can't use for my client computers. So, I used ServerStyleGalleryClass, and I used "MakeServerStyleSet" utility to convert my style file into server style. Then, I used below codes, but I got the error " **Error HRESUT _EFAIL has been returned from a call to a COM component** " (because after getting Items, styleItems is NULL)                       IStyleGallery styleGallery = new ServerStyleGalleryClass();                  IStyleGalleryStorage styleStor = (IStyleGalleryStorage)styleGallery;                         string startupPath = Environment.CurrentDirectory;                       string strFilePath = startupPath + "\\Data\\Styles\\SoDo.ServerStyle";             styleStor.AddFile(strFilePath);                  IEnumStyleGalleryItem styleItems;                              styleItems = styleGallery.get_Items("Line Symbols", strFilePath, "Default");  // Return NULL value             styleItems.Reset();             IStyleGalleryItem styleGalleryItem = styleItems.Next();      Are there anyone know what's wrong ? Thanks and regards, Tai


Surfer problem - overlapping grd bln

I have the following problems with Surfer: 1, I have a grid file and a bln but i'm not sure that they overlap each other exactly. I set the coordinate system with grd and bln! (WGS84) but there is no changes happend... ![enter image description here](http://i.stack.imgur.com/N7CKi.png) 2, I tryed to blank the grid file around bln but i got this message: ![enter image description here](http://i.stack.imgur.com/fkWZl.png) Does anyone can help me how to fix the exact position to overlap each other and blank the grid around bln?


Creating random location within a network from a given location and a given distance

For a habitat selection study, I am trying to identify availability. My species lives along waterbodies and I could assess distances moved between two consecutive locations using the network analyst (Calculating distances between consecutive points along rivers (polygon) using ArcGIS Desktop?). I would like to get a potential location the animal could have reached within the same distance. For better understanding: I have location A and the distance d from location A to B I have a network of rivers and other waterbodies I now want to get the location C using A as a starting location and distance d as the distance along the network. Is that possible to do and if so, how? Or do you have any recommendation how to proceed? Thank you already in advance for your help.


How do you duplicate a point within a shapefile using Python?

How do you duplicate a point within a single feature class using Python? I have a partial sample script below, but in a nutshell, I want to duplicate a point, copy it into the same shapefile, and populate the fields with user- provided strings. I suspect this is elementary, but I'm new at this and am frustrated with loops and cursors.               # Script tool will take a point file and allow the user to duplicate a single point     # while updating necessary field information. The purpose is not to delete or overwrite     # the original point object, but rather to add a duplicate point with the new information.     # This allows historical context for a point that spatially never changes, but who's      # fields are dynamic. No information is hard-coded.          import arcpy     # set up input variables for target folder and target dataset.     targetFC=arcpy.GetParameterAsText(0)  # this is the point file     targetKeyField=arcpyGetparameterAsText(1)  # this is the key field in the point file     newKeyID=arcpy.GetParameterAsText(2)  # must be duplicate of a string in targetKeyField     newField2 = arcpy.GetParameterAsText(3)     newField3 = arcpy.GetParamaterAsText(4)          # Add new fields to table     in_table = targetFC     field_name2 = "Field_2"     field_name3 = "Field_3"     field_type = "TEXT"     arcpy.AddField_management(in_table, field_name2, field_type)     arcpy.AddField_management(in_table, field_name3, field_type)          # Loop through targetFC to find a match between newKeyID and a string in targetKeyField     with arcpy.da.SearchCursor(targetFC, [targetKeyField, "SHAPE@"]) as cursor:               # insertCursor based on the match; duplicate the point in the table               # Populate the new cursor with the new parameters (newField2, newField3, etc)          # Error if the newParcelID does not match a string in the targetKeyField          # User is brought back to enter a new newKeyID string.


How to apply WHERE clause to relationship class using ArcObjects?

I'm trying to query objects related to objects and satisfying some query in ArcObjects. IRelationshipClass interface contains methods for getting all related objects but how can one filter them? I don't believe that such ability doesn't exist.


Labeling Issues with Geoserver

I have everything working on my geoserver except for the labeling. I have searched and I cannot find any solution. I am by no means an expert. I can modify the look/symbology of my polygons, lines, etc... but when I add a style that utilizes a label, nothing shows up on my map. I have created new labels with the sld files I downloaded directly from geoserver docs. I also changed the attribute field name that I want to use in my shapefile as the label. When I open the layer on the map, nothing shows up, not even the polygon. I am sure I have not enabled something. Any help would be appreciated... geoserver 2.4.1 Here is the sld I have recently tried: http://docs.geoserver.org/stable/en/user/styling/sld- cookbook/polygons.html#label-halo               <?xml version="1.0" encoding="ISO-8859-1"?>     <StyledLayerDescriptor version="1.0.0"         xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"         xmlns="http://www.opengis.net/sld"         xmlns:ogc="http://www.opengis.net/ogc"         xmlns:xlink="http://www.w3.org/1999/xlink"         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">       <NamedLayer>         <Name>Label halo</Name>         <UserStyle>           <Title>SLD Cook Book: Label halo</Title>           <FeatureTypeStyle>             <Rule>               <PolygonSymbolizer>                 <Fill>                   <CssParameter name="fill">#40FF40</CssParameter>                 </Fill>                 <Stroke>                   <CssParameter name="stroke">#FFFFFF</CssParameter>                   <CssParameter name="stroke-width">2</CssParameter>                 </Stroke>               </PolygonSymbolizer>                       <TextSymbolizer>                 <Label>                   <ogc:PropertyName>name</ogc:PropertyName>                 </Label>                 <Halo>                   <Radius>3</Radius>                   <Fill>                     <CssParameter name="fill">#FFFFFF</CssParameter>                   </Fill>                 </Halo>               </TextSymbolizer>             </Rule>           </FeatureTypeStyle>         </UserStyle>       </NamedLayer>     </StyledLayerDescriptor>


Can OSM's iD editor be used on custom maps?

I'm setting up a community-based mapping solution for a local NGO. They need their own maps and, after some consideration, I have decided to go with Mapperz suggestion and use MapBox. It's good to use MapBox technology as it is scalable, modifiable and, using their fantastic iD editor, should allow user edits. I cannot work out how to make my maps editable, however. To provide a concrete example, how would I add an editor that would allow this layer of points to be modified, allowing new users to create new points just like on OpenStreetMap (OSM)? I know it can be done with GeoServer, but want to retain the beautiful simplicity of MapBox for this one.


Does QGIS feature a tool like ArcGIS Data Driven Pages?

Has QGIS progressed to the point of having a Data Driven Pages type tool set yet? Or perhaps something similar to the old DS MapBook pre arcgis 10?


ArcGIS10 Highest point via polygon features

I am using **ArcGIS 10.0** with **3D Analyst** , **Spatial Analyst** and **Military Analyst**. I feel like I am halfway to solving a problem but do not seem able to completely solve it.   * I have a polygon shapefile with about 100 polygons and each one has a unique ID.    * I want to overlay that on a raster and then for each polygon extract the highest value.    * I used the **Military Analyst>Highest Point** and also **Spatial Analyst>Zonal Statistics** and they both work.    * However, the main thing I need in the output is what polygon it is linked to.    * It seems like the zonal statistics work on zones but the id of the zone from the polygon is not transferred to the output.  So how can I get the max values back to the polygon shapefile to update a field? Update: The solution I found was Zonal Statistics To Table in the Spatial Analyst Toolbox. I just selected ALL statistics.


QGIS Raster Calculator: Need values to be set to 0 instead of no data

I have a landcover map with different values for the landuse options e.g. 190 for commercially used areas. Now I want to extract only these areas using the Raster Calculator with the expression > "Raster@1" = 190 This works fine, the resulting Raster contains value 1 for all cells which where 190 before (as it is supposed to) but no data values (high negative values) for all other cells, which I need to be zero instead. When I did the same operation to other rasters, QGIS would set the other cells to 0, which in this case is necessary for me to add the result raster to another raster later on. Any ideas how I can avoid that QGIS sets the cells to no data cells? And what could be a reason that it deals differently with rasters of the same format when applying the same operation with the raster calculator? Both rasters are .tif but from different sources.


Can QGIS be used to develop a vectorization tool?

First off, I don't now the lingo so forgive me if I can't phrase this question using the appropriate language. I am thinking of writing a c++ program that can convert a simple "color map", that is a map of land data that is color coded by land type, ie: lake=blue, grass=green, shoreline=yellow etc. and turn it into a vector shape file assigning "adjustable" connecting points data between the shape file lines or curves of each shape. Possibly even adjusting the distance of one shapes to another shape by the third shape that is in between the two. For example shoreline (yellow) width adjusted from, grass (green) to lake (blue) edge, based on whether it is an inside curve (more distance) or outside curve (less distance). Question, does QGIS have the ability to do something like this or can it be programed to do this? If so, can someone point me to the appropriate terms to look into the documentation about it?


How can i use ArcGIS server 10 mapservices in openlayers?

I'm new in openlayers . i'd like to use mapservice of ArcGIS server 10 in open layers.I search and found examples of using an ArcGIS Server 9.3 Rest API layer for openlayers. I found OpenLayers.Layer.ArcGIS93Rest instance but not ArcGIS 10 . How can i use ArcGIS server 10 services in Openlayers? I wrote the below code . i use ArcGIS server 10 and The REST is working right .               <html lang='en'>     <head>              <title>My OpenLayers Map</title>            <script type='text/javascript' src='OpenLayers.js'></script>         <script type='text/javascript'>                  var map;                  function init() {                    map = new OpenLayers.Map('map_element',{});     var arcgis = new OpenLayers.Layer.ArcGIS93Rest("MyName","http://xxxxxxx/ArcGIS/rest/services/test/MapServer",                    {layers: "show:0,1,2,3,4"});                              map.addLayers([arcgis]);                              }              </script>     </head>          <body onload='init();'>     <div id='map_element' style='width:1000px; height:500px;'>     </div>     </body>     </html>      Thanks for advance


ArcGIS "Zoom to layer" scale

I'd like to quickly inspect the features in a feature class by double clicking the row in the table view and looking at the surrounding base layer. This works, but the feature fills the screen, so I have to zoom out for each feature I inspect. Is there a way to set the zoom layer, or another method for quickly inspecting the area around many features in a feature class? Thanks!


What size-reduction can I expect on average when gzipping MBtiles?

As part of checking some prereqs for an idea (IOS app with MBtiles on local storage enabeling offline maps) I'd like to know if it's useful to gzip MBtiles when transporting them to an IOS device. In other words, is there a useful reduction in size when gzipping MBtiles? (or is the MBtile-format, already packed in some way, thus limiting the use of gzip or other packers). If so, how much size reduction can I expect? (percentage ballpark) Thanks, Geert-Jan NOTE: crosspost from SO (as it's within both domains) http://stackoverflow.com/questions/13864691/what-size-reduction-can-i-expect- on-average-when-gzipping-mbtiles


Mapserver vs QGIS Server for WebGIS with access control

I'm looking to set up a FOSS web GIS to allow sharing of large data files. From online discussions I gather this can be done using a variety of software combinations, eg: PostGIS + MapServer + Open Layers or alternatively PostGIS + QGIS Desktop + QGIS Server + QGIS Client. Could people experienced in this area please detail any advantages and/ or disadvantages that might be associated with these two options? Are there any problems setting up either of these two systems on a 64-bit machine? The end product webGIS would ideally give differential access via username and password, with different selections of data available to different users. Any advice appreciated.


How do I drop the z value from the geometry and transfer it to a new field?

Having a points shapefile with z values, how do I keep in the geometry only the x,y values? I also want to move the z values to a newly created double field.


How to summarize Excel data within the zones of another dataset by using ArcGIS 10.2

I have the following Excel data, I want to summarize the P-value within the zones of map dataset. I have sereached a lot and learned I might need to convert Excel data into XY table, and then into a raster before using Zonal Statistics tool. So my question might eventually be how to convert the Excel data into a raster. Thanks!               LAT LONG    P-value     42  19      0     -32 -57     0.000199835     -25 -56     0.000148499     -11 -73     4.36478E-06     -11 -72     1.30944E-05     -11 -36     0     -8  -75     0     2   -58     3.41092E-05     .     .     .


GeoServer and PostGIS connection technology

Does anybody know how GeoServer connects to PostGIS. Which technology is used? Is it JDBC? Thanks


Add point and update column incremental

In existing feature class we need to add point and some column value need to be updated in incremental using vba code i have some sample code please any can modify it?               Private Sub UIToolControl1_MouseDown(ByVal button As Long, ByVal shift As Long, ByVal x As Long, ByVal y As Long)     Dim pMap As IMap     Dim pMxDoc As IMxDocument     Set pMxDoc = ThisDocument     Set pMap = pMxDoc.FocusMap       Dim pSelected As IEnumFeature       Set pSelected = pMxDoc.FocusMap.FeatureSelection       pSelected.Reset          'Get the first layer in the map     Dim pFeatLyr As IGeoFeatureLayer     Set pFeatLyr = pMap.Layer(0)                'Create a point from the mouse down click     Dim tmpPoint As IPoint     Set tmpPoint = New Point     Set tmpPoint = pMxDoc.ActiveView.ScreenDisplay.DisplayTransformation.ToMapPoint(x, y)          'Get the feature class     Dim pFClass As IFeatureClass     Set pFClass = pFeatLyr.FeatureClass          'Create the new point feature              Dim pfeat As IFeature         Set pfeat = pSelected.Next         Set pfeat = pFClass.CreateFeature         Set pfeat.Shape = tmpPoint              Static rec         Dim pStart, pInterval         pStart = 0         rec = 0          pStart = 1 'InputBox("Enter Starting Value ", " Input Box", "")          'Update a value       pInterval = 1              Do While (Not pfeat Is Nothing)             If (pfeat.Shape.GeometryType = 1) Then                 If (rec = 0) Then                     rec = pStart                 Else                     rec = rec + pInterval                 End If                       pfeat.Value(pfeat.Fields.FindField("MAP")) = "Test"             pfeat.Value(pfeat.Fields.FindField("LOT")) = UCase(CStr(Format(rec, "###000")))                  pfeat.Store               End If              Set pfeat = pSelected.Next         Loop         pSelected.Reset          'Refresh the view     pMxDoc.ActiveView.Refresh          End Sub


Can QGIS Trace Features?

I generally have an doubt about QGIS. Is it possible to Trace the feature in QGIS? As in the case like ArcGIS for Desktop which has a tool called "Trace" in its Editor Toolbar? If yes, how we can do it?


How to use cURL to create new GeoServer layer "LAYER2" from a PostGIS view "MYVIEW"?

I am going to populate my GeoServer with lots of layer with PostGIS views at the backend. For this reason am learning the interaction with GeoServer REST API by curl client in GeoServer site. However, it does not provide clear example for doing this by cURL. Hence I then followed the cURLcommand in this post. The problem is that the command gives me a new layer with the same name with the table/view in my PostGIS: my PostGIS view "MYVIEW" is _always_ published as GeoServer layer "MYVIEW". Question: how to use curl to create new layer "LAYER2" from a PostGIS view "MYVIEW"? Am planning to publish _a_ PostGIS view several times as different GeoServer layer name (its like the "Publish Again" in the web GUI). Am using GeoServer 2.5, PostGIS 2.0, both on a Win Server 2003 32-bit; and cURL 7.33.0. Heaps of thanks


How can this Postgresql be solved

I am new in Postgrsql. I am trying to Insert few records in a column. I have a where condition. I am trying the following code               INSERT INTO table_name(column_one)         VALUES ('1000')         (SELECT * from table_name WHERE column_two = 'boo') ;      Here is the table structure column_One||Column_two||Column_three One||aaa||xxx two||bbb||xxx three||ccc||xxx four||ddd||yyy five||eee||yyy Now I want to change the all the value of column_two to 'ttt' where column_three = 'xxx'


Ordnance Survey data on GeoServer 2.x

Has anyone had any success deploying the Ordnance Survey's free datasets on its open sourced OSGBWebMapTools framework using GeoServer 2.0.2? I've been able to set up the datasets on GeoServer 1.7.6 and would prefer for it to use the out of the box caching that GeoServer 2.x supports.


Custom Query Task

I'm building a web application in ArcGIS Server for .net and I want to create query task for each layer so that each query depends on the previous result query task, how can I do that... please help me??? Thanks


Add a new group layer with python ArcGIS 10

Does anyone now how to add a group layer with python can I use arcpy.mapping.AddLayer but surely this is only for an actual layer as opposed to a group layer. so far I have this               import arcpy     mxd = arcpy.mapping.MapDocument("CURRENT")     df = arcpy.mapping.listdataframes(mxd, "layers")[0]     arcpy.mapping.AddLayer      Many thanks for your help,


VB ArcGIS 9.3 - Move column to the left

I'm trying to move text that is not aligned to the far left of the column due to programmer input. I'm trying to figure out the VB coding for it, but nothing seems to happen in the Attributes table (shp file). example: PERMIT ID 1-ZUN 1-ZOR                  2-SUM          4-PBR             2-SUN      1-ABC and so on... I can't seem to get the out of alignment text to move all the way over to the left. Thank You, Zoran


Where can I obtain an up-to-date list of US ZIP Codes with Latitude and Longitude Geocodes?

_NOTE: This began as aquestion on Stack Overflow, which has subsequently been closed. I also noticed a similar question about Most Up-To-Date Source for US Zip Code Boundaries, but I believe this question is different in that I'm not looking for_ **_boundaries_** _as much as I'm looking for_ **_coordinates_**. _Sorry for new newbie question. I'm not sure where to look to find reliable and up-to-date data._ We have a table in our database that has latitude and longitude geocode coordinates paired with US zip codes. A sample of the data looks like this:               Zip   State  Latitude    Longitude     30000   GA  33.906553   -84.206311     30001   GA  33.810659   -84.607964     30002   GA  33.77429    -84.260712     30003   GA  33.906553   -84.206311     30004   GA  34.113832   -84.294578     30005   GA  34.079927   -84.221166     30006   GA  33.906553   -84.206311     30007   GA  33.968777   -84.43282     30008   GA  33.902022   -84.580318     30009   GA  33.906553   -84.206311      The problem is that our data hasn't been updated for a few years. Where can I obtain (for free or for purchase) updated data for this table?


Free Mercator, Vector Maps

Are there any free, vector, mercator projection maps available online? I'm not wanting satellite imagery, but more a stylized map along the lines of this: ![alt text](http://i.stack.imgur.com/WKOoP.jpg) However, I need it to be vector-based such that I can create sharp tiles for greater levels of zoom. Ideally, I would like an Illustrator file for something resembling the above map.