Error using con in Map Algebra in Python script

I am experiencing a painful problem in the middle of a Python script I am writing. When I get to a Map Algebra function, I have tried two different options and both return a different error. At first I wrote:               facteur_Pente = Con((surf_Drainee > 12)  &  (surf_Drainee <= 80)  &  (pente_Rclass <= 24),pente_Rclass + 1, Con((surf_Drainee > 80)  &  (pente_Rclass < 24),pente_Rclass + 2,Con((surf_Drainee > 80)  &  (pente_Rclass == 24),pente_Rclass + 1,pente_Rclass)))      The error I get from this is: " **TypeError: cannot concatenate 'str' and 'int' objects** " This seems normal, as I have strings (surf_Drainee, pente_Rclass) so I convert the values to str using the following:               facteur_Pente = Con(("surf_Drainee" > str(12))  &  ("surf_Drainee" <= str(80))  &  ("pente_Rclass" <= str(24)),"pente_Rclass" + str(1), Con(("surf_Drainee" > str(80))  &  ("pente_Rclass" < str(24)),"pente_Rclass" + str(2),Con(("surf_Drainee" > str(80))  &  ("pente_Rclass" == str(24)),"pente_Rclass" + str(1),"pente_Rclass")))      The problem is that it doesn't work, and produces the following error: " **RuntimeError: ERROR 000732: Input Raster: Dataset pente_Rclass1 does not exist or is not supported.** " I don't even have a pente_Rclass1 in my script! Does anybody know how I could fix this problem in order to continue my script? Regards,


Activate layers that are in a checkbox list

I'm trying to do a code to activate layers that are in a checkbox list, the code that I'm trying to use is this:                   MxDoc = My.ArcMap.Document         Maps = MxDoc.Maps                   If chxActivated.SelectedItem = True Then             GxLayer.Layer.Visible = True [COLOR="#FF0000"]HERE IS THE PROBLEM[/COLOR]             MxDoc.UpdateContents()             MxDoc.ActiveView.Refresh()          End If      I add the layers with this code                   MxDoc = My.ArcMap.Document         Map = MxDoc.FocusMap         'new layer         GxLayer = New GxLayer         GxFile = GxLayer         'Layer file path         GxFile.Path = "C:\Layers\Aditional Information.lyr"         'Add the new layer to ArcMap         Map.AddLayer(GxLayer.Layer)         'Add the layer invisible         GxLayer.Layer.Visible = False         'Refresh the view         MxDoc.ActiveView.Refresh()     End Sub      Thank you!


Merging multiple polygon shapefiles

I want to merge two polygon shapefiles in one without losing the attributes using ArcMap 10.1. To be exact I am creating a geological map and have some geologic formations in one shapefile and some other formations in another shapefile. Thank you for any answer!


ArcMap Model Builder Iterator to create selections

This is a sequel to my question about aggregating polygons in order to create neighborhoods. I want to automate the geoprocessing of the above task. When I use Model Builder's "Iterate Feature Selection" iterator I get the below error: ![enter image description here](http://i.stack.imgur.com/CRefK.png) I originally tried to link the "Iterate Feature Selection" iterator directly to the Aggregate Polygon tool. But as per this thread I inserted the Make Feature layer tool in between. (Now removed, see comments below) ![enter image description here](http://i.stack.imgur.com/rLzPo.png) My problem is I'm unsure how to link the iterator's selection to the input of the Aggregate Polygon tool. Really, **why does the GROUP BY function of "iterate feature selection" iterator not create a complete SQL condition statement??** The following threads have proved un-useful as well: Model builder question regarding iterations (newbe : ( ..... ) Model builder: select feature based on attribute, iterator? thanks in advance


How can I retrieve the features in a layer without adding it to a map?

I am using the ArcGIS API for JavaScript. My layer of `Point` features is exposed through a REST service. I want to retrieve all of these features when the application starts up, then show different subsets of features at different times, depending on user input (such as text search) and client-side calculations (such as clustering calculations). If I just create a `FeatureLayer` normally, it won't actually retrieve any features before it's added to a map -- its `graphics` property is just `[]` when I look at it in Firebug. I tried calling `FeatureLayer.refresh`, but it just complains that `map` is undefined. How do I retrieve the features without having to attach them to a map?


Problem with merging and dissolving a shapefile in R

I am migrating from ArcMAP to opensource GIS. I've succesfully installed R and many packages in a Ubuntu 12.04 machine. I am used to linux and programming in C, but not to R and its syntax. I am trying to "dissolve" (fuse, merge) the spatial polygons of a shapefile by a certain code that is loaded from a csv file (e.g., to join counties' polygons by its FIPS State code to obtain a single polygon(s) for each State). I began composing my script with pieces from different places, but mostly this questions and its answers (that I will upvote as soon as I get enough reputation): http://stackoverflow.com/questions/19791210/r-ggplot2-merge-with-shapefile- and-csv-data-to-fill-polygons http://stackoverflow.com/questions/19613004/what-is-the-proj4-string- associated-with-my-shapefile The following code is the initial, incorrect version of the script, that has been improved thanks to the answer by SlowLearner. I leave it here (for now) until the actrual question and the answers get its final form.               # In this script I'm trying to perform the next steps:     # - Load a shapefile that contains some base polygons ("zones").     # - Load a table that contains a possible grouping of the zones into "regions".     # - Merge ("join" in ArcMap) the zones' shapefile with the grouping table     #   (common code "PROVMUN").     # - Create the regions' polygons by merging the zone polygons with same region     #   identifier ("CODER").     # - Merge the newly created regions' polygons with another table that contains     #   some region-level statistics.     # - Plot into a PDF a map with regions filled with different colors, borders     #   of zones in grey, and borders of regions in black          library(gpclib)     library(rgdal)     library(maptools)     library(ggplot2)     gpclibPermit()     #args <- commandArgs(TRUE)     ## Input parameters (fixed in this example)     work.dir <- "."     zones.shp.name <- "SP0111"     zones.shp.id <- "PROVMUN"     zones.csv.name <- "statsz.csv"     zones.csv.id <- "PROVMUN"     zones.csv.region <- "CODER"     regions.csv.name <- "statsr.csv"     regions.csv.id <- "CODER"     regions.shp.name <- "SP01_R_diss"     plot.pdf.name <- "SP01_R_plot.pdf"          # Read base polygon (zones) shapefile     zones.sp <- readOGR(dsn = work.dir, layer = zones.shp.name)          # Read regionalisation and zone-level statistics     zones.data <- read.csv(zones.csv.name)     # and merge (join) with the base polygons     zones.spwd <- merge(x=zones.sp, y=zones.data, by.x=zones.shp.id, by.y=zones.csv.id)          # Create region polygons by dissolving zone polygons     zones.IDs <- as.numeric(zones.spwd[[zones.csv.region]])     regions.sp <- unionSpatialPolygons(SpP = zones.spwd, IDs = zones.IDs, avoidGEOS = TRUE)     # (add threshold parameter to remove slivers on tricky shapefiles)          # Now regions.sp is an SpatialPolygons object, without data slot, so it seems     # the codes of regions are lost. But shooting in the dark I did this:     names(regions.sp)     # and I get a list of the codes I need (BTW: why this object has no dimension?)          # I need to (re?)insert the codes of the regions so that it allows to perform another     # merge (see below in the code)          # For that, I found this answer:     # http://stackoverflow.com/questions/15201875/merge-polygons-and-plot-using-spplot     # But here I'm shooting in the dark, as I don't really understand the linked example     # and could not make it work (no dimensions where there should be, etc.).          # So I try this (from the examples about plotting with ggplot2):     regions.spdf <- fortify(regions.sp)     # And the codes are now in the column named "id", so I use that          # Read region-level statistics (to merge with the dissolved regions' polygons)     regions.data <- read.csv(regions.csv.name)     # Merge that data with the regions' SpatialPolygons object     regions.spdf.wd <- merge(x=regions.spdf, y=regions.data, by.x="id", by.y=regions.csv.id)          # Write to shapefile the region polygons (with the stats already atached?)     writeOGR(obj = regions.spdf.wd, dsn = work.dir, layer = regions.shp.name, driver="ESRI Shapefile")      The writeOGR() command fails with error message: > Error: inherits(obj, "Spatial") is not TRUE               # Finally, the map plotting:     # Make PDF document     pdf(plot.pdf.name)     # Make empty map plot     mapplot <- ggplot()     # Add regions' polygons filled by region id (unique color for each region)     mapplot + geom_polygon(data = regions.spdf.wd, aes(fill = "id"))     # Add zone borders in grey     mapplot + geom_path(data = zs.df, aes(color = "grey40"), size=0.4)     # Add region borders in black     mapplot + geom_path(data = rs.df, aes(color = "black"), size=0.8)     # Add labels and title     mapplot + labs(x = "Longitude", y = "Latitude", fill = "FR") + opts(title = "Test map")     dev.off()      If I disregard the error in writeOGR and go through the plotting, I get several error like this: > Error in as.environment(where) : where' is lost" I have uploaded the shapefile and reduced version of the tables to Google Drive: https://drive.google.com/file/d/0B-TKzP- _yJNMdDhlbi1HbjFqNDg/edit?usp=sharing Any help will be greatly appreciated. Finally, this is my first question in stackexchange (any of them), don't hesitate to comment/criticize anything, editing title and whatnot. * * * EDIT: After trying SlowLearner's answer I have improved the script and hopefully the replicability of the problem: it now uses rgeos and a free shapefile from http://www.gadm.org/country (country Spain, complresed file ESP_adm.zip, shapefile ESP_adm4.*). However, it still fails to perform the desired dissolve operation. This is the content of file grouping.csv necessary for the dissolve operation:               MUN_NAME,MA_NAME     Alicante,ALICANTE     El Campello,ALICANTE     San Vicente del Raspeig,ALICANTE     Sant Joan d'Alacant,ALICANTE     Busot,ALICANTE     Mutxamel,ALICANTE     Agost,ALICANTE     Crevillent,ELCHE     Elche,ELCHE     Santa Pola,ELCHE     Benidorm,BENIDORM     La Nucia,BENIDORM     Villajoyosa,BENIDORM     L'Alfàs del Pi,BENIDORM     Polop,BENIDORM     Finestrat,BENIDORM     Callosa d'En Sarrià,BENIDORM      Following is the current state of the script (with most of the intended plotting removed, for now):               library(rgdal)     library(rgeos)     library(ggplot2)          # ESP_adm4 contains the municipalities of Spain (polygons)     # You can download the same shapefile from http://www.gadm.org/country     mun.spdf <- readOGR(dsn = ".", layer = "ESP_adm4")          # From this answer I learned to subset my SpatialPolygonsDataFrame easily:     # http://stackoverflow.com/a/13443741     mun.spdf <- mun.spdf[mun.spdf$ID_1 == 944,c("ID_1","NAME_1","ID_2","NAME_2","ID_4","NAME_4")]     # Now z.spdf contain only municipalities in Comunidad Valenciana (COM==944)     #head(mun.spdf@data)     #mun.spdf@data[mun.spdf$ID_1 != 944]          # grouping.csv contains a grouping of some of the municipalities into three regions     grouping.df <- read.csv("grouping.csv")     # For the dissolve operation, we need to add it to the polygons     # In ArcGIS we would use Merge (Data Management), a.k.a. "Join" in the interactive menu     # http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001700000055000000     # R scripting is beautiful, once you understand it:     mun.spdf.wd <- mun.spdf     mun.spdf.wd@data <- merge(x = mun.spdf@data, y = grouping.df, by.x = "NAME_4", by.y = "MUN_NAME", all.x = TRUE, all.y = FALSE)          # Now we should be ready to perform the dissolve     # In ArcGIS 10 we would use Dissolve (Data Management)     # http://resources.arcgis.com/en/help/main/10.1/index.html#//00170000005n000000     # and set the dissolve_field to "AM_NAME", and it would generate a new shapefile with     # where each polygon would be identified by the corresponding "CODER" value          # Here in R:     regions.ids <- mun.spdf.wd[["MA_NAME"]]     # z.IDs contains the values of the column MA_NAME, where rows with AM_NAME != NA belong to a region     # and polygons with the same MA_NAME should be fused together (there can be many distinct regions,     # in the example data there are three: "ALICANTE", "BENIDORM", "ELCHE")     # If I understand rgeos documentation, the next command should dissolve all of the polygons with     # same value in MA_NAME into one polygon, discarding the ones with AM_NAME == NA     regions.sp <- gUnionCascaded(mun.spdf.wd, id = regions.ids)          # http://stackoverflow.com/a/13666703 : this answer from SlowLearner was very useful to allow me     # plot with x11(type='Xlib'), that seems to be the default.     set_Polypath(FALSE)     plot(regions.sp)      The results make no sense: there should appear three contiguous clusters, instead of this spread. However, we can check that there are three regions in the new shapefile with the correct names: names(regions.sp) Maybe the merge of the loaded CSV file with the shapefile is not performed correctly? Lets try now another dissolve to obtain the borders of the provinces (NAME_2), using the original shapefile               prov.ids <- mun.spdf[["ID_2"]]     provinces.sp <- gUnionCascaded(mun.spdf, id = prov.ids)     # This should plot the borders of the three Spanish provinces Alicante, Castellón y Valencia:     par(new = TRUE)     plot(provinces.sp)      And again this fails, as my understanding of what is wrong here. So this happens with a shapefile downloaded from gadm as well as with the shapefile initially uploaded with this question. It makes me think we can rule out a problem in the shapefile. Therefore, what is wrong in this code? why the union of polygons does not produce the expected provinces or metropolitan areas? Any ideas? Thank you very much. Edit: I have finally figured out why this was not working: you can not merge only the data slot because it reorders the rows of that slot while leaving untouched the polygons slot, therefore, the union of polygons is performed over corrupted indices. The solution is to merge the whole object, R is really awesome and can handle it, so the code from @SlowLearner should look like this:               #zones.spwd@data <- merge(zones.sp@data, zones.data, by = "PROVMUN") ## <- Wrong, it corrupts the corresponce between slots @polygons and @data     zones.spwd <- merge(zones.sp, zones.data, by = "PROVMUN") ## This works! the changes in parameter all are


