How to scale/reduce my polygon without changing the central lat & long?

I am writing a VBA code to resize my polygon, I get a input as vector points(Shape file). The code below resizes it as according to my scale factor but my central latitude and longitude are also distorted. I want my new polygon to have the same central lat and long as of the orignal shape file. As if its overlaid.               lVct = LBound(vct)     uVct = UBound(vct)          ScaleFactor = 0.59       j = 0     i = 1     Set PPolygon = New Polygon      For i = lVct To uVct               vct(i).y = vct(i).y * ScaleFactor               vct(i).x = vct(i).x * ScaleFactor               PPolygon.addPairOfCoordinates vct(i).y, vct(i).x   'add coordiantes into the new Polygons            Next i      Describe if I have to use to some coordinate reference system or projections !!!


Which geodatabase type is most appropriate for both open source and ESRI use?

Main Question: Is there a geodatabase type that seamlessly works with both ESRI and open source products? Details: My company currently passes around geodata in various vector and raster file formats and isn't particularly organized. Most processing is done using open source tools, but some customers demand that we host our data in ESRI Map service format. We have an ArcGIS server instance already that hosts these services, but we still do our processing upstream using open source tools before dumping the results in an ESRI arcsde geodatabase. From what I can tell, ogr/gdal have somewhat limited abilities to read/write from an arcsde geodatabase, but not enough that I could reasonably store all of our data in an arcsde geodatabase and expect our processing tools to be able to use the arcsde geodatabase as the primary data store for the company. Am I wrong? If I switched to an open source geodatabase such as postgis, our processing tools would work fine but I don't think that I could use a postgis database as the data store for hosting ESRI services. Am I wrong? Is there a geodatabase type out there that can service both open source and ESRI seamlessly? If not is it common practice to maintain parallel geodatabases, one for open source and one for ESRI? Additional wrinkle: The answer I got was to use PostgreSQL/PostGIS . The only potential wrinkle with that is that I'd like to host this database on Amazon Web Services (AWS) and if possible I'd like to use Amazon Relational Database Service (RDS) to minimize our database management overhead (backups, load balancing, etc). However, RDS only currently supports MySQL, Oracle and SQL Server as database engines. I'm thinking that if RDS starts supporting PostgreSQL that this would be the ideal scenario, but just to double check, PostgreSQL is my only option for ArcGIS + gdal/ogr-based open source interoperability correct? If so I'll likely create a PostgreSQL database on AWS, I'll just have to spend more resources managing it.


Use FME to delete records from PostGIS before loading new records

I have some shapefiles. Each shapefile contains the data on a topic for a county. I have data for 26 counties. In the filename of the shapefile, the county ID is given. I load these shapefiles into PostGIS using FME. The data for all counties is loaded into one table (so 26 shapefiles get loaded into 1 PostGIS table). This data gets updated every now and then, and I can request the data for the county where the data has been changed. I get supplied with a new shapefile with all data for that county (not just the changed records). I would like to delete the data in the PostGIS table for the county that I have the new data for before I load the new data. How do I do this? Is this possible if I get the county ID from the filename of the shapefile and each record in the PostGIS table has a county ID attached to it? My plan is to just add the new shapefile to a specified folder, and run my FME workspace. Edit 31/05/2013 Just to clarify, I have multiple records for each county (i.e. all roads, buildings etc in a county). I basically want to bulk delete a counties data, and replace it with the new data.


POSTGIS query of point feature.  How to find nearest point to query location?

I am querying a point feature using a POSTGIS request fired in Javascript. The decoded URL looks like this and returns great results for polygon features.               http://test.tablelocation.com/api/v1/sql/?q=select '+tempCoi+' from '+tempTableName+' where ST_Intersects(the_geom, ST_GeomFromText('POINT('+clickLng+' '+clickLat+')',4326))&format=json&diagnostics=true&_maxage=86400&callback=?      As you can see, there are a few dynamic Javascript variables that are injected into each URL request. Two of these variables (clickLng and clickLat) specify the lat/lng of my query. They are generated based on where the user clicks on a google map. I am returning one attribute from the point layer referenced via the tempCoi variable. When I try to query a point feature, no data is returned. I am guessing that this is because the location of my query is too specific (i.e. 6+ decimal points). To make a long question shorter, is there a way to fuzz my data request. For example, if I click at 45.123456N and -113.654987W how could I look for the closest point to that query? Hope this is clear.. thanks in advance.. -j


How to determine if a LYR file has more than one Layer using ArcObjects?

In using arcpy, I have found that there are just a few lines of code needed to get a list of layers in a LYR file if more than one layer exist. How can I accomplish this same feat using ArcObjects in C#? I know that ILayerFile is the way to start this off and I can open a specific layer file using ILayerFile.Open() but how can I get back a list of layers in this layer file if more than one exist?


How can I extract raster values around points?

I'm using ArcMap 10. I have a point dataset and a .flt raster. For each point I want the sum of the raster values that lie within a certain radius of each point. i.e. I want to extract values within a given radius around each point and then sum them for each point. I just can't work out how to do it! Any help would be really appreciated... Thanks!


View Markers on Both Sides of OpenLayers Dateline -- Tips and Tricks

I'm looking for advice on how to display vector markers on both sides of the dateline. I'm using a GeoRSS feed. Currently only one OpenLayer's "globe" worth of data shows at a time. You have to pan east/west of dateline to get that "globe's" data. I've read about some tricky hacks that might work -- though they'd be expensive to do depending on the size of your dataset. So i'm wondering what other hacks people here have come up with. Please share your ideas.


Openlayers popup not closing

This is a special case, I have many popups attached to objects and they work fine and I am having a problem in only one case. All layers and popups are handled by select control's `onFeatureSelect`, but this one is handled by layers `featureSelected` event. On opening popup it throws: > Uncaught TypeError: Cannot read property 'lat' of null. Expanding error shows error on function `OpenLayers.Bounds.OpenLayers.Class.determineQuadrant` but the popup opens. On Clicking the close button, the click event is also fired and `onPopupClose` function is also called ( I have checked it with monitor and monitorEvents in console) but the popup does not close. The popup in other layers is still function normally. Here is the code:               select_Control = new OpenLayers.Control.SelectFeature([business, schools, healthfacilities, open_space], {         onSelect: onFeatureSelect,         onUnselect: onFeatureUnselect,         click: true     });          open_space.events.on({         "featureselected": function(e) {             var PopupPos1 = e.feature.geometry.getBounds().getCenterLonLat();             popup_content = '

sifal ground

';             var popup1 = new OpenLayers.Popup.FramedCloud("chicken",                 PopupPos1,                 null,                 popup_content,                 null, true, onPopupClose);                  e.feature.popup = popup1;             map.addPopup(popup1);             popup1.setBackgroundColor('#FFBBBB');             popup1.updateSize();             popup1.draw();         }     })          function onPopupClose(e) {         select_Control.unselectAll();     }          function onFeatureSelect(feature) {         //debugger;         var PopupPos1 = new OpenLayers.LonLat(feature.geometry.x, feature.geometry.y)         popup_content = feature.attributes.name;         var popup1 = new OpenLayers.Popup.FramedCloud("chicken",             PopupPos1,             null,             popup_content,             null, true, onPopupClose);         feature.popup = popup1;         map.addPopup(popup1);         popup1.setBackgroundColor('#FFBBBB');         popup1.draw();     }          function onFeatureUnselect(feature) {         map.removePopup(feature.popup);         select_Control.unselectAll();     }


GCM selection for future climates

This is not a coding question but rather an inquiry of which Global Climate Model(GCM) to use when projecting species distribution models for future climates. With the release of the IPCC AR5, and the multiple options of GCMs WorldClim GCM options, I dont know which one would be most appropriate for my work in the Australian tropics and in the North American deserts. Does anyone have any literature suggestions for selecting the appropriate GCMs?


I can not download gpx from GPS through GPS tool with GPS babel on QGIS

I have already install GPS tool plug-in and GPS Babel. Garmin GPS map 62s is connected my PC through USB cable. I changed device setting according to below site. http://nickmcw.wordpress.com/2010/07/30/quantum-gis-using-a-usb-gps-device/ I set below condition on "Download from GPS"tab. GPS device: Garmin USB( ←I create by myself) Port:usb Feature type:way point Layer name:F:\Garmin\GPX output file:test At least, I got new GPX file on layer of QGIS. Altgough the new GPX file is expected include existing gpx information from GPS, there is no row in attribute table. Colum names were put automatically.followings are. Name/elevation/symbol/comment/description/source・・・・・ Why I can not get gpx file from GPS???


ArcMap trace the creation/moving/deletion events by windows user

I want to check whether there is a way to trace the creation, moving and deletion in the editing session by windows currently logged in user. What I only know now is how to trace the creation/moving/deletion events by database user and displayed in attribute table of the layers under the monitoring. I am using ArcMap 10.2.2.


Simplest Way to Create a Custom Choropleth Map for a Website?

I am working on a choropleth map for a real estate site. My current workflow is:   1. Edit and save SHP file's DBF in Libre Office Calc.   2. Load SHP file into Quantum GIS. Set colored breakpoints based on data.    3. Load modified SHP file in TileMill (MapBox). Layer it over basic map.   4. Push the map to MapBox host.  This whole process is very tedious considering that the choropleth map requires frequent updating. Now, I am trying to find a more efficient workflow to produce the same result. My intuition is that leveraging Google Maps and Google Spreadsheets may be a better way to go. However, I haven't found a good tutorial that accomplishes my specific needs. Any advice is greatly appreciated.


What's the best projection for rasterization of random latitude and longitude data in the northern Atlantic?

I have a dataset in the WGS84 geographic coordinate system that I would like to interpolate along a grid using Python. It appears `gdal_grid` is not available through the Python bindings, so I plan to use another 2D interpolation method after rasterizing the data. To rasterize the data, I plan to re-project it using pyproj, then write it to a raster using the gdal python bindings. The UTM projection coordinate system seems like it would be the best projection, but my data spans the North Atlantic (i.e. multiple UTM zones). **Update:**   I'm open to suggestion on the interpolation method, but I had planned to use an inverse distance interpolation (as shown here). These are presence absence sightings data from ship cruise tracks, which do not necessarily follow lines of latitude. They span from latitudes in the mid 70's to mid 50's. Thanks! ## What projection would be best to use?


How to get the top left and lower right coordinates of polygon in ArcObjects?