How to make traffic time contour map in ArcMap?

I want to make travel time contour map which shows the area people can go from an origin (e.g. downtown, airport) within certain time interval. I have a roadway linear shapefile with the information of travel time and some example maps found online, but lack of the idea how to make the map. Thanks for your help! ![enter image description here](http://i.stack.imgur.com/7998r.jpg) ![enter image description here](http://i.stack.imgur.com/wluBL.jpg)


WmsGetFeatureInfo not working in larger scales

I use Openlayers/Geoserver on ubuntu server. Geoserver runs at tomcat6. I have grouplayer of several layers all shown at certain scales. When I click at feature at small scale, getfeatureinfo works. When I zoom in and then click at same feature, response from server is empty. No errors at geoserver log or apache log. Also when I send that response manualy via web browser, response is empty, too. At one layer, there are even two zoom levels working, only the last one is empty. BBox and pixels in request look OK. ![](http://i.imgur.com/YMYpLMF.png) >>> zoom >>> ![](http://i.imgur.com/tWsMZXn.png) Most probably, the problem isn't in code, but here it is:               info = new OpenLayers.Control.WMSGetFeatureInfo({             url: 'http://158.196.109.46:8080/geoserver/diplomka/wms',              title: 'Identify features by clicking',             queryVisible: true,             maxFeatures: 1,             eventListeners: {                 getfeatureinfo: function(event) {                     map.addPopup(new OpenLayers.Popup.FramedCloud(                         "chicken",                         map.getLonLatFromPixel(event.xy),                         null,                         event.text,                         null,                         true                     ));                 }             }         });         map.addControl(info);         info.activate();      Proxy.cgi is also set properly I think. I also tried raising tomcat heap memory, it didn't help. So I really don't know, what should be causing this. Anybody experienced this, or knows what to do? I would really appreciated that.


How to extract Z data from a point layer

I have created a point layer with ~150 points. I have a DEM beneath it, which is where I have taken the X and Y values from. Does anybody know how I can retrieve the Z values, without using the info button! Using ArcGIS 10. I have licences for the spatial analyst etc tools.


How to get QGIS to play with pandas (Windows)?

has anybody been successful getting pandas to work with QGIS's Python installation, on Windows? I've used the OSGeo4W installer to install QGIS2.2, which comes with Python 2.7 and Numpy 1.5.1. Any reasonably new version of pandas requires Numpy 1.6.1 or newer. So that seems like my main problem. I've tried: \- Building an older version of pandas (e.g. 0.7.3 and 0.4.1) using easy_install, but that gives me a very long list of errors, at least the last of which are related to distutils\msvc9compiler.py \- Using binaries of old pandas versions, but they are all built for Numpy 1.6.1 \- Upgrading Numpy, which also gives me an error message. In case anybody is interested, the message ends with "File “C:\OSGeo4W\apps\Python27\lib\distutils\msvc9compiler.py”, line 299, in query_vcvarsall” newline “raise ValueERror(str(list(result.keys())))” newline “ValueError: [u’path’]" I'm wondering if anybody else has ever been successful in getting pandas to work with a QGIS install on Windows?? It would be so easy if QGIS would ship with, say, a version of Numpy that's less than three years old. Does anybody know if such an upgrade is in the works for upcoming QGIS versions?


Does an open source alternative to ESRI's Image Server exist?

I noticed the default way to store imagery is by using a database in the open source world. I like ESRI's Image Server software because it removes the need for a database and makes backing up a lot easier since its just files. Is there an Image Server type software in the open source world?


What User Testing techniques do you use?

In producing dynamic maps for students/users I have found the time invested in user testing well worth it. I use a varient of think aloud protocol called hallway testing. I grab any 2 or 3 likely users for 20 minutes each and set them a sample task (its important to get them to **do** something rather than just comment). They explain what they are doing when they get stuck or find something confusing and I prompt them if they aren't saying anything. Its a great way to discover consistent issues users have with your maps, most major problems will pop up with 3 users. I use software to record the screen (silverback) but just taking notes was pretty effective. With a big project I also advocate 'test early, test often'. I've found clients to be unhappy about funding user testing but its so quick and low tech that I tend to do it anyway to make sure there aren't unknown issues with a project Do you use user testing when producing dynamic maps?   If so, what techniques have you found to be effective and why?


Batch processing within geocommons/geocoder

I've just installed geocommons/geocoder from github. The only example they provide is how to geocode a single address using interactive ruby. I am looking for a way to batch-geocode thousands of addresses. Is there a way to run this geocoder in batch mode, using an input file of addresses? Thank you! natalia


Arcmap: a different delimiter when symbolizing "Unique values, many"?

In Arcmap 10.1, is it possible to use something other than a comma to separate the value fields when symbolizing by "Unique values, many"?


Monster Spatial database server suggestions

I'm going to setup a open Mapserver w/ Openlayers, Geojango, Postgis using Postgresql. And I need some suggestions from people that have been shopping for what I need longer than I have. What would be the best configuration for such a db server and from where? Im a big mac fan and was thinking of a Xserve w/ 42g ram and two quad cores (2.66). What does postgresql like best as far as server software/hardware? Can it fully utilize multi cores? Im on somewhat of a tight budget so price is a big factor. But what would be the dream machine and its cheaper inequivalent? sockets; i'd probably have 20 to 30 ppl at the lease almost 100 at most, maybe more. Serving up more than 100 layers with some common canned geoprocessing type stuff going on.


clicking button in QueryAttributesTask by code

I need help, I have a website developed using Argis Server 9.3 and Visual Studio 2008. The map is inside the website via an iframe and it receives the input to be used in a custom query via javascript, this is working fine, except that, the users still have to clic the button of the QueryAttributesTask component to execute the query task. Does anyone knows how can I call the button clic code from another button (like an asp button)? Any ideas on how to accomplish this?


modeling of spatial objects

I have a line and polygon in this image. If i find the intersection of line exterior and polygon boundry, what will be the graphical representation of both objects intersection.. its my concept.. ![http://imm.io/2xTh](http://i.stack.imgur.com/LBUJw.png)


How to get spatial reference of a shapefile using python?

I always use arcpy.GetParameterAsText to get the spatial reference from the user. There should be a way to decide what is the spatial reference of a shapefile but I can't find it. Something like Describe....


Abstract Data Store

I'm trying to create a new extension for data store in geoserver that can take data from in-memory arrays.But as I'm kind of new to geotools I'm not sure how to do it.Any help would be really appreciated.Thanking you in advance


Exporting DEM-derived rasters to CSV from QGIS?

I have been able to import into QGIS a set of raster topographic maps and the associated DEM raster maps. It registered the two for me. From there I have calculated the associated slope raster map. Now I want to export the data to a CSV file (or similar format) for processing in a program that I am writing. Ideally the data would be structured in a way that would permit me to query for the slope and elevation data for any given point on the map. Is this possible? If so, then how do I do it? Edit: There was a comment linking to another post but it seems to be gone now. Regardless it made me realize that I need to clarify my question. Specifically, I have been able to export the data (slope & DEM) to two different CSV files. However I would prefer the data in one file if possible.


Which image is shown ontop whilst mosaiking with the FME Rastermosaicker?

I have two Images which overlap and I want to mosaic the two images. One of the images has nodata values in this overlapping area and the other does not. I obviously want the overlapping area to be image data and not nodata values but how do I define which data gets written to the output file? In ArcGIS one can set either match, last or first. But I don´t see a similar option with FME2014.


Add feature to csv via PyQGIS

I'm using PyQgis 2.0.1. Is it possible to add feature to csv file? I've tried to do this as it's shown in CoockBook:               if caps & QgsVectorDataProvider.AddFeatures:       feat = QgsFeature()       feat.addAttribute(0,"hello")       feat.setGeometry(QgsGeometry.fromPoint(QgsPoint(123,456)))       (res, outFeats) = layer.dataProvider().addFeatures( [ feat ] )      but I only get error:               AttributeError: 'QgsFeature' object has no attribute 'addAttribute'


QGIS 2.0 How can i get a precisely Rendering time?

I work with QGIS 2.0.1. I have a large number of raster data files and i selected different methods to represent them.   1. Method: Import all raster data as individual files   2. Method: Generate a single file with the help of the rastertool "Merge"   3. Method: Generate a virtual raster (catalog)  I would like to know if it is possible to get the exact Rendering time? For example how long qgis needs to render the map if you zoom in. This would be very helpful to compare the rendering time between the three methods. I know which method is faster but a time value would be important for me. Thanks for your help


ArcGIS cutting a line out of polygon

Ok I know that this must be a pretty silly question, but I'm just not able to create a line in ArcGIS. I started an edit session and began with straight segment. All i want to do is simply drawing a line out of three single points, lets say the coordinates for the points are (20,30 ; 50,30 ; 70,50) now every time i finish sketching ArcGIS is creating a polygon instead of just creating a line without closing it. I know that must sound ridiculous for the most people here but I just cant make it, sorry.


Looking for an "introduction to photogrammetry" book with a well documented chapter on UAV

I would like to recommend a book for my students to learn the basis of photogrammetry. I've read "Introduction to modern photogrammetry", 2001, from Mikhaïl, Bethel and McGlone. Unfortunately, the field has evolved a lot since 2001. I've found only a few other books on the net, but I would really like to have a chapter including UAV photogrammetry (and if possible also LiDAR, but this is secondary). Is there a photogrammetry textbook with a good chapter on UAV's ? EDIT: my students are either following a master in Environmental sciences or professionals from different domains who want to learn more about GIS.


What is the best API to use GeoTools or uDig (for the context of my application)?

I am trying to develop a java application that displays : Google maps, Openstreetmap and Bing Map Data. So which is the best SDK to use in this contet Geotools or uDig ?


Using Area Solar Radiation tool for many rasters with different latitudes and Z values?

My problem is as follows: I want to count direct radiation for all Europe. As the **Area Solar Radiation (ASR)** tool allows to work only on small landscapes, I cut my raster-Europe into fragments with respect to latitude. So each piece of raster will be analyzed with a different values of Latitude and Z factor. Everything is working fine, but... I have over 4000 these fragments of raster and doing it manually does not make sense... So I used both batch mode and ModelBuilder, but in both cases, both Latitude and Z factor are set to default values, ie, for Lat=45 and for z = 1. If I use the ASR individually, these values are automatically calculated. What should I do to batch mode or ModelBuilder calculated the value of Latitude and z-factor for each piece raster automatically? Any suggestions welcome. (special formulas, scripts?)


How do I dissolve to a predetermined number of contiguous geographies based on equal division of a value?

Let's say I have a layer that is the state of Oklahoma, broken up by county, and I want to dissolve it into contiguous regions of roughly equal population size, and I want to define how many regions there will be. So, if the state's population is 100, and I want 7 regions, I would get 7 different contiguous regions where the total population is [(100/7) plus or minus one standard deviation or less] I have the state layer by county, and I have the population numbers in my table. Is that something QGIS can do? How would I go about this?


Why is my dissolve not outputting my features correctly?

I have a parcel polygon layer consisting of ~30,000 polygons that can have one of three values for city limits: 0, 1, and null. I execute a dissolve on this layer with "Create Multipart Features" checked. The output should be only three polygons -> a 0 polygon, a 1 polygon, and a null polygon. However, when I run dissolve, the result creates 5 polygons instead: ![enter image description here](http://i.stack.imgur.com/xS4hr.jpg) Here is a picture of the end dissolve layer overlaying the labled parcel layer: ![enter image description here](http://i.stack.imgur.com/ABXUg.jpg) as you can see in the picture, all the 0's should be one contiguous multipart parcel with joining lines removed, but instead there are separations. Things I have tried so far to no avail: Validated a topology with two rules: Must Not Overlap and Must Not Have Gaps Used the Repair Geometry tool. Per request, I have copied the parameters from the geoprocessing task. It is an ordinary polygon feature class in a personal geodatabase:               arcpy.Dissolve_management("C:/Users/cbarber/Desktop/ParcelFabric.mdb/Parcels/ParcelFabric_Parcels","C:/Users/cbarber/Documents/ArcGIS/Default.gdb/ParcelFabric_Parcels_Dissolv8","City_Limits","#","MULTI_PART","DISSOLVE_LINES")


Finding the Closest Points using ST_ClosestPoint() for MULTIPOLYGON

I am working to match between the closest points of two tables. I have two tables: Building, SchoolBuilding. Building Table: Contains Polygones,   SchoolBuilding Table: contains Points (From Lat/Long). I'd like to match between the both tables, and find the closest building that are "Schools" Following this article: http://blog.jordogskog.no/tag/st_closestpoint/ I wrote this query, but I couldn't get any results:               Select ST_ClosestPoint(a.geom, b.wkb_geometry) as the_geom from  Building a,SchoolBuilding b  LIMIT 1;      I tried to figure out where the problem is, I found that I am comparing between Point and MULTIPOLYGON               select  ST_GeomFromText(st_astext(wkb_geometry),4326) from Building limit 1;                                                                                st_geomfromtext                                                                                ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------      0106000020E610000001000000010300000001000000050000007FB28F50DF1B2E4109B480B8E0FF0641025A2A2D821B2E41F6C3ACF40AFD064104B150BD531B2E41FC0B28E369FD06417F088BE0B01B2E410FFCFBA63F0007417FB28F50DF1B2E4109B480B8E0FF0641     (1 row)      \--               select st_astext(wkb_geometry) from Building limit 1;                                                                                st_astext                                                                                --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------      MULTIPOLYGON(((986607.657346323 188412.090089232,986561.088213742 188321.369470149,986537.869756252 188333.235916227,986584.438560739 188423.95653531,986607.657346323 188412.090089232)))               select st_astext(geom) from SchoolBuilding limit 1;                      st_astext                      -------------------------------------------      POINT(-73.7785887529997 42.6453684010005)      The question is: Can we find the nearest point comparing MULTIPOLYGON ?


I'm a beginner with cartodb. Can I overlap layers with cartodb maps from different user accounts? I mean, I've tried this code and doesn't work, from Rolling Stones Case Study. First, add 'saleiva' user basemap, and then, my other tables, user 'carmenamaya'               var baseLayerDef = {        sql: "SELECT * FROM rolling_basemap",        cartocss: "#rolling_basemap { polygon-fill:#333333; polygon-opacity: 0.7; line-opacity:1; line-color: #000; line-width: .3; [feature='Urban Area']{ polygon-fill:#000; polygon-opacity:0; line-width: 0; } }"     };          cartodb.createLayer(map, {       user_name: 'saleiva',       type: 'cartodb',       sublayers: [         baseLayerDef,      //   pointsLayerDef,      //   linesLayerDef       ]     }).on('done', function(layer) {        layer created, add it to the map       map.addLayer(layer);          var pointsLayerDef = {       sql: "SELECT *, date as date_proc, ST_asGeoJson(the_geom) as geom FROM carmen_amaya",       cartocss: "#carmen_amaya::oth { marker-fill: #000; marker-opacity: .3; marker-width: 17; marker-allow-overlap: true; } #carmen_amaya { marker-fill: #FFF; marker-opacity: 1; marker-width: 5; marker-line-width: 0; marker-placement: point; marker-type: ellipse; marker-allow-overlap: true; }",       interactivity: 'geom,city,cartodb_id,date_proc'     };          var linesLayerDef = {       sql: "select * from carmen_amaya_concerts",       cartocss: "#carmen_amaya_concerts{ line-width: 1; line-color: #FFF; line-opacity: 0.8; }",     };          cartodb.createLayer(map, {       user_name: 'carmenamaya',       type: 'cartodb',       sublayers: [     //        baseLayerDef,              pointsLayerDef,         linesLayerDef       ]     }).on('done', function(layer) {       //     layer created, add it to the map           map.addLayer(layer);


Looping through subsets and spatial-join to single output

I have two feature class files, point file and polyline file and would like to spatially join pairs by looping/iterating based on a conditional IF statement. The resulting pairs would then be loaded into the Arc Map spatial join tool (v 10.2.2). Below is my attempt to block out the logic. Assistance is appreciated. IF Point File Field State Code AND Polyline File Field State Code = X THEN Create a temporary subset feature class for each (point and line file) and then load into the Arc Map spatial join tool (Target feature points Join features Lines) OUTPUT FEATURES CLASS to a new feature class with the spatial join (that allow all subsets to be inserted). LOOP (ITERATE) For the next State Code value until all codes have been matched and the all spatial joins of the subsets are completed. The idea is to not have to load 50 pairs of point and lines files to complete a spatial join. Spatially joining the whole US set of points and lines at once takes a very large run time. In essence you’ re giving ArcMap a much smaller task at a time only having to spatially join a state of point to a state of lines at a time. ![enter image description here](http://i.stack.imgur.com/fOytu.png)


Projecting Data with Transformations - Alignment Issue

**Problem:** I am having problems getting data to align properly with basemaps layers. The image below shows the difference between roads. The centerlines shapefile's coordinate system is GCS_North_American_1983 while the basemap is WGS_1984_Web_Mercator_Auxiliary_Sphere. **Things I have tried:** I have tried projecting the centerlines shapefile into WGS_84 to get it to better alignment. I have tried using WGS_1984_(ITRF00)_To_NAD_1983 and NAD_1983_To_WGS_1984_5 transformations without much luck. I have tried changing the projection of the data to different ones thinking it may have been wrong at the start. **Shapefile Info:** Comparing the data and the basemaps, it looks like there is about a 40 meter difference. I am assuming this is a projection issue because it is hard to imagine the data being off by that much when it was created. My data is in western Pennsylvania. The shapefile's extent is: top 41.892328dd, right -77.075914dd, bottom 39.625013dd, left -80.565890dd. The basemap is the photo is from ArcMap, but the same issue is there is another program I am using with Google Maps as basemaps. These shapefiles contain M and Z values, but I am not sure if that would really factor into the alignment. We are using this data for offline field collection, so it needs to match (more closely) the basemaps we will show it on. All of the shapefiles I have are off according to the basemaps, too. ![My Photo](http://i.stack.imgur.com/NJfk5.png)


Circle not visible

I am trying to create a GeodesicPolygon using using the code given in http://geographika.co.uk/samples/geodesic/GeodesicPolygon.js. But the circle is not visible, I guess its a projection problem but couldn't find where it is. Any help plz.......... My code goes like this:                         <title>OpenLayers Example</title>


Watershed delineation?

I'd like to delineate the catchments upstream of the sampling points. In order to do that, I have done the following:   1. Burn the rivers into the DEM using ArcHydro>DEM Manipulation>DEM reconditioning;    2. Flow direction;   3. Flow accumulation;   4. Snap pour points (my sampling sites); and   5. Watershed (Spatial Analyst>Hydrology) However, the catchments I have got, don't match the reality. Could you please check the data through this link? Any recommendations to get better results would be much appreciated. ![enter image description here](http://i.stack.imgur.com/r3NtMl.jpg) ![enter image description here](http://i.stack.imgur.com/zAmrKl.jpg)


How to find the polygons bordering a feature programmatically with qgis?

Is there a way to calculate the neighbors of a polygon with `pyqgis` for every feature? For example, the selected polygons relative to the one in the center: ![screenshot of selected polygons](http://i.stack.imgur.com/8hzfL.png) I found this solution, but it's a year old and doesn't seem to work with QGis 2.0.


Terrain Accessibility map using GIS (ArcGIS or QGIS)

I need to make an accessibility map showing the walking distance based on the terrain and availability of road networks, could anyone point me in the right direction where i could learn to do so. Basically i need to create something like this: ![Map](http://i.stack.imgur.com/zGWOh.png) ![Legend](http://i.stack.imgur.com/wg9te.png)


Looking for USA roads traffic load data

I would like to make a map of the USA Roads with traffic load data (I don't care if it updates monthly , quarterly...) in order to analyze location of customer's shops (they sell vehicle parts and want to see how close their / competitors stores are to high traffic roads) What I'm looking for is :   1. Average Load   2. Peak Load I don't know which resolutions are available but of course I would like to have the best there is (hope for free :) ) I need the entire USA roads highways & main roads are most important. the more data I have the better my map will be for my client. Any idea where I can get such data ? I would like to have end result like this (color wise) : ![enter image description here](http://i.stack.imgur.com/60Ndc.jpg)


Dates are off when opening netcdf file in R

I have a netcdf file with the time dimension that goes from 12/2007 until 12/2010 with monthly time steps. I can see the correct dates in both arcgis and panoply. Panoply tells me this file is a NetCDF-3/CDM, and reports               time double time(time=37);           :units = "hour since 1950-1-1T00:00:00Z";           :long_name = "forecast time";      But when I open the dataset in R using either brick(), ncdf, or ncdf4 I get these values in the time variable               >  v1<-get.var.ncdf(nc, "time")     > v1           [1] 508008 508752 509472 510192 510936 511656 512400 513120 513864 514608     [11] 515328 516072 516792 517536 518256 518952 519696 520416 521160 521880     [21] 522624 523368 524088 524832 525552 526296 527016 527712 528456 529176     [31] 529920 530640 531384 532128 532848 533592 534312      and these is the values I get from the brick function               names       : X508008, X508752, X509472, X510192, X510936, X511656, X512400, X513120, X513864, X514608, X515328, X516072, X516792, X517536, X518256, ...      z-value     : 508008, 534312 (min, max)      Is there some parameter that needs to be changed that deals with time. I can't find any information rather than some sparse posts around the web.


pgr_pointsaspolygon returns a self intersecting polygon which does not cover underlying points

I am using pgrouting 2.0 library to create an alpha shape around my set of points. It works nearly perfect but I have a case where pgr_pointsaspolygon returns a self intersecting polygon which does not really cover the underlying points in the table: ![enter image description here](http://i.stack.imgur.com/ZTTAn.png) This is how i call the pgr_pointsaspolygon function :               SELECT 1 as a,* FROM  pgr_pointsaspolygon('SELECT id, ST_X(the_geom) AS x, ST_Y(the_geom) AS y FROM test')      Is there anyway i can correct the result? * * * A bug was report here: https://github.com/pgRouting/pgrouting/issues/235


How to set map scale using Arcgis silverlight Api?

I want to set map scale manualy using ArcGIS Silverlight Api . I use silverlight api 3 and arcgis server 10 . I have 4 scale levels and I want to show the map in these scales. How can i set these scale using Silverlight Api ? scale : 1:288895.27714400 1:144447.63857200 1:72223.81986000 1:36111.90964300 thanks for advance


How to convert a geotiff from WGS84 to 3857 with gdalwarp?

I'm trying to convert images with WGS84 projection to 3857 but warp is not giving me a output I would expect. This is my command:               gdalwarp -s_srs "+proj=merc +datum=WGS84" -t_srs "EPSG:3857" SRTM_1km.tif SRTM_1km_warped.tif      If I overlay the warped image on top they looks exactly the same. Thanks in advance! This is the gdalinfo of my source image:               Driver: GTiff/GeoTIFF     Files: SRTM_1km.tif     Size is 43202, 14402     Coordinate System is:     GEOGCS["WGS 84",         DATUM["WGS_1984",             SPHEROID["WGS 84",6378137,298.257223563,                 AUTHORITY["EPSG","7030"]],             AUTHORITY["EPSG","6326"]],         PRIMEM["Greenwich",0],         UNIT["degree",0.0174532925199433],         AUTHORITY["EPSG","4326"]]     Origin = (-180.008333333767950,60.008333328098033)     Pixel Size = (0.008333333333000,-0.008333333333000)     Metadata:       AREA_OR_POINT=Area     Image Structure Metadata:       INTERLEAVE=BAND     Corner Coordinates:     Upper Left  (-180.0083333,  60.0083333) (180d 0'30.00"W, 60d 0'30.00"N)     Lower Left  (-180.0083333, -60.0083333) (180d 0'30.00"W, 60d 0'30.00"S)     Upper Right ( 180.0083333,  60.0083333) (180d 0'30.00"E, 60d 0'30.00"N)     Lower Right ( 180.0083333, -60.0083333) (180d 0'30.00"E, 60d 0'30.00"S)     Center      (  -0.0000000,  -0.0000000) (  0d 0' 0.00"W,  0d 0' 0.00"S)     Band 1 Block=43202x1 Type=Int16, ColorInterp=Gray       NoData Value=-32768       Metadata:         LAYER_TYPE=athematic


I wanted a tutorial link to start with geoserver and Postgis for ASP.NET

I wanted a reference material for coding using C# in ASP.net with geoserver and Postgis. Please tell me reference material for the same. I have searched for several reference material but did not found as search. Please help me out.


Floor height creation from Aerial Lidar/Imagery only

I was wondering if it is possible to generate the floor heights of buildings from aerial lidar? We don't have terrestrial lidar or stereo imagery. I don't need the ground DEM level or the roof (DSM) level but the height above the ground where the ground floor is. The main current requirement is -A number of buildings are on stilts and built to allow for seasonal flooding so when flood models are brought in they shouldn't be classified as high risk since they are designed to allow water to flow under them. Other building are not on stilts but raised off the ground so a max flood height of 845 for example won't affect the building as it's min floor level is 845.5. Lots of photogrammetry software using Stereo imagery/terrestrial lidar data will allow us to automate the creation of 3D building footprints (with floor height) and build 3D models for visualizing the effect of flooding (an example workflow) BUT what can we do if the only input is aerial 4ppm Lidar and 125mm orthophotos? I looked at coupling it with google streetview but many houses are not covered as they are on private roads away from public view. See Lidar - Automated building extraction (Improve Process) and Simulate flood to assess Asset inundation footprints for background. We have arcgis 10.1 and ERDAS Imagine/ER Mapper and I am also testing a number of lidar analysis tools like LP360, Lastools, Lidar Analyst and E3De for this. ![enter image description here](http://i.stack.imgur.com/H6QcU.jpg) Thanks,


Geoserver FTL style in IE not rendering

I am using the WMS GEt Feature Info feature in Geoserver. I created an inner ftl (content.ftl), using the header and footer ftl as it is. The WMS Get Feature Info will go into a basic Openlayers popup. Example styling that I have for the info table created by the ftl :               table.featureInfo, table.featureInfo td, table.featureInfo th {         border:1px solid #ddd;         border-collapse:collapse;         margin:0;         padding:0;         font-size: 90%;         padding:.2em .1em;     }      In IE 8, the popup does not show with any styling. it seems I need to declare and use those styles in the map page itself. It works fine with other browser. Any ideas why?


SLD not linking to ArcGIS wms service

I need to style an ArcGIS Server 10.0 WMS Service with an SLD File. I have picked a very simple point style SLD which should style all points with one circle. http://docs.geoserver.org/latest/en/user/styling/sld-introduction.html I have then simply defined the SLD-Path in ArcGIS Server by editing the appropriate properties. This is however not being rendered. The points are still being symbolized with the symbols defined in the mxd with which it was created. Has anyone any experience with binding SLDs to ArcGIS Server wms services who can possible see where I am going wrong?


Kriging points in a raster in R

I wonder if there is a way to interpolate xyz points in a raster within certain bounds using R?. In arcgis this is call interpolation with barrier. i wonder if there is something similar in r?. I would like to use the Kriging method. Cheers, Camilo


Esri ArcGIS plot point

I have created a java function to plot the points on the map, and I need to pass the x-y coordinates and the taskevent as the parameters. I would like to ask what should be the input parameter for taskevent??               public void plotCase(TaskEvent event){            event.getWebContext().getWebMap();          }      Thanks a lot!!


Way to script customization for ArcPad AXF file?

I have an ArcPad AXF file, created from a geodatabase. I've opened the AXF in ArcPad Studio and created some a custom edit form. It's all great. But if the original geodatabase ever gets destroyed and I have to create a new AXF file, I will lose my custom forms, right? Is there a way to script all that XML that makes up the custom form? I really don't want to have go through all that ArcPad Studio GUI editing again. I can see that it is possible to save the XML of a layer (including the custom edit form XML) as a .apl in ArcPad studio. But how can I push that saved XML back into a new XML file? Is there a way to script this?


How to get feature info from wms layer

I have used your code for picking feature info from wms layer using WMSGetFeatureInofo function.I have used you this link. http://underdark.wordpress.com/2011/03/17/picking-a-features-attribute-value- from-a-wms-layer-with-openlayers/ but I cant found the feature info. feature.length function returns 0. My wms layer is                tiled = new OpenLayers.Layer.WMS(                          "unit_project2_ws:unit_project3_view - Tiled",                          "http://localhost:8080/geoserver/unit_project2_ws/wms",                         {                             LAYERS: 'unit_project2_ws:unit_project3',                             transparent: true,                             STYLES: '',                             format: format,                             tiled: true,                             tilesOrigin : map.maxExtent.left + ',' + map.maxExtent.bottom                              },                         {                             buffer: 0,                             displayOutsideMaxExtent: true,                             isBaseLayer: false,                             yx : {'EPSG:900913' : false}                         }                      );      ........................ code i have used to get feature info from wms layer               roadidPicker = new OpenLayers.Control.WMSGetFeatureInfo({                     url: 'http://localhost:8080/geoserver/unit_project2_ws/wms',>                     title: 'identify features on click',                     layers: [tiled],                     queryVisible: true                 });     roadidPicker.infoFormat = 'application/vnd.ogc.gml';     roadidPicker.events.register("getfeatureinfo", this, pickRoadid);     map.addControl(roadidPicker);     roadidPicker.activate();          function pickRoadid(e) {       if (e.features && e.features.length) {          var val = e.features[0].attributes.id;          alert(val);          //document.getElementById('roadId').value = val;       }       else           alert(e.features.length);  // this function returns 0 result.          }      What is problem with this code.


Set point NOT IN CENTER of polygon

I have a free shaped polygon. Now I draw a smaller polygon inside with a same form i.e buffer zone with negative width. Then put a point with in my buffer zone center. Its looks like this: ![enter image description here](http://i.stack.imgur.com/Jif6W.jpg) OK. But now I add a buffer zone with positive width and put a point in centre. I get: ![enter image description here](http://i.stack.imgur.com/wc9bT.jpg) You see that one point lies on another point. Its no good I want to see both points. Sure I can just move a point from centre away but if I do I will have a polygon with strange shape that can go beyond the boundaries. Can you give an advice what to do?


"Display Background value "0" raster"

While publish raster layer in geoserver it shows background as black. How to remove the black color. if there is any options to permanently remove the black color.


Finding nodes with QGIS

As part of work in statistical mapping for school, I need to use QGIS to find the spatial extent of commercial nodes. A node is defined for this exercise as a zone of 75m in diameter where the density of shops is greater than or equal to 5. The problem is less one of finding the spatial extent of the nodes than to find and map the nodes themselves. To find the nodes, I have 5 shapefiles, each corresponding to a type of commerce in Villeurbanne (the study area for this exercise). I have merged these five shapefiles into a single one, in the hope of simplifying my life (but perhaps that's a mistake...). I therefore have available a vector file where 2018 points represent the various shops in Villeurbanne. What I would like to do is to analyze a circle of 75m in diameter (or a radius of 37.5m) around each point representing a shop, in order to know how many shops are found in this circle. I don't know whether it's possible with vector software... I know that a similar operation exists in raster software like ILWIS for analyzing data in continuous grids, because I have done that before, but I have to work in QGIS for this excercise. Once the shops have been found within a 75m diameter zone, I will have to be able to create the regions of intersection, which would give me the nodes. I'm a beginner with QGIS, an application that I have used only once or twice last year by following instructions, but this year no instructions are indicated. * * * Dans le cadre d'un travail à réaliser en carto statistique pour la fac, je dois déterminer l'étendue spatiale de nodules commerciaux sur Q-Gis. Un nodule est défini dans l'exercice comme une zone de 75m de diamètre où la densité de commerces est supérieure ou égale à 5. Mon problème n'est pas tant de déterminer l'étendue spatiale des nodules que de déterminer et cartographier les nodules eux-mêmes. Pour déterminer les nodules, je dispose de 5 shapefile correspondant chacun à un type de commerce à Villeurbanne (la zone d'étude de l'exercice). J'ai rassemblé ces cinq shapefile en un seul, dans l'espoir de me simplifier la vie (mais c'est peut- être une erreur...). J'ai donc comme base de travail un fichier vectoriel où 2018 points représentent les différents commerces de Villeurbanne. Ce que je souhaiterais faire, c'est analyser un cercle de 75m de diamètre (ou 37,5m de rayon) autour de chaque point représentant un commerce, pour savoir combien de commerces se trouvent dans ce cercle. Je ne sais pas si c'est possible sur un logiciel vectoriel... Je sais qu'une opération similaire existe sur les logiciels raster comme Ilwis en analysant l'information contenue dans les mailles contigues pour l'avoir déjà fait, mais je dois travailler sur Q-Gis pour cet exercice. Une fois les commerces trouvés dans une zone de 75 m de diamètre, il faudrait que je puisse regrouper les zones d'intersection, ce qui me donnerait mes nodules. Je suis novice sur Q-Gis, logiciel que je n'ai utilisé qu'une ou deux fois l'an dernier en suivant des fiches des consignes, mais cette année, aucune procédure n'est indiquée... J'espère que ma question est claire Merci d'avance à tous.


Appropriate data structure for a bunch of polygons

I'm not a GIS guy so this might be a very misguided question. At present I have compiled a python dictionary, on which I perform some simple processing and return some answers. My data is structured as a python dictionary right now:               entire_data = { "row1": {                               "metadata1": "some info"                               "metadata2": "some info"                               "geometry": [(x1,y1),(x2,y2),...] #x,y are WGS84 coordinates                             }                   }      The entire thing is a 100kb right now, but is expected to scale a lot more in the future. I plan to use this data (mostly) in the backend of a web application. Most of my toying around with the concept is done and now I need to somehow have it in a format for persistent storage. I looked into shapefiles but they appear like they might be overkill (also read some criticisms on the format). I can put them in a sql database, but the geometry field would have to be stored as varchar and that would mean a processing overhead each time an entry is to be fetched. What would be an appropriate format to put the aforementioned data into?


How to save the edited features on a layer back to postgis table?

I have postgis + openlayer+ geoserver. I have developed an app which can show layers from postgis DB, allow user to edit,add,view features on a vector layer. Now, my need is to save the edited or newly created features back to postgis DB. Is it possible to achieve it using only openlayers?? Thanks for your patience


Google maps api, several moving markers using a csv file containing the coordinates

I collected 5 sets of coordinates of moving vehicles and I want to play the scene using googlemaps API showing those 5 vehicles moving. The sets are saved in a postgresql table. is it possible ? if yes how ? what I found for the moment is only one vehicle. Thanks in advance M.


ArcGIS JS Api: Click on feature, create a particular new map?

I have a polygon layer visible from scales 0 to 8 (bigger to smaller). The thing is that I would like to click on a SINGLE feature of this polygon layer and then going to a different map (but in same _div_ ), where only this feature is highlighted. For example, imagine that you see a map of the USA states. Then you click on South Carolina state and see something similar to this ESRI example: http://help.arcgis.com/en/webapi/javascript/arcgis/samples/query_hover/index.html. So the thing would be, **clicking on the feature** and **switching** automatically (without pressing any button) from the general map of the USA to a **particular map for a particular feature** where more specific operations can be applied, in this case, to South Carolina state. Is this possible? Any ideas to start? :-) Thanks for your help and comments!


How to import a DWG into a QGIS project?

I have a lot of DWG files like base map, and water and wastewater network. I am lookin for the principal steps to import my files into my QGIS project.


How do I set attributes when creating vectors using OpenLayers and WFS-T?

I have published a WFS-T layer (using geoserver) and am able to add, edit and delete features using OpenLayers and it's Vector layer. But, I don't know how can I populate additional attributes using OpenLayers and WFS-T. Any pointers? Let's say I have database structure:               ARMY (     ID NUMBER PRIMARY KEY,     NAME VARCHAR2(200));          INVADED_AREA (     ID NUMBER PRIMARY KEY,     INVADED_BY_ARMY_ID NUMBER NOT NULL,     AREA_GEOMETRY SDO_GEOMETRY,     CONSTRAINT ia_fk FOREIGN KEY(INVADED_BY_ARMY_ID) REFERENCES ARMY(ID));      and I have a web application where you first select an army (with e.g. ID 42) and then start drawing geometries of invaded areas using OpenLayers. How do I get OpenLayers to put value 42 into INVADED_AREA.INVADED_BY_ARMY_ID column? EDIT: I have found http://dev4.mapgears.com/bdga/bdgaWFS-T.html# which seems to do what I am looking for. Will update when I have investigated it more. Also found bunch of related gis.stackexchange questions. I will look through them more carefully, at first glance none had an easy answer:   * I want to edit corresponding postgresql data of a vector from openlayers- how to do it?   * How to edit Attributes on WFS Layer through Popup?   * How to edit feature attributes with openlayers?   * Modify WFS with OpenLayers   * adding non spatial attributes using geoserver   * How to insert non-spatial data through WFS-T insert? And from openlayers-dev: http://lists.osgeo.org/pipermail/openlayers- dev/2007-April/000520.html


Reload Geoserver with REST - password security

I've found the way to reload Geoserver by REST (Geoserver Configuration Reload), but my issue is about security of that solution. My reload request is fired from a bash script periodically, so it's written in file. Is there a way to hide the password from other users with root access to the server?


gdal2tiles problem

Im using the following to try to produce a tms tileset:               gdalbuildvrt test.vrt *.tif      gdal2tiles -p raster --zoom=0-6 test.vrt out      Two tifs work fine, more than that and it seems to miscompute the resolution and i end up with tiles that have a small image top left with 3/4 of the tile empty gdalinfo shows:               PROJCS["Transverse Mercator; New Zealand Geodetic Datum 2000; GRS80",         GEOGCS[,         DATUM["unknown",             SPHEROID["GRS 1980",6378137,298.2572221010002,             AUTHORITY["EPSG","7019"]]],         PRIMEM["Greenwich",0],         UNIT[,0.0174532925199433]],         PROJECTION["Transverse_Mercator"],         PARAMETER["latitude_of_origin",0],         PARAMETER["central_meridian",173],         PARAMETER["scale_factor",0.9996],         PARAMETER["false_easting",1600000],         PARAMETER["false_northing",10000000],         UNIT["metre",1,         AUTHORITY["EPSG","9001"]]]     Origin = (1419997.883500000000000,5154002.116499999500000)     Pixel Size = (4.233000000000000,-4.233000000000000)     Metadata:       TIFFTAG_IMAGEDESCRIPTION=Composite       TIFFTAG_XRESOLUTION=300       TIFFTAG_YRESOLUTION=300       TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)       AREA_OR_POINT=Area     Image Structure Metadata:       INTERLEAVE=PIXEL     Corner Coordinates:     Upper Left  ( 1419997.884, 5154002.116) (170d45'51.96"E, 43d44'42.58"S)     Lower Left  ( 1419997.884, 5118000.451) (170d45' 8.17"E, 44d 4' 8.61"S)     Upper Right ( 1444003.227, 5154002.116) (171d 3'44.60"E, 43d45' 2.17"S)     Lower Right ( 1444003.227, 5118000.451) (171d 3' 6.65"E, 44d 4'28.43"S)     Center      ( 1432000.555, 5136001.284) (170d54'27.89"E, 43d54'35.81"S)     Band 1 Block=5671x17 Type=Byte, ColorInterp=Red     Band 2 Block=5671x17 Type=Byte, ColorInterp=Green     Band 3 Block=5671x17 Type=Byte, ColorInterp=Blue      Do i need to manually specify the resolution and if so how?


How to use custom symbols in mapinfo?

Is it possible to create custom symbols in mapinfo and use it in thematic shading?How? > Mapinfo - 10.5


Rendering a geotiff block with gdal and gdk-pixbuf - Some flaws in the result

I currently try to render a geotiff file with GTKmm\GDKmm (gdk-pixbuf). The file is a tiled geotiff with a block size of 256*256 and three rasterbands. The shortened `gdalinfo` output is:               Driver: GTiff/GeoTIFF     Metadata:       AREA_OR_POINT=Area     Image Structure Metadata:       INTERLEAVE=PIXEL     Corner Coordinates:     Upper Left  (    0.0,    0.0)     Lower Left  (    0.0, 3528.0)     Upper Right ( 6189.0,    0.0)     Lower Right ( 6189.0, 3528.0)     Center      ( 3094.5, 1764.0)     Band 1 Block=256x256 Type=Byte, ColorInterp=Red     Band 2 Block=256x256 Type=Byte, ColorInterp=Green     Band 3 Block=256x256 Type=Byte, ColorInterp=Blue      I want to render the first block with this code:               std::unique_ptr<unsigned char[]> Dataset::getPixelData(int rasterBand)     {         GDALRasterBand* band = data->GetRasterBand(rasterBand);         int xSize = 0;         int ySize = 0;              band->GetBlockSize(&xSize, &ySize);         if(xSize != 0|| ySize != 0) {             int size = xSize*ySize; // GDALDatatype is GDT_Byte             std::unique_ptr<unsigned char[]> ptr = std::unique_ptr<unsigned char[]>(                 new unsigned char[size]             );             band->ReadBlock(0,0,ptr.get());             return ptr;         } else {             ...         }     }          // Draw with pixbuf     void MapView::setPixelData(std::unique_ptr<unsigned char[]> pixel)      {         guchar* ptr = pixel.get();         pixbuf = Gdk::Pixbuf::create_from_data(             ptr,             Gdk::Colorspace::COLORSPACE_RGB,             false, // No alpha             8, // 8 bit per sample             256, // width             256, // height             256*3 // rowstride         );     }      The basic drawing works, but the resulting image looks like this: ![Result](http://i.stack.imgur.com/PtBip.png) The lower right section (with the word "Katzenbukel") is the correct block I want to draw, but I cannot find out what is going wrong here. The lower left block (with the number 1729) is some part of the correct block, but it has to be on the right side. So there is some shifting effect in the image. Is there some offset in the data which I didn't considered? I also get the same result when reading other blocks of the image. Would appreciate some help here.


How to make crs transformation of a QgsVectorLayer?

I need to transform QgsVectorLayers in python from one crs into another crs. By googling I found the following solution (https://qgis.readthedocs.org/en/latest/docs/pyqgis_developer_cookbook/05_crs.html), which works for points only:               crsSrc = QgsCoordinateReferenceSystem(4326)    # WGS 84     crsDest = QgsCoordinateReferenceSystem(32633)  # WGS 84 / UTM zone 33N     xform = QgsCoordinateTransform(crsSrc, crsDest)     pt1 = xform.transform(QgsPoint(18,5))      Is there a way to make a crs transformation of an entire layer?


Writing conditional (if/then) statements into Field Calculator of ArcGIS for Desktop using Python parser?

I have gotten stuck on another seemingly simple arcgis field calculator python expression. I obtained a great answer to a another similar question a few years ago: Python Field Calculator ArcGIS 10 expression for a RANGE. Now I need to populate a new field based on 6 ranges of values (bedrock depth). My attempt at writing this expression is below: ![enter image description here](http://i.stack.imgur.com/JEmEH.png) I just need to populate the empty field "bedrockdp" using the ranges in the toc called brockdepmin. Appreciate any help and suggestions on where this sort of basic stuff can be found online in the future besides asking here. screen shot Pre-Logic Script Code:               def !GRIDCODE! (value):         if value >0 and value < 50:             return "0 - 50 cm from the surface"         else:             return "n/a"      bedrockdep =               GRIDCODE (!bedrockdep!)


3D map with latitude and longitude

I have a 3D map with latitude and longitude details. Is there a way I can take a 2D image (a png image) from 3D model in such a way that my 2D image also have the latitude and longitude as it is in 3d model ? Can 2D image have the details as latitude and longitude ? Which software should I use for doing this. Can anyone please point me to some online tutorial if available ? Thanks,


How to create a balloon for a dynamic KML file?

I want to create a balloon for a KML file that dynamically moves. The example that I am working on is sundials.html. Let's say that the KML is moving. How we would get the balloon to move as well? TIA.


Clip (Analysis) in ArcGIS 10 running indefinitely

I am attempting to clip a series of polylines (cross sections) using a single polygon. There are approximately 2400 polyline features in my input featureclass. Is this too large for the Clip tool to handle? I've tried it a few times and each time I've just shut it off after 40 or so minutes. I figure it should take less than a minute to run. Any thoughts?


How to replace protocol in geoext.form.formpanel

I've been scratching my head over this and I'm wondering if this is possible. I want to replace the protocol of the GeoExt.form.FormPanel in the following way:   1. to render the formpanel, I defined a variable "proto" as null outside the formpanel (var proto = null).   2. then "proto" goes inside the formpanel (protocol: proto).   3. in the handler function of the button a new variable "proto" is defined. I want to replace this new variable inside the formpanel. Since extjs, geoext, openlayers are javascript libraries, I've tried things such as "eval" to make the variable "proto" inside the handler accessible in the formpanel but no luck so far. Here it is a simplified example to show this:               var proto = null;          var formPanel = new GeoExt.form.FormPanel({         protocol: proto,                # <--- replace with [1]         items: [{             xtype: "combo",             id: "idcombo",             etc...         }, {             xtype: "textfield",             id: "idtext",             etc...         }],         button:[{             text: "search",             handler: function() {                 formPanel.search();                 var combo = Ext.getCmp('idcombo').getValue();      # <--- this works and gets the value chosen in "xtype: combo"                 var proto: new OpenLayers.Protocol.HTTP({          # <--- [1] (ie. new variable "proto")                     url: "http://www.pub.pub/" + combo + "/somestuff/",    # <--- this works                     format: etc...                 })             }         }]     })      how could I do this? I'll appreciate your support, thanks in advance. Best regards, Gery


How to Georeference 2.5D or Birds Eye View models or Buildings?

I am working on 2.5D mapping.So I don't know how to georeference Birds Eye Viewor 2.5D view buildings.If you did not understand then open http://www.youcity.com there you will find 2.5D buildings.If anyone knows help me.


How to convert jpg file to shapefile?

I am developing a GIS application like this: ![image](http://i.stack.imgur.com/I0h9c.jpg) By now my steps are:   1. I have got a jpg file, 5040 x 8179 dimension. In this map, the roads, rivers, towns etc. are marked.   2. I am using .Net to develop and this requires a shp file to be used properly.   3. I tried using qGIS to vectorize this jpg and georeferencing it but the shapefile that comes out is like full green color etc.. How to convert my original jpg map data to shp format? I have very little experience in GIS, so any suggestion/comments is mostly welcomed.


Shape file generation

Is it possible to generate a shape file with lines and polygons using only the image for which it has to be generated ? I need the lines,polygons feautres of the shape file in an algorithm which i am implementing. Has anyone come around a way/code to generate only file using .jpg and .jgw data only ?


What does "You do not have necessary license to run tool" mean when ArcGIS extension installed and activated?

I just purchased **ArcGIS for Home Use 10.2** and installed and activated the extensions with the codes I received from Esri. The ArcGIS Administrator says Yes for Installed and Authorized, and even has an expiration date. However, when I try to run the tool it states "You do not have the necessary license to run the tool" and that there is no license available or installed. Am I missing something ?


Installing qgis 2.0 and saga 2.1 on ubuntu 13.04

I have been trying to get this working for a few weeks now. I am trying to install QGIS Dufor (2.0.1) and Saga GIS from the Unstable branch of the UbuntuGIS PPA. When I attempt to do this I get the following error               The following packages have unmet dependencies:      saga : Depends: libsaga (= 2.0.8+dfsg-4~raring) but 2.1.0-0~raring2 is to be installed     E: Unable to correct problems, you have held broken packages.      It appears that the dependencies have not been updated. When I try to install saga from the Johanvdw/saga-gis ppa i am told that two dependencies are too old and required by QGIS. The only way I can get both programs installed at the same time is to install the QGIS nightly build. When I do things this way Sextante can not seem to locate the saga routines. With the changes in sextante now that it has been added to trunk, there is no longer a field to specify the directory that SAGA resides in. I have a similar topic open HERE. I am out of ideas at this point.


How to use a hillshade dataset in QGIS?

I received “Hillshade” data that I'm trying to use in QGIS. When I check the "Pseudocolor" option under "Color map", I get many colors, apparently corresponding to the terrain, though it doesn't jump out in an intuitive way. "Freak out" also does that, w/ a different color scheme. (Don’t know if these options came with QGIS or with my data.) But "Colormap" doesn't show up at all, and Grayscale is just uniformly gray. I expected grayscale to exhibit shades that would make the terrain stand out intuitively - but I don't really know what to expect. Any idea what my problem might be?


What are sources for current geo-statistical analysis classes/events: open or proprietary

I am keenly interested in geo statistics (and many other words with 3 t's :).   I am not very programatically inclined but have been following several lists with this theme.   One being the R filter on stackexchange (I get occasional digest emails of questions there).   I find that there is an extremely intricate language associated with statistics in general.   I am insterested in learning from a layperson point of view what some of this language means and how to apply it to everyday GIS. Please list any currrent sources for geo-statistics knowledge/understanding. Here is an example of useful information...   travel for training   live online opportunity Edit: Per request; I enjoy online training but get more from in classroom or step by step book (or pdf).


QGIS - Convert Vector points to GPS waypoints and route

I'm new here. I have a shape file with a series of points (around 300) using British National Grid. I need to put them on my Garmin Etrex 10 as waypoints. Can someone tell me how to convert this shape file into GPX data? It may also be helpful to know how to make this into a route. The points are named 1 to 300 and would be visited in that order. ![This is what I get up when saving as… what field names must I use? s](http://i.stack.imgur.com/1uSLL.png)


How to create a feature class in memory?

I am trying to create a feature class in memory but I am not sure how to use the syntax. My code looks like this:               FC = arcpy.CreateFeatureclass_management("", "in_memory/FC", "POLYGON", "", "DISABLED",                                              "DISABLED", Coordinate_System, "", "0", "0", "0")      Basically I seem to have problem defining the "out_path".


How I can merge different objects of a theme by equal meaning of one attribute of a field (ArcMap)?

Could somebody advise, how I can combine (merge) different objects of a shp theme with equal meaning of one attribute of a field (in ArcMap)? I have shp theme with many objects, in the field "A" some of them have value “1”, some others “2”, others – “3”, etc I need to combine all object with A=1 in a single object, all objects with A=2 – in a single as well, etc for all objects of the shp theme. It seems very simple operation, but I can’t find this possibility in ArcMap. ((


Problem with long running services in ArcGIS Server 10.2

I published a lot services for geoprocessing. Most of them are the long running services. Those services manipulate data but user do not wait for the results. When I use REST Submit Job in the web browser sometimes it works without errors, but more often my processes are cancelled. In the web browser I get esriJobMessageTypeInformative that the service was canceled and aborted by User. This is very annoying behavior because I can not find the reason of this state. Another strange thing is a time of canceling. There is no rule when the process is aborted, sometimes after 4 hours, sometimes after 45 min. This is not the problem with pooling because I have never reached any of maximum times. Any help or idea how to solve it would be appreciated.


Stylized map workflow: Illustrator to Google Maps / OpenLayers

**The aim** My current aim is to create a series of (heavily) stylized diagrams and maps. I'm not very familiar with any GIS software, so my weapon of choice would be to use illustrator for creating the maps (the source would be from a GIS system, so the input would be among the lines of a shapefile and is negiotiable). **The problem** So far so good, and I do not forsee any problems in this. The main question: how can the workflow from illustrator to any kind of tileserver with the goal to be displayed in google maps / Openlayers or something alike be achieved as painless as possible? **Vector vs Pixels** : My idea now is to use a tileserver, because I think rasterizing the images will be easier then to import the styles from illustrator back to a GIS server. However, vectorized data might mean a lot less data to transfer and a better user experience. Also: Would you recommend this workflow? Am I going about this the wrong way? Your ideas and suggestions are highly appreciated.


Using ESRI Python's Geoprocessor Via mod_python

I am working on a number of geoprocessing services to be accessed solely by web clients. The traditional method of encapsulating this type of stuff in toolboxes and then publishing the toolbox just won't work. For example, I would like to send some binary data (zip files) back to the client, and that is not possible. I know I could store the zip file on the server, and send the url to the client, but I really HATE that approach for many reasons. I am thinking about writing a traditional python based gp script, and making that available to a web client via mod_python and Apache. I haven't even tried it yet to know that its possible, but I can't imagine why it wouldn't be. However, is the use of the geoprocessor in this context legal (I do have valid AGIS Server license)? Any thoughts,comments,suggestions welcome.


How do I 'select' using ArcPy?

When using a cursor to loop through an attribute table, is it possible to iteratively select each row? I want to clip a line to a polygon grid (see previous question); due to the size of the grid the split function fails. Hence I'm interested in selecting each polygon, and clipping the line to the selected cell by using the shapefile with only that cell selected. I'm familiar with looping through the attribute table and performing calculations - but I don't know how to `select` a row.


Does Google Earth Builder support server-side geoprocessing?

Is there a feature in Google Earth Builder that supports server-side geoprocessing? For example, say I upload two large geo datasets to Google's cloud: one with lots of points and another with lots of polylines. Is there some way I can write a script and upload it to the cloud that:   1. finds all points in dataset1 within some distance of a line in dataset2 having some attribute = some specified value.   2. find all points within some distance of the points from step 1 where some attribute = some value   3. buffer the points from 2 based on some other attribute, and return the results I would like for this script to run on the server - not on the client. **Update** : I watched most of the webinar at Directions Magazine, last week. The ~~first 3/4's of the~~ webinar, which included the entire demo and didn't address this question. ~~Right now it is in the process of being archived, but should be available for viewing again shortly~~. **Update** The webinar archive is now available for viewing.


I want to browse a city map offline, what are my options?

I found exports on http://download.bbbike.org/ and http://metro.teczno.com/ But it's not tiles, so it's not really usable unless I render it. Are there software where I can browse openstreetmap.org _tiles_ , but completely offline, for a small region ? Not editing, just browsing and maybe searching streets. Any software which allows me to generate those tiles I want using those exports, and another software to browse tiles ? I don't have a smartphone, I don't have a GPS, but I have a computer and an internet access, but sometimes I don't have a fast enough internet access, so I wonder why I can't find any way to host a limited set of tile map data... I guess you could create a search index on smaller areas on a local computer if you give it enough time... Does JOSM has a viewing mode ? garmin and qlandkarte seems to just be tools to transfer data to GPS devices.


How to distinguish buildings from vegetation in LIDAR data?

In order to extract the vegetation mask in ecognition, with object base analysis, with creation of the rule sets, the buildings were also classified! Any idea how to extract building from vegetation? I tried to use shape and also asymmetry, but other ideas are most welcome.


Converting KMZ/KML to SHP (3D objects)

I have 3D buildings in .kmz file. I can see them in Google Earth, but I cannot import them to ArcGIS. What I've tried until now:   1. I saved it as a .kml file in GoogleEarth and then try to convert the .kml with DNR Garmin to a .shp file. This doesn't work for me. I get zero objects.   2. I also tried Kml2Shp Online but that also doesn't work. I uploaded my .kmz file successfully but then I cannot continue - it says there is no objects... Any ideas how to solve this problem?


FeatureLayer Scale Settings in ArcGIS Silverlight API

Is there a way to translating between resolution and scale in the ArcGIS Silverlight API? I am dynamically adding a Feature Layer to my map which should have a Min Scale value of 10,000. The feature layer object has a setting for Minimum Resolution, but nothing for Scale values. Does anyone know how I can set the Feature Layer to only show data below that scale?


How to use Z-Coordinate in QGIS?

I was mapping an area in Namibia and also tracked a lot of paths on my way with my Garmin device... so I thought it would be nice to see height differences in my area (esp. interesting in the raining-season... where is the water going to be?)... but then I came to notice, that QGIS does not support the Z-Coordinate when using Shape-Files. I have currently all the data stored as a GPX file, how can I get QGIS (1.8) to recognize the Z-Coordinate? And yes my device supports the tracking of height, that's for sure :)


How to draw a rectangle a the map using C#?

I have two points, `Ipoint upperRight;` and `Ipoint lowerLeft;` points. from the previous points i can get the _height_ and the _width_ for the rectangle. How can i draw a rectangle on the map?. I think i should use `IGraphicsContainer.AddElement` Method, but i don't know how, i searched through the internet but didn't find any useful example.


Clarification of the "25D" option in ogr2ogr

[EDIT: In my original post, I had received an error that was based on a typo, so I scrapped that part of the question, but left the questions that still apply.] In the ogr2ogr docs it says:               -nlt type:     Define the geometry type for the created layer. One of NONE, GEOMETRY, POINT, LINESTRING, POLYGON, GEOMETRYCOLLECTION, MULTIPOINT, MULTIPOLYGON or MULTILINESTRING. Add "25D" to the name to get 2.5D versions.      Does this part: `Add "25D" to the name to get 2.5D versions` apply to both loading things into postgres as well as exporting data from postgres to .shp files? Additionally, I am assuming 25D to meant that one can have a z value that corresponds to each pair of xy coordinates (as is the case with PolygonZ shapefile types), but that these coordinates may not overlap. Is this correct? What is the intended distinction in this case between 2.5D and 3D? Thanks


How to change a CSV layer attribute value from text to number - once again?

i have read most of the related postings and answers allready ... (e.g. http://anitagraser.com/2011/03/07/how-to-specify-data-types-of-csv-columns- for-use-in-qgis/ and How to change a CSV layer attribute value from text to number? ... among others) but (!) unfortunately none of them solved my problem. as someone postet on 2012-01-04 12:27 definition of properly defined *.csvt doesn't effect field- import - they are expected to be numbers and still are string. **her is a sample of my csv**   InputID,Mean,Stdev,min,max   1,334.7617168,36.87450474,294.4334857,383.5583136   2,446.3946568,207.949905,153.2494524,613.3182137      **and the csvt**   "Integer","Real","Real","Real","Real"   .. i have already:     * checked field names (no blanks), checked separators, ... which are qgis' default because the csv is distance matrix calculation result   * defined the csvt with simle "Integer","Real" and the precision-type-style "Integer(6)","Real(8.3)"   * changed country settings in win7, win8, osx 10.9 due to known decimal separator issues    * used csv as specified as well as "excel-style" csv   (";"-separated)   * checked all that in qgis 2.0, 2.2, 2.3(master) **and** : at the beginning this problem was related to distance matrix output   ... where qgis calculates the results (and writes the csv-outputs), which of course are numbers (mean, stdev, min, max)   so, initially i was just looking for a straight forward way to use qgis' own calculation results for mapping of distance-distribution ... is there a way to solve or completely bypass the csv-t issue in a way, i can easily communicate to gis-beginners ?


plot shp files like pnm? (Statistical Data Analysis Explained example)

Weird subject? well I'm confused so in advance: sorry for this wavy question: I'm trying to do what the authors of Statistical Data Analysis Explained (ISBN: 978-0-470-98581-6) have done in figure 14-5. (here the essence of that code for plotting)               library(StatDA)     data(moss)     data(kola.background)           X=moss[,"XCOO"]     Y=moss[,"YCOO"]          sel=c("Ag","Al","As","B","Ba","Bi","Ca","Cd","Co","Cr","Cu","Fe","Hg","K","Mg",     "Mn","Mo","Na","Ni","P","Pb","Rb","S","Sb","Si","Sr","Th","Tl","U","V","Zn")     x=moss[,sel]          # Closure problem with log-centring transformation     xgeom=10^apply(log10(x),1,mean)     x2=x/xgeom     x2.obj=log10(x2)     res=princomp(x2.obj,cor=TRUE)          pdf("fig-14-5.pdf",width=6,height=6)     par(mfrow=c(1,1),mar=c(1.5,1.5,1.5,1.5))          ### NEW MAP:     el=res$sco[,1]          # generate plot with background     plot(X,Y,frame.plot=FALSE,xaxt="n",yaxt="n",xlab="",ylab="",type="n")     plotbg(map.col=c("gray","gray","gray","gray"),add.plot=T)      But I do not have a *.pnm file of my area. I have a *.shp file. I can finally plot my shp files correctly, with my datapoints on top thanks to this post. But following their code example my shp file wont plot and it seems like R is suddenly misunderstanding the sequence of plotting. I can't make my actual data available, but the only change in the script is:               #load shp     shp.file <- readOGR(".","name.shp")          #exhange plotbg with     plot(shp.file) # I tried with: add=T and add.plot=T      This is obviously not correct, but I do not have a clue how fix it? I'll happily rephrase the question and should I make available some random dataset?


django---error in displaying data and displaying it on the map

. i am trying to display a feature queried from postgis. . i also designed a user input field to enter the id of the desired feature to be displayed. . i have already queried the attributes first before displaying the feature polygon. . and the attributes were already displayed on the template. .however, while fetching the polygon, i got error. . i do not know why this happens. .i have already displayed it before but not querying it by id, i have already displayed the whole shapefile from the postgis. . BTW this is my views.py               from django.shortcuts import render, redirect     from vectorformats.Formats import Django, GeoJSON     from Apps.models import Butuan_Parcel, AGAO     def search(request):          query = request.GET.get('q')     try:         query = int(query)          except ValueError:         query = None         results = None               if query:         results = Butuan_Parcel.objects.get(id=query)        # obs = Butuan_Parcel.objects.all()         context = RequestContext(request)          s_layer = Butuan_Parcel.objects.filter(id=query)     s_feat = Django.Django(geodjango='geometry', properties=['barangay'])     s_geo = GeoJSON.GeoJSON()     s_parcel = s_geo.encode(s_feat.decode(s_layer.transform(3857)))          # for ob in obs:     #     if query is not ob:     #        return render(request, 'noresults.html')     #    else:     return render(request, 'results.html', 'results':results,'s_parcel':s_parcel, 's_layer':s_layer}, context_instance=context)      and this is my results.html

          {% block content %}          <form method="get" action="/search/">

                  Search Barangay:	             <input type="text" name="q" id="id_q" value="{{ query }}"/>	             <input type="submit" value="Search" />

             ID	             :	                  {{ results.id|safe }}

             Barangay	             :	             {{ results.barangay|safe }}
          {% for i in s_layer %}       {{ i }}          {% endfor %}
     </form>                         {% endblock %}                i tried to display whether my s_layer has data or not, that is why i have               {% for i in s_layer %}       {{ i }}     {% endfor %}      and this displays a right data. . MAUG and when i tried to display `{{ s_layer }}` this gives me [< Butuan_Parcel: MAUG >] when i code `{{s_layer|safe}}` i just have [] as the output.. . on the other hand, i used               {% for i in s_layer %}         var feat = format.read({{i|safe}});         {% endfor %}      so that real data could be parsed into geojson and be displayed in the map. . however, there was no vector layer displayed on the map. . these code chunks I have are seen on the whole code above. . i cannot display this vector layer, can someone give me hints on how to display this on the map. . by the way, thank you for entertaining my post. . have a good day! I got a screenshot and this is the output ![enter image description here](http://i.stack.imgur.com/mIkse.png) I wanted to display the output such as this.. ![enter image description here](http://i.stack.imgur.com/l3Lse.png)


TRMM data download

I need help in downloading 7 day composite TRMM data (Geo-Tiff) like this for past 10 yrs of the SE ASIA region. It is way too confusing where to obtain the data, I wanted to analyze the precipitation over the yrs.


Add Features using JSON

I have the features being added to my map through coordinates by using the following code:                private void btnRefresh_Click(object sender, RoutedEventArgs e)             {                 AddMarkerGraphics();             }                  void AddMarkerGraphics()             {                 string jsonCoordinateString = "{\"Coordinates\":[{\"X\":13.1,\"Y\":55.59},{\"X\":72.83,\"Y\":18.97},{\"X\":55.43,\"Y\":34.3}]}";                 CustomCoordinateList coordinateList = DeserializeJson<CustomCoordinateList>(jsonCoordinateString);                      FeatureLayer featurelayer = MyMap.Layers["Customer"] as FeatureLayer;                           for (int i = 0; i < coordinateList.Coordinates.Count; i++)                 {                     Graphic graphic = new Graphic()                     {                         Geometry = _mercator.FromGeographic(new MapPoint(coordinateList.Coordinates[i].X, coordinateList.Coordinates[i].Y)),                         Symbol = i > 0 ? LayoutRoot.Resources["QueryRenderer"] as Symbol : LayoutRoot.Resources["BlackMarkerSymbol"] as Symbol                     };                     featurelayer.Graphics.Add(graphic);                      }                  }                  internal static T DeserializeJson<T>(string json)             {                 T objectInstance = Activator.CreateInstance<T>();                 System.IO.MemoryStream memoryStream = new System.IO.MemoryStream(System.Text.Encoding.Unicode.GetBytes(json));                 System.Runtime.Serialization.Json.DataContractJsonSerializer jsonSerializer =                     new System.Runtime.Serialization.Json.DataContractJsonSerializer(objectInstance.GetType());                 objectInstance = (T)jsonSerializer.ReadObject(memoryStream);                 memoryStream.Close();                 return objectInstance;             }         }              [DataContract]         public class CustomCoordinateList         {             [DataMember]             public List<CustomCoordinate> Coordinates = new List<CustomCoordinate>();         }              [DataContract]         public class CustomCoordinate         {             public CustomCoordinate() { }             public CustomCoordinate(double x, double y)             {                 this.X = x;                 this.Y = y;             }                  [DataMember]             public double X { get; set; }             [DataMember]             public double Y { get; set; }         }      Can I use the JSON request alternatively to add a feature. Here are my fields: > > OBJECTID ( type: esriFieldTypeOID , alias: OBJECTID , editable: false , > nullable: false ) > > PWSID ( type: esriFieldTypeString , alias: PWSID , > >> editable: true , nullable: false , length: 7 ) > > CIS_METR ( type: > >> esriFieldTypeString , alias: CIS_METR , editable: true , nullable: false , length: 15 ) > > CUSTYPE ( type: esriFieldTypeString , alias: > >> CUSTYPE , editable: true , nullable: false , length: 20 ) > > SIZE ( type: > >> esriFieldTypeDouble , alias: SIZE , editable: true , nullable: false ) > > TYPE ( type: esriFieldTypeString , alias: TYPE , editable: true , > >> nullable: false , length: 15 ) > > OTHTYPE ( type: esriFieldTypeString , > >> alias: OTHTYPE , editable: true , nullable: false , length: 50 ) > > MANUF > >> ( type: esriFieldTypeString , alias: MANUF , editable: true , nullable: false , length: 20 ) > > MODEL ( type: esriFieldTypeString , > >> alias: MODEL , editable: true , nullable: false , length: 10 ) > > YEAR ( > >> type: esriFieldTypeString , alias: YEAR , editable: true , nullable: false , length: 8 ) > > TESTDATE ( type: esriFieldTypeString , alias: > >> TESTDATE , editable: true , nullable: false , length: 8 ) > > MASTER ( > >> type: esriFieldTypeString , alias: MASTER , editable: true , nullable: false , length: 3 ) > > MBOX ( type: esriFieldTypeString , alias: MBOX , > >> editable: true , nullable: false , length: 3 ) > > MBOXTYPE ( type: > >> esriFieldTypeString , alias: MBOXTYPE , editable: true , nullable: false , length: 10 ) > > PLACE ( type: esriFieldTypeString , alias: PLACE > >> , editable: true , nullable: false , length: 75 ) > > STR ( type: > >> esriFieldTypeString , alias: STR , editable: true , nullable: false , length: 64 ) > > CITY ( type: esriFieldTypeString , alias: CITY , > >> editable: true , nullable: false , length: 30 ) > > COUNTY ( type: > >> esriFieldTypeString , alias: COUNTY , editable: true , nullable: false , length: 3 ) > > AGENCY_CON ( type: esriFieldTypeString , alias: > >> AGENCY_CON , editable: true , nullable: false , length: 75 ) > > CONTACT ( > >> type: esriFieldTypeString , alias: CONTACT , editable: true , nullable: false , length: 75 ) > > LAST_UPDT ( type: esriFieldTypeString , > >> alias: LAST_UPDT , editable: true , nullable: false , length: 8 ) > > XY_SOURCE ( type: esriFieldTypeString , alias: XY_SOURCE , editable: > >> true , nullable: false , length: 75 ) > > XY_ISSUES ( type: > >> esriFieldTypeString , alias: XY_ISSUES , editable: true , nullable: false , length: 254 ) > > ATT_SOURCE ( type: esriFieldTypeString , alias: > >> ATT_SOURCE , editable: true , nullable: false , length: 75 ) > > ATT_ISSUES ( type: esriFieldTypeString , alias: ATT_ISSUES , editable: > >> true , nullable: false , length: 254 ) > > COMMENTS ( type: > >> esriFieldTypeString , alias: COMMENTS , editable: true , nullable: false , length: 254 ) Sorry if that is hard to read. If I can figure out how to change one, then I can figure out how to change them all. The JSON request as shown in the API Reference for WPF is: Input:               [         {           "attributes" : {             "req_id" : "508389",             "req_type" : "Graffiti Complaint - Public Property",             "req_date" : "09\/19\/2009",             "req_time" : "18:44",             "address" : "11TH ST and HARRISON ST",             "x_coord" : "6008925.0",             "y_coord" : "2108713.8",             "district" : "6",             "status" : 1           },           "geometry" : {             "x" : -122.41247978999991,             "y" : 37.770630098000083           }         }     ]      Response Example:               {       "addResults": [        {         "objectId": 617,         "success": true        },        {         "success": false,         "error": {          "code": -2147217395,          "description": "Setting of Value for depth failed."         }        }       ]     }      Any help would be appreciated. Thank you in advance.


Can I have two kinds of point geometry in a shapefile or I should create multipoint shapefiles?

Following my previous question, can I have a mixture of two kinds of geometry in a shapefile of type point. Just like I have about shapefiles of type polygon or I should always create a shapefile of type multipoint in order to support multipoints in my layer? My problem is as you see here, I can't use `ogrinfo` in order to understand that the geometry type of a multipoint shapefile will be known as `wkbMultipoint` or `wkbPoint`when I use this line of code:               OGRwkbGeometryType GeometryType = poLayer ->GetGeomType();        for a layer of type `multipoint` before programming.   * Will OGR know a layer of type `multipoint` as `wkbpoint` or `wkbmultipoint`?    * When we create a shapefile in ArcCatalog, we have point and multipoint, but not multipolyline or multipolygon for polyline and polygon.Why?


ogr2ogr: How to get center point of line?

How to get the center point of a line using ogr2ogr command line? I am unable to get a proper script to get this work.


How to select the identities of a layer present just in one identity of another layer

I'm a student approaching to QGIS 2.0.1-Dufour. My goal is to know how much identities of a layer are present just in one identity of another layer. I tried both with the tools "spatial query" and "intersect" (see the picture) but I can't select just one identity. What I want to know is the number of the red dots that are present in just one area defined by the black line. I hope I've been clear. If you need more information say to me. thank you! ![enter image description here](http://i.stack.imgur.com/X6E9I.png)


this is just a thinking type of question: what would you recommend to improve spatial data availability and access in Ireland?


Arcgis Dynamic Mapservice from sqlserver 2008 r2

I publish the mapservices from the sqlserver2008 R2 through ArcSDE using ArcServer 10.1. Its fine i published, now i change the attributes of my existing gdb using ArcSDE. Now the updated information is not replicated in the mapservices. How can i solve the issue.


How to use OpenLayers Geolocate with the OpenGeo Suite Client SDK?

I’d like to have GPS functionality added to my OpenGeo Suite Client SDK application. From what I understand it should be possible to use the Geolocate control from OpenLayers. Preferably there would be a checkbox (placed on map.tbar) with the option of continuous tracking. If that’s not possible, a button that gets the current position would do as well (like this example). How would I go about incorporating Geolocate? Thanks.


ArcSDE cannot perform post installation

I have installed the following before I installed ArcSDE 10.2.1:   1. ArcGIS for Desktop 10.2.1(standard)   2. ArcGIS for server Enterprise 10.2.1(standard)   3. MS SQL server 2008   4. create enterprise geodatabase successfully After I installed ArcSDE 10.2.1, when I tried to perform arcsde post installation" I cannot find it in "Start -> All Programs -> ArcSDE -> arcsde for microsoft sql server post installation", I only got "Command References" under ArcSDE. Anything I missed?


ST_buffer display creates big circle

$result = pg_query("SELECT ST_Astext(ST_Buffer(ST_GeomFromText('POINT( 80.7605 7.67833 )'),1))"); ST_buffer display creates big circle.. ![enter image description here](http://i.stack.imgur.com/eWeKf.png)


how to get map from geoserver using longitude,latitude,zoom level,device width and height?

I need show a map as image(gif) in my windows mobile. Only i will get center latlon value , zoom level and width-height mobile screen. Please help me to solve this. Thanks & Regards Shafeek


Will mongodb simplify geometry like PostGIS?

I use the ST_Simplify() function in PostGIS, and am moving to a new geostack with mongodb. Does it have a comparable function?


converting grid references to long/lat

If I import from a POST DB a set of points that are referenced by grid reference, will the long/lat decimal also be added to the file? or will I have to convert the points to long/lat myself? In short: I am importing grid references, but want to display long/lat + store the long/lat? Any suggestions?