First of all, draw the rectangle               ESRI.ArcGIS.Display.IScreenDisplay screenDisplay = Map1.ActiveView.ScreenDisplay;     screenDisplay.StartDrawing(screenDisplay.hDC, (System.Int16)         ESRI.ArcGIS.Display.esriScreenCache.esriNoScreenCache);     ESRI.ArcGIS.Display.IRgbColor rgbColor = new ESRI.ArcGIS.Display.RgbColor();     rgbColor.Red = 255;          ESRI.ArcGIS.Display.IColor color = rgbColor;     ESRI.ArcGIS.Display.ISimpleFillSymbol simpleFillSymbol = new         ESRI.ArcGIS.Display.SimpleFillSymbol();     simpleFillSymbol.Color = color;          ESRI.ArcGIS.Display.ISymbol symbol = simpleFillSymbol as         ESRI.ArcGIS.Display.ISymbol;     ESRI.ArcGIS.Display.IRubberBand rubberBand = new         ESRI.ArcGIS.Display.RubberEnvelope();     ESRI.ArcGIS.Geometry.IGeometry geometry = rubberBand.TrackNew(screenDisplay,         symbol);     screenDisplay.SetSymbol(symbol);     screenDisplay.DrawRectangle(geometry as ESRI.ArcGIS.Geometry.IEnvelope);     screenDisplay.FinishDrawing();      How to get the coordinates (top left, lower right) of this rectangle?


Is it possible to display an OpenLayers map upside-down?

This is more fun than a serious question, but I'd like to know if it's possible to display an OpenLayers map upside-down as per the uncommon, but interesting upside-down maps. I guess it's mostly a matter of finding a source of the tiles and turning them 180 degrees, but I figure it's something someone has already thought through. I'm not the only one who's interested in the stories that are (or are not) being told through maps.


How to get latitude /longitude in Degree Minute Second (DMS) using QGIS field calculator?

I have come up with the following expression to convert 5.1234 to 5° 7`24.24" **toint ($x) || '° ' || toint((($x) - toint ($x)) * 60) ||'`' || substr( (tostring(((($x) - toint ($x)) * 60) - toint((($x) - toint ($x)) * 60)) * 60),1,5) || '"'** Here’s the problem : for some points such as 5.1234, it works. but for others, it doesn’t. I suspect the problem is the integer conversion which round up the decimal figures instead of truncating it. Is there any other option? thanks.


Openlayers zoomToExtent pause until image is retrieved

Problem:   1. layer transition effect: resize   2. Do programmatic map.zoomToExtent() to somewhere OUTSIDE of current wms map bounds   3. OpenLayers setCenters to target bounds and zooms in.   4. While new wms image is being downloaded, OpenLayers displays 'enlarged' map   5. Once wms image is loaded, it's transitioned into map viewport Is there a way to 'prevent' OpenLayers from set-centering at #3 until wms image is downloaded ? What I want:   1. as above   2. as above   3. as above   4. OpenLayers doesn't setCenter nor zoom-in (or just doesn't update map)   5. if new WMS image is loaded, then update map.


Can a spatial View in ArcSDE be viewed in ArcCatalog?

Can a spatial view in ArcSDE created by "sdetable create view" command be viewed as feature class in ArcCatalog, or is it just another plain table? I have a feature class table and an attribute table (non spatial) stored in ArcSDE database. They can be related by a command column. I plan to create a spatial view in ArcSDE joining those tables and also publish the view as a feature service in ArcGIS Server. Is it possible? And, if the view can be published as a feature service, can feature operations such as Add, Edit and Delete Features be applied to all the view fields? Thanks for any idea! Thanks Alex


Holux GPS logger .itm fileformat

I'm looking for a spec sheet or a library to open and decompress .itm files from the Holux GPS logger. Has anyone worked with the proprietary .itm format already and can provide me with some usefull information? Thanks! Martin


I'm new in pgrouting. Is it possible to get 10 (some) ordered shortest paths ordered by distance (cost) with PgRouting (ex: SELECT TOP 10 SHORTEST)? Update: why "second shortest" needed? "second shortest" or "10 shortest path", this is the because the shortest path is not the best, for example if all people go to work with the shortest path, it will become a traffic jam, so "the shorted path is not the best". This is can be applied too with "10 cheapest path". Is this impossible? -aris setyawan


How to achieve Activity Sizing in QGIS

I have plotted 30,000+ points in QGIS by postcode, various data items for each. How do I resize these plots based on the activity at each of these points i.e. small dot for <100, larger dot for 100-200 and larger dot for 200+?


Version editing for Postgresql 9.2.4 / postGIS 2

**Background:** I am "building" a GIS with PostgreSQL 9.2.4 / PostGIS 2 as the database and QGIS 1.8.0 as the geographic application. There will be multiple users accessing, editing and viewing the data at the same time. **Question:**   1. Is version editing automatically enforced in PostgreSQL 9.2.4 / PostGIS 2?   2. Is it possible to enable/enforce version editing and if yes how? I have had a look at pgVersion for PostgreSQL 9.2.4 / PostGIS 2 and the QGIS pgVersion plugin. However, if I understand correctly (reading the help files and testing it), pgVersion only allows editing of cell values of existing columns and also no new geographic features can be added. Thanks


How to display pop up image when click point in open layer web map

I have basic WMS web map showing parcels and points layer which representing buildings of parcel.Then I want to add building images for each and every point. Then when a user clicks on a point image should appear as a pop up window. I am using OpenLayers 2.10 Beginner's Guide book and can't find any method to do the above thing. Is this possible with open layers? If so please give me some advise or some links to help me. [All layer are in WMS form and i am using geoserver and tomcat.] Thanks lot for your valuable time.


Creating shape file from file with coordinates

How can I make a shape file of an csv file with coordinates?


GeoServer WPS Aggregation Functions Example

The scenario: I want to present a user with names of polygons from a layer in GeoServer. I then display the polygon(s) whose name(s) the user selected. What I've done: I have a search box, which allows a user to enter name of a polygon they'd like to see. This works perfectly fine, even for wildcards. I've implemented it using CQL filters. What I want: Instead of a user entering a name of a polygon, I want to pull all the polygon names and display them to the user for selection. After some research, I found out that my best bet is to use GeoServer's WPS aggregation function `gs:Aggregate`. I've been looking for examples on how to use this, but no success so far. Can anyone who's had this experience point me in the right direction. I'll also be grateful for any alternative approaches. My environment: GeoServer 2.1.3, PostGIS 1.5, OpenLayers 2.11.


What are some good introductory books or articles about Open Source GIS for students coming from an ESRI background?

I am preparing an intermediate GIS course for graduate and undergraduate students who have likely not been in touch with anything but ESRI software. It is an existing course in the curriculum that I will be teaching for the first time. Currently, ArcGIS is the weapon of choice for the lab sections and practical assignments. I want to tweak the course a little to include an introduction to Open Source GIS alternatives. For now, this part of the course will only be two to four weeks (I'm thinking a kind of extended epilogue) so I won't be able to dig too deep. I hope to branch this off into a full Open Source GIS course next year, but curriculum constraints prohibit me from doing that right away. Here's some reading I have ben considering to support the Open Source GIS part of the course, to give you an idea of what I'm (not) looking for:   * The Geospatial Desktop is a book I'd love to use for a full Open Source GIS course but is too much to cover in a few weeks. The chapter 'Survey Of Desktop Mapping Software' looks like something I could use.   * The Dekstop GIS book is of similar breadth but currently out of print.   * The Grass Book seems too focused on GRASS. I think GRASS will put students with an ArcGIS mindset off. Also, I want them to learn to appreciate the breadth of the OS geospatial software spectrum.   * 'How to go from GIS novice to Pro without spending a Dime' takes a good, practical approach to delving into OS GIS, and has good links for further reading.   * A white paper from OpenGeo talking about markets for geospatial software, and how that landscape is changing. **Can you suggest other articles and / or books that would be useful to ease students coming from an ESRI / ArcGIS background into appreciating and using Open Source alternatives?**


Where can I download a free dataset containing major ports across the world?

I am working on an analysis and would like to incorporate major maritime ports from across the world. Some initial searching turned up a dataset produced by General Dynamics, however it will be prohibitively expensive. I would like to find a free dataset to use, preferably in shapefile or some other Arc friendly format. The only information desired beyond the location (point or polygon) would be the name, however even that is not required. Any help is much appreciated.


ArcObjects: Setting image of a command button to a partially transparent bitmap

In an ArcMap 10 add-in, I am attempting to create a toggle button of sorts whose image changes based on the button's state. This answer describes how to set an add-in button's image programmatically and I am using the same technique. The problem is that this method does not appear to support full alpha channel transparency, only single-color transparency, so those fancy PNG icons they added at ArcGIS 10 don't look quite right. The button's image is set initially by the add-in framework (using a 32-bit PNG file with alpha channel) -- the image looks as you would expect with proper partial transparency. To create the image toggling behavior, in the button's `OnClick` method, I check the state of a boolean variable and set the button's image (using the technique in the above-mentioned answer) to one of two bitmaps stored as resources in the add-in assembly. This all works fine except that the button's image is given a gray background instead of a transparent background. I have searched around a bit and come to the conclusion that ESRI's `GetIPictureDispFromBitmap` method converts from a GDI+ bitmap to a GDI bitmap and in doing so loses the alpha channel of the original bitmap. I have found a solution to this issue and will post it as an answer shortly.


How do I implement 'weighted' kriging in R?

I'm trying to interpolate the values of an attribute (called "disease_rate") that i've sampled at a set of spatial points and i'd like to add 'weights' to the resulting kriging estimates. Basically, I have about 1500 points (a random sample of 50 is shown below). I have an attribute vector (the rate of a particular disease) and a vector of absolute population sizes ("population"). I'd like to interpolate about 10,000 new points for "disease_rate", and at the same time weight the estimates by absolute population size (as areas with higher absolute populations have absolutely more people with the disease, and should probably have greater influence on the kriging estimates). I'm using the packages "automap" and "gstat", with the following code:               library(automap)     vgm <- autofitVariogram(disease_rate ~ 1, , input_data = dat)     plot(vgm)          kr.ok <- autoKrige(disease_rate ~ 1, input_data = dat, model = "Exp",         verbose = TRUE, maxdist = Inf)      plot(kr.ok)      I'm stuck on two points: 1) how to add the weights? Is there an argument for this within the autoKrige() or krige() functions? I don't see a way to do it. 2) when using autokrige() from the package "automap" a set of 5000 point locations for interpolated values is generated by default, by using I believe a convex hull. In "gstat", how do I get a similar sample of point locations? At the moment I'm doing this:               prediction_locations <- spsample(SpatialPolygonsDataFrame, n = 10000,         type = "regular")     prediction_locations@coords <- jitter(prediction_locations@coords)      the object "SpatialPolygonsDataFrame" is too big to include here, but provides a reference area within which to sample the points. However, I always get the following error:               "chfactor.c", line 130: singular matrix in function LDLfactor()     Error in predict.gstat(g, newdata = newdata, block = block, nsim = nsim,  :        LDLfactor      Any help/suggestions for the above two problems is much appreciated.               # sample of data (50 points)     dat <- new("SpatialPointsDataFrame"     , data = structure(list(population = structure(c(13L, 37L, 9L, 25L, 5L,      2L, 40L, 31L, 10L, 43L, 22L, 7L, 32L, 19L, 12L, 28L, 23L, 30L,      44L, 6L, 39L, 1L, 4L, 35L, 15L, 16L, 20L, 21L, 27L, 24L, 18L,      41L, 42L, 26L, 14L, 45L, 47L, 33L, 36L, 3L, 46L, 4L, 4L, 11L,      29L, 38L, 48L, 34L, 8L, 17L), .Label = c("10323", "1070", "1142",      "1218", "1226", "1228", "12858", "1583", "1619", "1645", "1737",      "1832", "1944", "2003", "2125", "2140", "2248", "273", "2816",      "2868", "2986", "3093", "322", "3338", "3707", "371", "3841",      "4151", "4184", "4189", "4198", "434", "4528", "491", "546",      "560", "65", "654", "7138", "735", "776", "82", "845", "879",      "91027", "943", "948", "989"), class = "factor"), disease_rate = c(0,      0, 154.4163064, 140.2751551, 228.3849918, 0, 0, 71.46260124,      0, 0, 226.3174911, 107.5091726, 0, 159.8011364, 0, 120.4529029,      0, 45.35688709, 227.5312856, 0, 77.59122357, 33.5322916, 0, 0,      0, 93.45794393, 239.0914525, 0, 0, 0, 0, 0, 0, 0, 0, 189.7113215,      0, 0, 0, 175.1313485, 0, 369.4581281, 0, 0, 103.5691523, 0, 0,      0, 0, 111.2099644)), .Names = c("population", "disease_rate"), class = "data.frame",     row.names = c(351L,      251L, 477L, 349L, 56L, 434L, 299L, 248L, 301L, 262L, 115L, 325L,      402L, 238L, 73L, 376L, 454L, 470L, 6L, 359L, 473L, 233L, 448L,       121L, 35L, 253L, 324L, 369L, 492L, 463L, 400L, 365L, 245L, 157L,      264L, 101L, 367L, 142L, 109L, 389L, 158L, 254L, 457L, 68L, 219L,      395L, 450L, 380L, 474L, 199L))     , coords.nrs = c(4L, 3L)     , coords = structure(c(634873.420766408, 541790.625187116, 649805.450219927,      536333.978570239, 581957.093009378, 607202.361088042, 617240.615621174,      505627.220834258, 620543.999367496, 592414.016643991, 579995.994396474,      636851.153664358, 593891.033349101, 594650.473384273, 607103.681876253,      659509.454474378, 604222.534339966, 592766.490473358, 625515.430661865,      545043.782766906, 663659.275576225, 626566.467170621, 687406.871345609,      579464.084578232, 594577.343169983, 650081.936891944, 661853.556699763,      620028.294881262, 622881.614147092, 714608.702621971, 620991.249432193,      531188.877201674, 654835.610827768, 527241.805893339, 604428.976031172,      688457.08368477, 613888.674693582, 616783.067305461, 500082.617682936,      609515.575391672, 611609.283708876, 689412.437797476, 675561.054104031,      601548.525491549, 656484.375080421, 677341.365311871, 616862.413097344,      644065.67844776, 475677.631939326, 617193.359923705, 5144526.77927643,      5328308.33322789, 5216468.95632244, 5278378.21530125, 5242407.33311755,      5107204.72128753, 5104424.13808425, 5346313.09064684, 5291125.71228228,      5260872.67506553, 5296414.86191041, 5153372.04174738, 5107141.20462901,      5126046.0142604, 5188835.84829657, 5241495.91305329, 5120799.1233737,      5077612.68066607, 5173630.04242822, 5351027.28834978, 5231260.93265272,      5321245.1139323, 5239845.72123907, 5257533.19157413, 5093198.30043019,      5176787.1924563, 5208692.02318177, 5301924.71404294, 5307513.36239273,      5170246.64046221, 5129845.77701215, 5284862.55527842, 5147875.41139468,      5295710.09388113, 5293345.39302848, 5189299.58825685, 5165031.11113162,      5136185.92439977, 5334176.39641511, 5166895.32812857, 5279273.17144778,      5236974.38111571, 5222457.79639944, 5279521.25697787, 5171514.42644342,      5244570.31251435, 5113000.12179841, 5170833.89650194, 5346485.72226854,      5068270.63886515), .Dim = c(50L, 2L), .Dimnames = list(NULL,      c("long.proj", "lat.proj")))     , bbox = structure(c(475677.631939326, 5068270.63886515, 714608.702621971,      5351027.28834978), .Dim = c(2L, 2L), .Dimnames = list(c("long.proj",      "lat.proj"), c("min", "max")))     , proj4string = new("CRS"     , projargs = NA_character_     )     )


is my open source web GIS software selection ok?

Which are the best open source tools for building a web gis application having PAN, Zoom, Query/search, Label etc options ?. I have decided to use Postgre sql for database and geoserver as middleware. I am a bit confused in selecting the software to design the GUI for the client side. I am a novice programmer , will geoexplorer be a good option or are there some other tools which can be easily customized for my work. ??


Watermarking photos using their geotag and create a shapefile

I have geotagged photographs and I would like to place a watermark of the photos location on the front for easy reference as well as creating a shapefile from the coordinates. Does anyone know of any open source software which could do this or a python or arcpy script? This link is an example of what Iam trying to acheive Thanks.


How to truncate field names to 10 characters in model builder

Apologies that I have not posted an image of my model, I am away from my computer for a while but am trying to sort this out anyways. I have a number of different animal GPS location points, and a bunch of different habitat characteristics. I have built a simple model that uses the Near tool to calculate the distance from each point, create a new field using Add Field, naming it after the habitat characteristic shapefile name (using Parse Path and inline variable substitution), and then populates that added field with the NEAR_DIST values. It then continues on for all of my habitat characteristics. I built the model a while ago and have since changed the names of the habitat characteristics (and there are a bunch of them) and unfortunately in the renaming them they are all now above the 10 character limit for a field name. What I was wondering is if there was any way to truncate the habitat characteristic shapefile title to 10 characters so that the add field tool doesn't error out. Thanks in advance, and if you need any more information please let me know. I tend to leave things out by mistake when I ask questions on here. Edit - Examples of habitat names are - 2001 Upland, 2001 Harvest, 2001 Deciduous Essentially I need to remove the year and the space and they will all be under 10 characters. Also, at home now so here is the tool I created. It runs through but doesn't successfully "Add Field" because its trying to name it after the "Near Feature" (the habitats whose names are too long) and so it just skips it. ![enter image description here](http://i.stack.imgur.com/AHEPh.png)


How to load map tiles according to the drag/touch event

We are building map apis for javascript integrated with our own map data server(tiles). (Though we can use openlayers or something else, but we can not for some thrid-part reasons). In a word, we are re-writing something like openlayers. The following is what we have done:   1. When a map is created, it will have the container(dom element),center(LatLng), and zoom . Then we will orginaize the tiles inside the container according to the center and zoom.    2. When user drag the container. We will record the increasement of the mouse position. Then caculate the new center for the map, and then re-caculate the required tiles and orginaize them.  Like this:               onMouseMove(dx,dy){       var dinx=caculateDegreeInCurrentResolution(dx);       var diny=caculateDegreeInCurrentResolution(dy);       this.center=new LatLng(this.center.lat+diny,this.center.lnt+dinx);       this.refresh();     }      It works as expected, but we found that it is hard to drag the map. It is not smooth like openlayers or other map library during the drag operation. So I wonder if we are going the wrong way?


Analyse spatial data and extract results in tabular form in QGIS

I'm sorry if this question is badly framed, I only started with GIS and QGIS 2 days ago so I don't know any terminology yet - I'll try to explain as best I can. I have 2 layers in QGIS (1.8, on Win7), one with geological information, and the other with the state boundaries. I want to get out a report which tells me the composition of each state, i.e. a table of the form:               State name    Rock type 1    Rock type 2     State1            32 %           68 %           State2             5 %           95 %           I guess this is a pretty basic thing to want to do, but I'm having trouble finding how on my own because I don't know what to search for. Sorry if bad question, thanks for any help.


How to declare ArcSDE workspace for Geoprocessing tool in ArcGIS 10.1 using ArcObjects and c#?

What is the proper way to declare an ArcSDE workspace for Geoprocessing tools in c# .net? I am using ArcGIS 10.1 SDE (MS SQL) on SQL Server 2008. I want to write code so that every night the server will fire a program and compress one of my ArcSDE databases. I thought I could do this in c# using the Compress tool in the data management namespace but have run into a snag. I am told my workspace is invalid. Esri help docs are not helpful, as they just show generic **help** and my internet search has lead nowhere. Can anyone tell me how to define an ArcSDE workspace in 10.1 in net? Right now I am using @"Database Connections\CME.sde". Here is the error: Executing: Compress "Database Connections\CME.sde" Start Time: Fri Oct 12 13:40:47 2012 Failed to execute. Parameters are not valid. ERROR 000837: The workspace is not the correct workspace type. Failed to execute (Compress). What should I type for the in_workspace? * * *               private void button1_Click(object sender, EventArgs e)             {                      Compress Compressor = new Compress();                 object in_workspace = @"Database Connections\CME.sde";                                     Compressor.in_workspace = in_workspace;                      Geoprocessor GP = new Geoprocessor();                 RunTool(GP, Compressor, null);                       }             private static void RunTool(Geoprocessor geoprocessor, IGPProcess process, ITrackCancel TC)             {                      // Set the overwrite output option to true                 geoprocessor.OverwriteOutput = true;                      // Execute the tool                             try                 {                     geoprocessor.Execute(process, null);                     ReturnMessages(geoprocessor);                      }                 catch (Exception err)                 {                     MessageBox.Show(err.Message);                      ReturnMessages(geoprocessor);                 }             }             private static void ReturnMessages(Geoprocessor gp)             {                 if (gp.MessageCount > 0)                 {                     for (int Count = 0; Count <= gp.MessageCount - 1; Count++)                     {                       Console.WriteLine(gp.GetMessage(Count));                          }                 }                  }         }


How does ArcGIS determine which transformation to use when projecting on the fly? Where this would come in would be going from NAD 83 to WGS 84. Multiple transformations could be considered so how is one picked?


ArcView 10.1 PDF and Popup

When converting your map into a PDF from ArcView 10.1, is there a way to make the PDF Map to have a pop-up when you click on a tract?


Make Openlayers request WMS tiles only within a certain bounds

Is there a way to actually tell openLayers not to request tiles out of particular bounds? I want the rest of map and other layers still accessible, so maxExtent on map is not an option for me. I just want to restrict one WMS layer to particular bounds. If view port is inside the bounds and user zooms in fine, openlayer requests new tiles! but if viewport is outside, the WMS should only fill the bounded area with tiles from that WMS layer. Does that make sense or is that even possible?


Does qgis_mapserv.fcgi segfault because ECW data is used?

I've compiled qgis from source, and when I call qgis_mapserv.fcgi in my browser with REQUEST=GetProjectSettings (and my map file set via map=) is returns the XML correctly. But if I then try to actually view a map, it seg faults qgiswebclient.html?map=/var/www/html/testmap.qgs               mod_fcgid: error reading data, FastCGI server closed connection, referer: http://www.ground2control.com/test/site/qgiswebclient.html?map=/var/www/html/GIS/Stonelees.qgs     Premature end of script headers: qgis_mapserv.fcgi, referer: http://www.ground2control.com/test/site/qgiswebclient.html?map=/var/www/html/GIS/Stonelees.qgs     mod_fcgid: process /var/www/cgi-bin/qgis_mapserv.fcgi(27652) exit(communication error), get unexpected signal 11          kernel: qgis_mapserv.fc[27692]: segfault at 0 ip 000000000043dc02 sp 00007fffa9967bf0 error 4 in qgis_mapserv.fcgi[400000+104000]      Actually, it works fine with the helloworld.qgs file supplied with QGIS. The main difference I can see is that my qgs file uses some ECW files. I've made sure that qgis was compiled with ECW support, but I wonder if that's the problem. Any ideas on how I can discover what is causing the seg fault? UPDATE: Running the mapserv CGI through GDB:               Program received signal SIGSEGV, Segmentation fault.     0x00007ffff59445a3 in qHash(QString const&) () from /usr/lib64/libQtCore.so.4          (gdb) bt     #0  0x00007ffff59445a3 in qHash(QString const&) () from /usr/lib64/libQtCore.so.4     #1  0x000000000044c2a3 in QHash<QString, QHashDummyValue>::findNode (this=0x87eac0, akey=..., ahp=0x0) at /usr/include/QtCore/qhash.h:875     #2  0x0000000000477b92 in QHash<QString, QHashDummyValue>::contains (this=0x87eac0, akey=...) at /usr/include/QtCore/qhash.h:867     #3  0x0000000000475797 in QSet<QString>::contains (this=0x87eac0, value=...) at /usr/include/QtCore/qset.h:86     #4  0x000000000045cc7e in QgsProjectParser::mapLayerFromStyle (this=0x87e9e0, lName=..., styleName=..., useCache=true) at /root/qgis/qgis-2.0.1/src/mapserver/qgsprojectparser.cpp:1365     #5  0x00000000004ae4a0 in QgsWMSServer::applyOpacities (this=0x82d4d0, layerList=..., vectorRenderers=..., rasterRenderers=..., labelTransparencies=..., labelBufferTransparencies=...)     at /root/qgis/qgis-2.0.1/src/mapserver/qgswmsserver.cpp:2045     #6  0x00000000004a2363 in QgsWMSServer::getMap (this=0x82d4d0) at /root/qgis/qgis-2.0.1/src/mapserver/qgswmsserver.cpp:674     #7  0x000000000043eb60 in main (argc=1, argv=0x7fffffffe5a8) at /root/qgis/qgis-2.0.1/src/mapserver/qgis_map_serv.cpp:533


Trying to compile QGIS but it complains it can't find QGIS library

I'm trying to compile QGIS in Windows7 with a MSYS, with the objective of making a QGIS Windows App using the API. I am using this document. I'm using CMake-GUI and it gives the error > Warning Target "qgis_core" requests linking to directory "c:\OSGeo4W\bin". > Targets may link only to libraries. CMake is dropping the item.] Screenshot I think its looking for qgis_core.lib, but I don't think it exists because I want to compile it... so this error makes no sense to me.


How do you auto populate a field when a new point feature is digitized?

Is there a way to populate a field automatically when a new point is dropped on the map? We have our map in State Plane Feet, and we want to the database to automatically add WGS xy coordinates to fields in the table when a new point is added. Something like a calculated field, but always there? Forgive me if this is basic, as I am an systems admin and google has not helped me.


How to move line segment to certain direction using ArcGIS for Desktop?

How can I move a Line Segment to a certain direction? In my case i want to move the Line up north, so i need to change the y-coordinate somehow, I'm just not sure how to do this in ArcMap. Im using ArcGIS 10.1


Giving properties to Zoomify layers in OpenLayers?

I am using `OpenLayers.Layer.Zoomify` to show large image files and this works like a charm. The only thing is that I would like to add some options to that layer ( opacity and transitionEffect) but it doesn't seem to work. Code:               var zoomify = new OpenLayers.Layer.Zoomify( "Zoomify",       zoomify_url,        new OpenLayers.Size( zoomify_width, zoomify_height ),       { opacity: 0.5, transitionEffect: 'resize'}     );      Isn't this the right way of doing it? Or is it not possible to add these properties to Zoomify layers? Nothing happens to my zoomify layer.


ArcGIS field calculator: VBScript get data from previous row

When using the field calculator, how do I get data from the previous row in VBScript? In Python I'd do something like this:               for index, row in enumerate(rows,start=1):         row[index-1] += 5      I'm using ArcGIS 9.3.1. Let's assume I have a column `[Distance]` and all it's rows are `0`. How do I increment every row with 5 starting at row 1. So the first row remains `0`, second row'll be `5`, third `10` and so on.


Looking for good load testing tools to test my web GIS

I am looking for good load testing tools to test my web GIS which runs on Apache/ESRI AU's Dekho application (Flash based, so would require AMF support within the load testing tool). I am currently working SoapUI/LoadUI, but I am having a tough time creating steps for it, as there are numerous AMF calls from the client to the server. Some calls even have multiple calls embedded into it. Has anyone used any load testing tool with GIS? Many Thanks   Ujjwal


Automated/geoprocesing tool to slice, clip, or cut polygons using polylines using ArcGIS Desktop?

Looking for a simpler method here. I am trying to split up / cut / slice existing polygons by using existing poly-lines. An example would be splitting a water body or land parcel at the point where a bridge/road crosses it. But the road network may not necessarily result in a closed loop. Since the poly-lines are not necessarily interconnected or continuous, creating a polygon from them is not an option (which eliminates using the split tool). Also, I have tried using a topology with the geometry, but it keeps failing, probably due to the large/complex geometry. Current Workflow: I have accomplished this with the Feature to Polygon tool, combining the lines and polygons together, but it creates additional unwanted polygons anywhere a loop closes. I created a mask of the original polygons, and used this with the overlay->erase tool to remove the unwanted polygons. This still leaves some unwanted geometry (mostly slivers), but is somewhat workable. This seems like an extremely convoluted and round-a-bout way to accomplish (what seems like it should be) a very simple task. Other than manual edits, or using a topology, is there is tool that could accomplish this in a single step? Using: ArcMap \ ArcInfo Desktop 10 SP5 Edit 1: In my case, it is not actually roads as mentioned above. I have water polygons for a coastal area, and need to split the polygons where rock dams or levees have been put across the waterways. Which are typically not interconnected. The water polygons have been simplified and repaired, to the point where I would no longer call the data "dirty" just complex and large. But I've got the workaround mentioned above working for this case. I'm looking more "in general" for a tool that can simply divide polygons using polylines. Edit 2: Mapperz:Thanks for the Model Builder suggestion. I am going to use that as a stop gap solution, for now. Jakub: Thanks for the suggestion. I'm not opposed to a programmatic solution or developing a custom tool, although I've never made one before. I have programming experience, but not in conjunction with Arc. I'd prefer something that directly cuts the geometry though, instead of following the roundabout logistics above. In theory that should reduce resultant gaps, since it wouldn't be subject to multiple iterations of cracking/clustering. Although, I'm not sure that would be as easy or even possible. Edit 3: I'm looking for something to function like on the left in the image. ![Cut Polygon vs Feature to Polygon](http://i.stack.imgur.com/t7zeX.png)


Trilateration 3D - Vincenty's Formula

with reference to Trilateration using 3 latitude and longitude points, and 3 distances. The accepted answer was votes as shown in wikipedia at: http://en.wikipedia.org/wiki/Trilateration in conjunction with a conversion to Radians before and after. Is there a way to incorporate Vincenty's formulae http://en.wikipedia.org/wiki/Vincenty%27s_formulae to this process to bring a more accurate answer? Kind Regards


Holding and using Romanised names with Diacritics

I have two True type font files (Permanent Committee on Geographical Names) PCGNA.TTF AND PCGNTN.TTF. The romanised diacritics are well read in MS excel. But when I convert this excel in shp or pgdb feature class, it becomes unreadable. Does anyone know how to overcome this problem?


Write string to status bar that doesn't go away

I'm attempting to write the number of items matching a given query to the statusbar. when i debug through the code, i am able to step through and see the message hit the statusbar, but then it immediately disappears. Below is the function in question.               public class CollisionViewExtension : Extension     {          private static IQueryable<Collision> AllCollisions         {             get { return _allCollisions ?? (_allCollisions = Database.Query<Collision>(Collision.Query).ToList().AsQueryable()); }         }         ...         public static void DrawCollisionPoints(string whereClause)         {             var matches = new List<Collision>();             try             {                 matches = AllCollisions.Where(string.IsNullOrWhiteSpace(whereClause) ? "1=1" : whereClause, null).ToList();                      if (CurrentSpatialQueryShape != null)                 {                     matches = matches.Where(x => IsPointInPolygon(CurrentSpatialQueryShape, (IPoint)x.Point)).ToList();                 }             }             catch (Exception)             {                 System.Windows.Forms.MessageBox.Show("Invalid query");             }                  FeatureInserter.InsertFeatures(matches);                  var layer = new FeatureLayerLocator(ArcMap.Document.FocusMap).GetFeatureLayerByModelName("CollisionView-Collisions");             if (layer == null)             {                 ArcMap.Document.FocusMap.AddLayer(FeatureLayer);             }                  ArcMap.Application.Caption = string.Format("{0} collisions", matches.Count);             Application.DoEvents();             ArcMap.Application.StatusBar.set_Message((int)esriStatusBarPanes.esriStatusMain, string.Format("{0} collisions", matches.Count));                  ArcMap.Document.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeography, FeatureLayer, null);             ArcMap.Application.StatusBar.set_Message((int)esriStatusBarPanes.esriStatusMain, string.Format("{0} collisions", matches.Count));                  CurrentQuery = whereClause;         }         ...     }      I feel like this is pretty much how I've seen it used in all the examples, but for some reason my message is not displayed. Asked another, probably simpler way, is there any way to show the user a count of the features in a particular layer in the statusbar?


View PostGIS geometry in QGIS

I am a newbie to GIS systems so please be patient. I have a PostGIS database set up with a spatial data table. One of the columns is of Geometry type and contains Points with SRID 4326. I want to view these points overlaid on a map. I can connect to PostGIS from QGIS, load the points as a PostGIS layer and using the OpenLayers plugin also overlay these on a map. The trouble is, it appears that the latitude and longitudes are reversed when displaying them in QGIS! When I connect to the database from command line and use the SELECT query with ST_ASTEXT on the geometry column, I can see that the lat longs are in correct order. Any suggestions or pointers on what might be the problem?


How does Flow Mapper Plugin work?

I downloaded the Flowmapper plugin for Qgis and I can't seem to find any information on how it is supposed to work... Also the text seems to cut-off and not fully showing for the input fields so I'm not quite sure what the fields should be anyway... Here is an example of what I mean: ![enter image description here](http://i.stack.imgur.com/vGwBC.png) I tried to select a file storing my node coordinates but am not allowed to (greyed-out) pick files that are .csv, .dbf, .shp or seemingly any of the filetypes on my computer... Which is why I started looking for some information on how to use the Flow Mapper plug-in, after finding nothing descriptive I thought it would be easier to ask someone who has maybe used it successfully before. For reference I have a point file of centroids of polygons and I have a collection of lat long points which contain an attribute that should connect them to one of the above mentioned centroids. Maybe there is a better way to do this? QGIS 1.8.0 on Mac Thanks


Create Shapefile of all overlapping features from single Shapefile

I need to create a Shapefile out of another Spahefile that consists all overlaps of features within the initial Shapefile. I'm sure there is a simple solution using ArcMap or QGIS, but at the moment I am just lost and somehow I struggle to find something via search engines although I am aware that this question must have been asked a thousand times. The screenshot shows the desired result. My new Shapefile should only consist the darker parts independent on the number of overlapping features. ![enter image description here](http://i.stack.imgur.com/4QE3b.jpg)


Problem with encoding of CSV and SHP files in Linux

I am new to using QGIS. I came up against the encoding issue of shp files. This solution to solved my problem in Windows (for source I had to put windows-1253 instead of utf-8) My question is what solution would I use in Linux systems where I have the very same issue? Where can I "insert" a similar choice?


python - Calculate field with part of file name

So I previously successfully used the sample code here: Model Builder - How to calculate Field using part of filename               # Import standard library modules     import arcpy, os, sys     from arcpy import env          # Allow for file overwrite     arcpy.env.overwriteOutput = True          # Set the workspace directory      env.workspace = r"C:\temp.gdb"           # Get the list of the featureclasses to process     fc_tables = arcpy.ListFeatureClasses()          # Loop through each file and perform the processing     for fc in fc_tables:         print str("processing " + fc)              # Define field name and expression         field = "SID"         expression = str(fc[:5]) #subsets first 5 characters of fc name              # Create a new field with a new name         arcpy.AddField_management(fc,field,"TEXT")              # Calculate field here         arcpy.CalculateField_management(fc, field, "expression", "PYTHON")       But now I'm running it again, with no changes, even with the same datasets I used before, and it no longer works. I cannot see how or why it errors out. Error message: > Runtime error : ERROR 000539: Error running expression: expression : name > 'expression' is not defined Failed to execute (CalculateField). Help!?!


Need help assigning values to field using OGR in python

I've got a similar question to this one How to programatically populate a shapefile field with polygon areas in OGR?, but the solution doesn't seem to be working for me. I am trying to import a shapefile from PostGIS into python using OGR, add a field, then populate the field with data from a csv based on an ID and the date. When I print the fields for the feature during the loop, the field gets the correct data but it isn't writing to the layer o3_proj (last two print statements). Am I using the SetFeature function incorrectly? I'm new to PostGIS and ogr, so please speak slowly!               import os, ogr, gdal, csv     driver = ogr.GetDriverByName('PostgreSQL')     datasource = driver.Open("PG: host='localhost' port='54321' dbname='chicago' user='postgres'", update = 1)          o3_proj = datasource.GetLayerByName('o3_monitors(geom3528)')          date = []     maxozone = []     aqi = []     aqs_site_id = []          f = csv.reader(open('/ozone/ozone_data.csv','rU'))     x = list(f)          for iii in range(1,len(x)):         date.append(x[iii][0])         aqs_site_id.append(x[iii][1])         maxozone.append(float(x[iii][2]))         aqi.append(int(x[iii][3]))          daily_field = ogr.FieldDefn('temp_o3',ogr.OFTReal)     o3_proj.CreateField(daily_field)          for feat in o3_proj:         for jjj in range(0,len(date)):             if aqs_site_id[jjj] == feat.GetField(0) and date[jjj] == '03/06/2005':                 o3_proj.SetFeature(feat)                 feat.SetField2(6,maxozone[jjj])                 o3_proj.SetFeature(feat)                             print str(feat.GetField(0))+','+str(feat.GetField(1))+','+str(feat.GetField(2))+','+str(feat.GetField(3))+','+str(feat.GetField(4))+','+str(feat.GetField(5))+','+str(feat.GetField(6))                 print o3_proj.GetFeature(feat.GetFID()).GetField(6)      Result of the print statements:               17-031-0064,41.79079,-87.60165,2001,2012,None,0.036     None     17-031-0076,41.7514,-87.71349,2004,2012,None,0.038     None     17-031-4007,42.06028,-87.86323,2002,2012,None,0.035     None     17-031-4201,42.14,-87.79922,2001,2012,None,0.031     None


How to get the coastline from OSM?

I've successfully imported all data for Sweden to my PostGIS database. Right now I'm designing my map in Tilemill with OSM Bright as base. But I've got a major problem: where is the coastline? Right now all the roads and buildings are on the water. I've looked through all three `landusages` tables, and the only relevant geometry types are `land` and `island`, but they aren't what I expected. I'm a GIS rookie, so any help is appreciated. :-)


Locating 0-points multipart polygons using arcpy

By Running this piece of code:               import arcpy     arcpy.env.workspace = "C:\working\GEODATABASES\\tests.gdb"     fcList = arcpy.ListFeatureClasses()     for fc in fcList:         with arcpy.da.SearchCursor(fc, ("OID@", "SHAPE@")) as cursor:         for row in cursor:             print("Feature {0}".format(row[0]))             print "   " + str(row[1].partCount) + " parts for THIS PARTICULAR FEATURE"             for part in row[1]:                 poly = arcpy.Polygon(part)                 print("   Points {0}".format(poly.pointCount))        In theory I am able to list all polygons for a particular feature class and list whether they are multi-part polygons or not. In addition, it shows the number of points per feature part. HOWEVER, it does not do the job properly as I am dealing with a complicate feature class that actually have more feature parts than the script can identify. Even in some of them, it does not obtain the right number of points per part either. By using the OLD reading cursor system in arcpy (not the above one), I get in some polygons a different number of points, but still there are some of them missing, therefore the script cannot access to them. Why is that this script stops counting either points or parts sometimes when entering a multipart-polygon within my feature class? Is it my code not well tuned for complicated multi-part polygons? Thanks,


How to install Proj4js.js in my localhost directory?

I'm developing a GIS website for vineyard management. I am using Openlayers with the WMTS IGN (French institute for geography) datas. It works fine. I also would like to add the possibility for the user to switch to a geology map provided by the BRGM (geological french institute) geoservice. The issue is that IGN datas avec in Webmercator projection (EPSG:3857) and BRGM datas avec in EPSG:27572 (NTF (Paris)) and i would like to keep map center and bounds while switching from one to the other one. After reading a lot on the internet, i found i needed to use Proj4js for projection transformation. I also have vestor shapes (vineyard fields) and i would need to visualize in both projections by transforming them. I am quite used to implement js librairies (by copying js files in my localhost and include it in the header of my php/html file) but in the case of proj4js, it looks different. The gituhub page only gives this information for installation :               npm install proj4     bower install proj4     jam install proj4     component install proj4js/proj4js      I have no idea how it works and i can't get any clear information from what i read. In the github files, there is no proj4js.js file... Is there somewhere a clear tutorial for installation ? Does someone have experience on this installation ? I tried a "classical" installation downloading 1.1.0 from this link http://download.osgeo.org/proj4js/proj4js-1.1.0.zip but it seems to be an old version and i'm getting errors with the test code below : "lcc:forward: llInputOutOfRange: NaN : NaN" Here is my test code :               <head>          <script src="js/proj4js/lib/proj4js-compressed.js"></script>     <script src="js/proj4js/lib/defs/EPSG3857.js"></script>     <script src="js/proj4js/lib/defs/EPSG27572.js"></script>     <script src="http://openlayers.org/api/2.13.1/OpenLayers.js"></script>          </head>          <body>          <script type="text/javascript">               var source = new Proj4js.Proj("EPSG:3857");     var dest = new Proj4js.Proj("EPSG:27572");          Proj4js.reportError = function (msg) {         throw new Error('Whoops: ' + msg);     };          var position1 = new OpenLayers.LonLat(0, 5700000);              console.log(source);         console.log(dest);         console.log(position1);              console.log(Proj4js.transform(source, dest, position1));               </script>               </body>      Thanks a lot, Vincent


Does OSM data contain the direction of travel?

I was looking for **Direction of Travel (DOT)** information inside OpenStreetMap shapefiles, but only I've just found **"ONEWAY = 1 or 0"** , but nothing about its direction. If I work on an OSM editor, I can see its arrows which declare its direction. But as you can see, once downloaded as Shapefile type, there is no DOT information about. thanks for your time, ![OSM Metadata](http://i.stack.imgur.com/k0osF.png)


Is there a way to use the old command line in Arcgis10?

I know that the command line has been replaced by the python window, but I was just wondering if there is any way to use command line within Arc 10? Thanks


Is there a way to configure ArcMap to persist the HTML popup window size?

I'm specifically asking for when the "Display HTML formatting" is configured as "As a table of the visible fields.", but I think all options behave the same way. My users click the HTML Popup tool![alt text](http://i.stack.imgur.com/5KWDh.png), click the feature on the map to display the HTML popup window, and resize the window until the get the desired size. If they close that window, and repeat the steps...the windows reverts back to the original size and they must resize each time. They feel, and I agree with them, that the window should open up to be the same size as when it was closed. Is this an ArcMap configuration? Or is there a registry value? Is there a way to affect window size if you format using an XSL template?


Visualization to inference workflow

I provide statistical support for a public health department. As you might imagine, we put together a lot of maps on a regular basis. For me, maps are just another kind of data visualization - useful for getting a feel for the data, for generating and checking hypotheses, etc. But we don't often follow through on actual modeling and hypothesis **testing**. How do you/your organization go about this? What does a workflow that includes inference look like? Who's involved? What tools do you use? What would it _ideally_ look like, if you had your way? Thanks! **EDIT** To be clear, I'm curious about different strategies for going from spatial data to formal, statistical tests of hypotheses about what's going on in the world. For example, let's say I'm trying to target an educational campaign to increase tuberculosis testing. I (personally) would map out the cases of TB against covariates of interest (say, median income or percent foreign-born residents) and try to see if there were any patterns. I might or might not find any; but I would ultimately build a model to estimate the association between those covariates and the number of demographics. This is a critical step because of how good humans are at finding patterns where none exist, or finding uninteresting ones. I know how to do this on my own, but I'm curious about how different organizations institutionalize it (if at all).


Convert between ESRI Geometry and WKT

It seems like there is no means of converting an ArcObjects geometry to the Well-Known Text representation (and vice versa) in ArcGIS ArcObjects API. The only thing I was able to find is conversion to WKB (the IWkb interface). Is there a way to perform conversion between geometry objects and WKT or do I have to implement it myself? I primarily aim for .NET implementation without much external dependencies. Thanks.


Creating visualizations for geometry points with geotools

I am a beginner in everything that involves GIS coding and so on. After doing some research i chose Geotools as the tool to help me with my project. Basically i will need to create a new routing algorithm that will get as an input the coordinates of two points : start and destination and a shape file. I have followed the tutorial from geotools, creating a graph etc but when i want to do a simple visualization of lets say the nodes that i have after the graph creation, for the life of me, i do not find a way to do so. Would it be possible for you to point me in a direction that could solve this mystery for me ?


Read an INSPIRE GML in QGIS2.0 : gml:xlink resolving

I'm trying to read an INSPIRE GML, which countains internal and external links between the elements. I saw on the GDAL site that we can set environnement value in order to load this link in QGIS (http://www.gdal.org/ogr/drv_gml.html) but it seems it doesn't work on this QGIS version. The impacteds lines look like this one: Do someone have some experience in integration of this type of model? Thank you!


Free land use data for Manhattan

Does anyone know where I can get free land use data for Manhattan? I'm specifically looking for fraction of residential, commercial and other landuse data for each census tract for the New York County. I did search the NYC - Bytes of Big Apple website and found that they charge an appalling 300$ per borough for the land use at tax lot level. Any help is greatly appreciated...


Anyone try generating C# classes from http://schemas.opengis.net?

I'd like to generate gml/wfs/wms classes from the OGC schemas. Using xsd2code I receive numerous errors, one of them being "Invalid particle derivation by restriction". I'm curious is anyone has successfully generated .NET classes from the OGC schemas and if so, how?


Java library for rendering

We have some shapefile data and we tried to render them according to scope (boundingbox) from user. For example, the client may send request like this: layer=river&width=256&height=256&bbox=.... Then I will generate an image accordingly. I know this is simiary to a wms server, however I do not want to use geosever or something else. They are heavy. I just have 2 shapfile files with a fixed style. And I found that geoserver use geotools as the render library, so I tried to use geotools myself, however I found that geotools do not provide a accept performance. So I wonder if there are any alternative solutions?


In QGIS are there similare construction tools to ArcGIS?

For a project we are using ArcGIS to reshape autogenerated features. For that we often use the construction tools polygon, rectangel, circle, etc in ArcGIS. The right angle is also an often used tool. Are there some similar construction tools in QGIS? I found the CADTool-plugin and the Freehand- plugin, but that seems not to be the best solution.


How does IP geocoding work?

I'm trying to understand how using each part of an IP address influences the accuracy of geocoding. For example, if `15.201.xxx.xxx` is used instead of `15.201.123.xxx` what is the approximate distance in KM? I'm using the IP2Location Lite database to examine who has visited a website. The `README` states the following: `1\. IP2Location Lite Edition is free package with accuracy up to Class C (192.168.1.X) only. It is restricted for non-commercial use.` However, I'm having difficulty finding documentation on what the accuracy of this actually means. Does this accuracy vary over time also?


How to create svg line style in QGIS?

I need to draw an telephone or energy lines as is done on the polish-core map. Thelephone line was drown by the polyline. I tried the SVG symbols, when I have a lot of single-lines, for each I 'put' symbol svg on the first and the last vertex. For polylines, unfortunately, line markers located on the central vertexs do not rotate to the next segment, but are suspended 'in the air'. If someone has already tested this, I'd like to know the rules. I enclose a snapshot of my unsuccessful endeavors. ![The effect of mine line style](http://i.stack.imgur.com/s8edC.png) And below is the effect that I need, ( _now its generated by Inkscape_ ) ![The effect that I need](http://i.stack.imgur.com/i9iJ9.png) Thanks for the reply.


How to use PostgreSQL/PostGIS with ArcGIS for Desktop?

Has anyone successfully used PostgreSQL with PostGIS successfully? I am a semi-experienced ArcGIS user and want to build out a database and connect it to ArcCatalog. I've scoured the internet for resources but nobody has really given a good walkthrough. Any help would be much appreciated!


How to upgrade php version for mapguide server

I am using mapguide server 2.0 . It has PHP version 5.0.I want to use sqlite database3 but it doesn't support sqlite3. Does any one know how to upgarde php version manually? or way to convert sqlite3 database to sqlite2?


Hiding layers in mapfile (Mapserver) from WMS requests

We have a Mapserver mapfile used in a web app with a lot of layers. We want to publish only some of them with WMS, keeping the others hidden to any WMS request. It has to be the same mapfile and we need each layer has its NAME attribute specified Is there any way to do this?


What is the GeoCloud that everyone is talking about

Directions Magazine, Pitney Bowes (MapInfo), and many blogs are talking about 'CLOUD's in relation to GIS. I have read about Cloud-Computing but still don't understand the concept.


How to create a smallest quadrilateral concave polygon around GPS points?

I have this GPS track in a metric grid (Symbology by elevation, if anyone wonders): ![GPS track](http://i.stack.imgur.com/QmhiZ.png) I need to define it's general area - for registrations and permits, with just 4 points. Therefore, I assume that the corners of a circumscribed quadrilateral polygon (4 lines) will do, as that will be the smallest possible polygon area-wise. I don't know which Arcmap tools I can use to do it, though I imagine the result should look something like this: ![enter image description here](http://i.stack.imgur.com/t81qi.png) With a polygon I can easily know the corners' coordinates, but if there's another way to extract them, I'm all ears. Thanks in advance. **Edit:** This is the resulting convex hull tool: ![enter image description here](http://i.stack.imgur.com/OnTTI.png)


Handling XML from within ArcGIS

In my company, there is a web service that serves geographic data stored in a remote dababase through an URL. This service makes queries to the database and encodes the required data in XML format. So, to query data from a table (for example **User** ), I do something like: `http://myCompanyName/service/QueryUserTable` So the service returns back to the client's browser a XML with all users stored in that table. Now, I would like to do the same from ArcGIS software: The thing would be connect this desktop application to that remote service, retrieve that XML file and parse it **but all inside ArcGIS environment** , not using other scripts or programs outside it. Is it possible? :S Just in case it is not possible to do what I said, what is the best approach to handle and manage traffic in XML using ArcGIS? I am sorry if I posted in the wrong place or this was answered before, the problem is that I wasnt sure what to ask to Google/Stack Exchange to obtain a good answer. Thanks! :D * * * WOW! It is a good idea and I like the way of retrieving the parameters like this long link you pasted. Didn't know about that module since I am pretty new with ESRI software. But there is **another constraint** I did not mention in my first post. As the company is big, there is another "handicap" or problem: At this beginning stage I will have no control over the remote service, **another developers group will "decide" how to encode the data**. I mean, I think I cannot decide if the remote service is SOAP or not, REST or not and therefore, I don't know the XML tags they will use for the encoding. Maybe I can use the module you mention to connect to the service but **I am not sure how data will be served** on the other counterpart... I guess I will be told the general schema of the files, and then I have to try to connect ArcGIS to that remote service and prepare some scripts to parse the incoming XML and allow non-IT users to use it in their layers... Does it make sense? What do you think? It is a bit difficult to explain! :D Thanks for your response and ideas!


Are there any Geospatial OData Feeds?

I see that OData V3 has support for geospatial types. Has anyone published a feed that uses the new geospatial data types? ![enter image description here](http://i.stack.imgur.com/nIVW3.jpg)


Get polygons inside a polygon

I have developed a tool in arcobjects on Visual studio 2010, the tool works fine but once installed my ArcMap drawing the map (refreshing) and printing slows down.. I have used `ITopologicalOperator` in the program. Should I release any `com objects` here if yes what object should I release Please guide.


Displaying OSM file with markers

I'm trying to show OSM file which I exported from openstreetmap api. However, layer I add with OSM file is displaying like just polygons, I cannot show markers (street names, names of buildings etc.) in the map. Here is the map I'm seeing. ![showing like polygones](http://i.stack.imgur.com/uCXaF.png) And here is my openlayers init function.                       var lat=18.9003124; //changed due to company policies.             var lon=30.7738127; //changed due to company policies.             var zoom=15;             var map;                  function init(){                 map = new OpenLayers.Map ("map", {                 controls:[                     new OpenLayers.Control.Navigation(),                     new OpenLayers.Control.PanZoomBar(),                     new OpenLayers.Control.LayerSwitcher(),                     new OpenLayers.Control.Attribution()],                     maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),                     maxResolution: 156543.0399,                     numZoomLevels: 19,                     units: 'm',                     projection: new OpenLayers.Projection("EPSG:900913"),                     displayProjection: new OpenLayers.Projection("EPSG:4326")                 } );                           map.addLayer(new OpenLayers.Layer.OSM());                 map.layers[0].opacity = 0;                      var lonLat = new OpenLayers.LonLat(lon, lat).transform(new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:900913"));                      map.setCenter (lonLat, zoom);                      //Initialise the vector layer using OpenLayers.Format.OSM                 var layer = new OpenLayers.Layer.Vector("Polygon", {                     strategies: [new OpenLayers.Strategy.Fixed()],                     protocol: new OpenLayers.Protocol.HTTP({                         url: "mymap.osm",   //<-- relative or absolute URL to your .osm file                         format: new OpenLayers.Format.OSM()                     }),                     projection: new OpenLayers.Projection("EPSG:4326")                 });                      map.addLayer(layer);      What am I doing wrong?


R: distance from one point to many polygons

OK so I have a spatial polygons data frame, and I have a point of interest. I want to add a row to the SPDF that contains the distance from the centroid of each polygon to this given point. How do I do this ? Here is a toy dataset:                   library(sp)         library(spdep)         library(rgeos)              # Create toy SPDF         fn <- system.file("etc/shapes/eire.shp", package = "spdep")[1]         prj <- CRS("+proj=utm +zone=30 +units=km")         eire <- readShapeSpatial(fn, ID = "names", proj4string = prj)              # Create a point of interest         pt.coords <-readWKT("POINT(260 5900)")         eire.proj<-CRS(proj4string(eire))         proj4string(pt.coords) <- eire.proj              # check point is on the map         plot(eire)         plot(pt.coords, col="Red", add=TRUE)      Ok so the SPDF data has following columns:                   > names(eire)        [1] "A"       "towns"   "pale"    "size"    "ROADACC" "OWNCONS" "POPCHG"  "RETSALE" "INCOME"  "names"        I want to add a extra column showing the distance from each polygon **_centroid_** to the point we defined. How do I do this ?


How to make marker line thicker in QGIS?

I'm mapping railways, find that the usual cross marker line is so thin it doesn't show up in Print Composer at web resolution, and can't find any way of making it thicker, only the main line. Is there a way in the just released 2.0? If not, how do I do it in 1.8? My System is QGIS 1.8.0 on OSX 10.6.8


How to mark a particular point in MapPanel?

There is a component called MapPanel, which displays OpenStreetMaps. I want to mark some places on the displayed map, without changing the underlying map. Those marked places are identified by latitude and longitude. In order to implement this, I wrote following class, which should convert latitude and longitude to pixel coordinates.               @Override     public Point convert(double aLatitude, double aLongitude, Rectangle bounds) {              final Point pointInMapUnits = mapPanel.computePosition(new Point.Double(aLatitude, aLongitude));              Point mapCenter = mapPanel.getCenterPosition();         Dimension mapSize = mapPanel.getMapSize();              final Rectangle panelSize = bounds;         final Point2D.Double panelCenter = new Point.Double(panelSize.x + panelSize.getWidth()/2,                 panelSize.y + panelSize.getHeight()/2);              final double ourObjectXFromMapCenterInMapUnits = pointInMapUnits.getX() - mapCenter.getX();         final double ourObjectYFromMapCenterInMapUnits = pointInMapUnits.getY() - mapCenter.getY();              final double ourObjectXFromMapCenterInPixels = convertToPixelsX(ourObjectXFromMapCenterInMapUnits, panelSize,                 mapSize, mapPanel.getZoom());         final double ourObjectYFromMapCenterInPixels = convertToPixelsY(ourObjectYFromMapCenterInMapUnits, panelSize,                 mapSize,mapPanel.getZoom());              final Point result = new Point((int)(panelCenter.getX() + ourObjectXFromMapCenterInPixels),                 (int)(panelCenter.getY() + ourObjectYFromMapCenterInPixels));              return result;     }      But it doesn't work as following screenshots illustrate. Step 1: Map is centered at the point in question (132.18381, 43.35514). That place is marked by a red dot. ![Image 1](http://i.stack.imgur.com/xmuNP.png) Step 2: Now we scroll the map so that the marked place is located to the left of the position in step 1. The blue dot shows where the red dot should be. ![Image 2](http://i.stack.imgur.com/77i0y.png) Step 3: Now we scroll the map so that the marked place is at the top. Again the blue dot shows the expected position of the red dot. ![Image 3](http://i.stack.imgur.com/NdiPe.png) Here's a video of the process. You can find the code here. How can I change it, in order for the dot to always be displayed at the point (132.18381, 43.35514) ?


Python: How to create a Polygon Shapefile from a list of X,Y coordinates?

I have a list of X,Y coordinates from a csv file, that represent a polygon. I´m trying to create a Polygon-Shapefile from this list. I´ve been trying around and found a possbility to write the list to a Point-Shapefile. Unfortunately that is not enough for me. Is there any way to get the coordinates in a Polygon-shapefile straight away? Following Brad´s suggestions I tried the following code:               for i in list:         w = shapefile.Writer(shapefile.POLYGON)         w.poly(parts=[list])         w.field('F_FLD','C','40')         w.field('S_FLD','C','40')         w.record('First','Polygon')         w.save('C:/Users/.../Desktop/Shape')      Unfortunately I´m getting an error message:               ShapefileException: Failed to write shapefile bounding box. Floats required.      Looks like there is a problem saving the shapefile to disk. This seems to be a similar question, but I couldn´t work out, how to get it going in my case.


Custom ArcGIS GraphicsLayer (JavaScript)

I am working on an application that will retrieve data from various sources and construct ESRI GraphicsLayer objects from the data and display it on a map. I have created custom FeatureLayers before but this project requires the use of GraphicsLayers because I need to be able to toggle the visibility of layers. The code below fetches the data from the host and puts it into a GraphicsLayer.               define(["dojo/_base/declare", "dojo/_base/array", "dojo/request", "esri/graphic", "esri/geometry/Geometry", "esri/InfoTemplate"],            function (declare, array, request, Graphic, Geometry, InfoTemplate) {         return declare(null, {           getAllCurrentReadings: function () {             var rtn = [];             var stations = ["S", "SN", "AN", "UP", "GR", "PL", "SR", "J", "N", "FL"];             array.forEach(stations, function (item, i) {               request.post("includes/buoybay_proxy.php", {                 data: {                   "method": "RetrieveCurrentReadings",                   "params": "CBIBS," + item + ",113f8b...f27e0a0bb" // NOTE: id: 1 is necessary as well but is added manually by jsonRPCClient                 },                 sync: true,                 handleAs: "json"               })                 .then(                   function (response) {                     var gfx, attr, t;                     //console.log(response);                     // Now build the Graphic Object and push it into rtn                     gfx = new Graphic();                     gfx.spatialReference = {                       wkid: 102100                     };                          // Define attribute object                     attr = {};                     attr["station"] = response.station;                     attr["title"] = translateStationID(response.station);                     for (var j = 0; j < response.measurement.length; j++) {                       attr[String(response.measurement[j])] = response.value[j];                     }                     gfx.attributes = attr;                          // Define geometry object                     gfx.geometry = new Geometry(gfx.spatialReference, "point");                     gfx.geometry.spatialReference = {                       wkid: 102100                     };                     gfx.geometry.type = "point";                     t = esri.geometry.geographicToWebMercator(new esri.geometry.Point(attr["longitude"], attr["latitude"], gfx.spatialReference));                     gfx.geometry.x = t.x;                     gfx.geometry.y = t.y;                          // Define infoTemplate object                     gfx.infoTemplate = new esri.InfoTemplate();                     gfx.infoTemplate.setTitle(attr["title"]);                     gfx.infoTemplate.setContent("${*}");                          // Define symbol                     gfx.symbol = new esri.symbol.PictureMarkerSymbol("../images/marker.png", 15, 15);                          //console.log(gfx);                     rtn.push(gfx);                   },                   function (error) {                     console.log("Error: " + error + "\n");                   }               )             });             //console.log(rtn);             return rtn;           }         });       }     );      This code seems to construct the GraphicsLayers properly but when I add them to the map object no points are displayed on the map. The code I use to add them to the map object is below.               require(["dojo/parser", "dojo/_base/array", "dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dojo/ready", "esri/map", "esri/layers/ArcGISTiledMapServiceLayer", "js/cbibsGfxModule", "dojo/domReady!"],         function(parser, array, BorderContainer, ContentPane, ready, map, ArcGISTiledMapServiceLayer, cbibsGfxModule) {             var Map, cbibs, gfxLayer, t = [];             function init() {                 Map = new map("mapDiv", {                   basemap: "oceans",                   center: [-77.0357, 38.7877],                   zoom: 7                 });                 dojo.connect(Map, "onLoad", displayData); // Map didn't load until 3rd arg was a function name; why?                      function displayData() {                     cbibs = new cbibsGfxModule();                     t = cbibs.getAllCurrentReadings();                     gfxLayer = new esri.layers.GraphicsLayer();                     array.forEach(t, function (item) {                         gfxLayer.add(item);                         Map.graphics.add(item);                     });                     gfxLayer.spatialReference = {                         wkid: 102100                     };                     //Map.addLayer(gfxLayer); // Add GraphicsLayer to Map object                     console.log(Map); // Custom GraphicLayers are under _layers                 };             };             dojo.ready(init);         }     );      I realize that `gfxLayer.add(item)` and `Map.graphics.add(item)` are somewhat redundant but even with the data in two locations in the Map object the points are still not displayed on the map. I've been working on this for some time now and I really am fresh out of ideas. Any help anyone could offer would be greatly appreciated. Thank you.


Problem creating a popup in mobile openlayer

I'm trying to use the mobile version of openlayer, unfortunately I could not use framedcloud in it, I could only create a square popup does not look very aesthetic, besides the main need is to identify from a cloud of the associated data points so the popup square is not useful and less use jquery or another library.. The way we achieve using the square was import popup popup openlayers library, but the trick did not work with framedcloud (firebug says "OpenLayers.Popup.FramedCloud is not a constructor")               <link rel="stylesheet" href="../scripts/OpenLayers-2.13.1/theme/default/style.mobile.css" type="text/css" >     ....          <script type="text/javascript" language="javascript" src="../scripts/OpenLayers-2.13.1/OpenLayers.mobile.js"></script>     <script type="text/javascript" la language="javascript" src="../Scripts/OpenLayers-2.13.1/lib/OpenLayers/Popup.js"></script>          .....          function putPopup(x, y, html,map) {             // alert("popup1"+x+" "+y+" "+html)             map.setCenter(new OpenLayers.LonLat(x, y));                  if (popup) {                 map.removePopup(popup);             }             // this.popup = new OpenLayers.Popup("chicken",                     // new OpenLayers.LonLat(x, y), null, html, null, true);               //-------------------------Fail-------------------------------------                                  //popup = new OpenLayers.Popup("chicken",     //                                 new OpenLayers.LonLat(x, y),     //                                 new OpenLayers.Size(120,50),     //                                 html,     //                                 true);               //-------------------------Fail-------------------------------------                                                              popup = new OpenLayers.Popup.FramedCloud("Popup",                  new OpenLayers.LonLat(x, y), null,                 html, null,                 true // <-- true if we want a close (X) button, false otherwise                  );                        //-------------------------Fail-------------------------------------                                            //var myPopupClass = new OpenLayers.Class     //              (     //                  OpenLayers.Popup.FramedCloud,     //                  {     //                      'autoSize': true,     //                      'maxSize': new OpenLayers.Size(500,500)     //                  }            //              );     //                        // var myPopup = new myPopupClass     //                              (     //                                  "chicken",                                           //                                  new OpenLayers.LonLat(x, y),     //                                  null,     //                                  html,     //                                  null,     //                                  true     //                              );     //                              map.addPopup(myPopup);                                   map.addPopup(popup);              };


OpenLayers - Get LayerName from GML Response object

I am using the WMGetFeatureInfo control in OpenLayers to select items from my layers and return GML. I use this to get an attribute from the GML;                var val = evt.features[0].attributes.UID;     //Where evt is the object returned from "getfeatureinfo" event.      But the GML also contains a whole bunch of other good stuff in between the " wfs:FeatureCollection", and "gml:featureMembers" sections. How can I iterate through the wfs:FeatureCollection or gml:featureMembers because I cannot figure out the syntax. Also, would it be easier to parse the info I need from the XML that's returned? Thanks!


Sextante in Qgis 1.9 alpha on Ubuntu can't find saga gis 2.1

I am using Qgis 1.9 on Ubuntu 13.04, Sextante is a core part of qgis now. I am trying to access the SAGA 2.1 libraries through qgis and I keep getting a popup window that says SAGA is not installed. I can run SAGA and it works. Normally, I would go into the sextante configuration menu and make sure sextante is looking the right directory (/usr/lib/saga) However, that part of the configuration menu is gone. I went to the qgis options and checked the environment variables and I do not see one for saga, nor is it listed in the PATH variable. I tried adding in a SAGA path variable with no luck. Does anyone here know how to update or add a system variable to qgis 1.9 alpha so that qgis will know where saga is? The end goal will be the ability to have sextante properly access the saga libraries. Many of my Sextante modeller scripts rely HEAVILY on those libraries. I love qgis 1.9 and would hate to have to go back to 1.8 if i do not have to. Thanks EDIT: I was able to install the nightly version of 1.9 alpha on my windows work terminal using the OSGeo4w installer. I went into the advanced install options and made sure I installed SAGA (2.0.8.3) at the same time. Same problem seems to be happening. Everything seems to be working just fine when. Based on these findings I purged everything off of my Ubuntu laptop and tried again ( this time installing SAGA first). Still my problem persist. EDIT 2: I installed the official release of Qgis 2.0.1 from the Ubuntugis unstable PPA today. In this instillation some of the dependencies are dated and can not be used with SAGA gis 2.1. Here is the error message containing the offending package names. Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:               The following packages have unmet dependencies:      saga : Depends: libgdal1 (>= 1.8.0) but it is not going to be installed             Depends: liblas1 but it is not going to be installed     E: Unable to correct problems, you have held broken packages.      The version of `Libgdal1` that gets installed with qgis is 1.7.4 ( something less then 1.8 ) when I try to update these dependencies, it removes half of the dependencies used by qgis effectively removing it.


Geocoding using Excel spreadsheet

Can I add a spreadsheet with addresses to Qgis and then geocode it?


Using multiple fields for a Reclass calculation in ArcGIS Field Calculator

I am trying to create a dummy variable from an existing dataset using ArcGIS's Field Calculator tool with a Python script. My conditions require the use of multiple fields to determine the output dummy variable. I have previously run this same script using a single variable condition without error. My code looks like this:               expression= "Reclass(!avg_incpsf!, !strip_dum!)"     codeblock= """def Reclass(avg_incpsf, strip_dum):        if (avg_incpsf >= 0 and avg_incpsf <= 26.1795309) and (strip_dum = 1):          return 1        elif (avg_incpsf >= 0 and avg_incpsf <= 26.1795309) and (strip_dum = 0):          return 2        elif (avg_incpsf > 26.1795309 and avg_incpsf <= 33.9938753) and (strip_dum = 1):          return 3        elif (avg_incpsf > 26.1795309 and avg_incpsf <= 33.9938753) and (strip_dum = 0):          return 4      etc... When I added the strip_dum variable condition I get back the following error: ExecuteError: Failed to execute. Parameters are not valid. ERROR 000989: Python syntax error: Parsing error SyntaxError: invalid syntax (line 2) Failed to execute (CalculateField). I can't seem to figure out how my parameters are invalid. I've also tried to no avail:               expression= "Reclass(!avg_incpsf!, !strip_dum!)"     codeblock= """def Reclass(avg_incpsf, strip_dum):        if (avg_incpsf >= 0 and avg_incpsf <= 26.1795309 and strip_dum = 1):          return 1        elif (avg_incpsf >= 0 and avg_incpsf <= 26.1795309 and strip_dum = 0):          return 2      Suggestions are much appreciated. thanks in advance, mike


How to add any WMS layer on Google Earth Plugin in my web application?

I have a GIS application which allows user to draw features on Google Earth plugin included on my web application. Now i want to give an option of adding any wms layer on the google earth plugin if needed. I searched on the internet for answers but the only solution was through **Image Overlay** option which is not available on google earth plugin.


How to export QGIS elevation data to Mysql WAMP

is there a way to export elevation data from QGIS to wamp server(mysql)? please help me. I need to store all the data to mysql wamp.. thanks!


Is there any help file to understand resource.xml of network Analyst?

I want to translate the direction result of network analyst to turkish. I surf in the interent and found i have to change resource.xml file . the file located in arcgis install directory (...\ArcGIS\Desktop10.0\NetworkAnalyst\Directions) .I want to find a help file or dictionary file to translate each tag and attribute of the resource.xml file.For example what does monobranch means in the xml file? Is there any help file to understand this file ? Thanks for advance


Adding a GRASS module manually in QGIS (Mac OS X)?

I am trying to add a precompiled non-standard GRASS module to QGIS 2.0.1 (MAC OS 10.9.1, using the binaries by Kyngchaos). Adapting the instructions here (http://hub.qgis.org/projects/quantum- gis/wiki/Adding_New_Tools_to_the_GRASS_Toolbox) I have copied the GRASS module to `/Applications/QGIS.app/Contents/MacOS/grass/bin` and the module description together with two thumbnails to `/Applications/QGIS.app/Contents/Resources/grass/module`. Finally, I have added a line with the module name to the file `default.qgc` residing in `/Applications/QGIS.app/Contents/Resources/grass/config/`. Still, however, the module does not appear in the list of available modules in the GRASS toolbox in QGIS (restarted, of course). Any hints towards a possible solution are very much appreciated.


SelectFeature and ModifyFeature in OpenLayers 2.13

After lot of experimenting, I have to give up and ask: has anyone had success in using both SelectFeature and ModifyFeature in OL 2.13 (NB, there were changes to ModifyFeature in 2.13, compared to 2.12)? What I want to do: ModifyFeature should work on it's regular way (user can drag points; and click on lines will bring "handles" visible). In addition, I want to catch select and hover events.


Map Info: Thematic Mapping Symbols part printing

I have produced a series of thematic maps for graduated housing figures, using a symbol which I customized, in three different tables displayed in a layout. This looks fine in the map window, although the symbols are sized much larger than in the layout and do overlap, in order to be a reasonably large size in the layout window. All looks fine in the layout window, no overlapping. However, when printed, a couple of the symbols have parts missing. One has the top half and the other the right hand half. The symbols for these tables are small dots and don't overlap. Any ideas please?


circle becomes an oval after saving

Using esri desktopv10 i am editing a "tank" layer.   It is selected as the only editable layer It has three features all of which have circle as the diagrammatic property. I use the circle tool and construct a new circle. It draws nicely.   Then I save edit Then I stop editing the layer. Visually it turns into an oval! Thoughts? ![circle after adding feature to layer](http://i.stack.imgur.com/kRbC7.jpg) ![the oval appears after saving and exit editing](http://i.stack.imgur.com/Zl7UW.jpg) Thanks to all for answering!


osm_id in a shapefile vs. the uid and id attributes in an OSM file

I'm parsing an **OSM file** using the Python package `osmread`. The entities parsed have the following attributes `id`, `version`, `changeset`, `timestamp`, `uid`, and `tags`. On the other hand, I have a **shapefile** , and I use the Python package `pyshp` to read it. I then get the following fields from this (road) shapefile:                   [('DeletionFlag', 'C', 1, 0),         ['osm_id', 'N', 11, 0],         ['name', 'C', 48, 0],         ['ref', 'C', 16, 0],         ['type', 'C', 16, 0],         ['oneway', 'N', 1, 0],         ['bridge', 'N', 1, 0],         ['tunnel', 'N', 1, 0],         ['maxspeed', 'N', 3, 0]]      My question is, if the road shapefile was obtained from the OSM file, which of the two attributes, `id` or `uid`, in the OSM file corresponds to the `osm_id` field in the shapefile?


Why mobile routing is so fast?

Why my mobile GPS routing calculates routes almost instantly and using pgRouting in my robust PC is so time costly ? **EDIT:** My test: In my cellphone (Android 4.2.2 - 1G RAM - Dual core - Arm v9) I have iGo Primo. In my PC ( 8G RAM - Core i5 ) I have Postgre + PostGIS + pgRouting Table OSM Planet "planet_osm_line" with previous work:               alter table planet_osm_line add column source integer;     alter table planet_osm_line add column target integer;     select pgr_createTopology('planet_osm_line', 0.0001, 'way', 'osm_id');          select * from planet_osm_line where name like '%BR-040%' // (source : 2751784)     select * from planet_osm_line where name like '%BR-101%' // (target : 2040999)          SELECT seq, id1 AS node, id2 AS edge, cost, name, way       FROM pgr_dijkstra('SELECT osm_id as id, source, target, st_length(way) as cost FROM planet_osm_line',  2751784, 2040999, false, false  ) as di        JOIN planet_osm_line pt       ON di.id2 = pt.osm_id ;      The route is (both Brazil Highway): Source: BR-040 Target: BR-101 My cellphone do the job in less than two seconds and my PC takes more than 3 minutes (only the SELECT route - pgr_dijkstra - part).


Joining data points to matching polygons

I have polygon data on coral reefs at great barrier reef and separate point data for areas of coral bleaching. I have created a clip that only includes points that exist with in the reef polygons. However I need to be able to identify polygons that have bleaching points in them from those that do not. So for example I would like to be able to click on a polygon that has a bleaching point in it and it automatically select all the other polygons that do?


Accurate local map projections

Is there a map projection that can accurately represent reality at a local area, i.e. when transforming the map could I choose an area that I care about accuracy and allow distortions elsewhere? Like this map: http://upload.wikimedia.org/wikipedia/commons/thumb/8/83/Tissot_indicatrix_world_map_equirectangular_proj.svg/450px- Tissot_indicatrix_world_map_equirectangular_proj.svg.png I want to choose where the distortion happens.


C# - Access content from ArcGIS Online

I have got an existing .NET C# desktop application which already reads various GIS formats. I would now like to add support to read data from ArcGIS Online. What options have I got to access information such as services, groups, search data etc from ArcGIS Online? Can I use ArcObjects, REST endpoints?