title: Geoserver PrintingProvider crushes after font color change I do to config.yaml

text: I've installed OpenGeo 3.1 and I want to do some changes in config.yaml. The thing is that after certain changes like changing font color or adding font type it cause the print provider to crush. for example : In A4:               - !text        text: "${mapTitle}"        fontSize: 30        spacingAfter: 30        align: center      if I add `font: Helvetica` or add `fontColor:black` I get error from `http://localhost:8080/geoserver/pdf/info.json` **This makes me think that the printing provider i'm using doesn't support these configurations** I've checked in geoserver , These 2 jars are installed :               printing-2.2-SNAPSHOT.jar     print-lib-1.2-20101018133712.jar      What am I missing here ?!               HTTP ERROR: 500          org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.ho.yaml.exception.YamlException: Error near line 0: End of document expected.          RequestURI=/geoserver/pdf/info.json     Caused by:          java.lang.RuntimeException: org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.ho.yaml.exception.YamlException: Error near line 0: End of document expected.         at org.geoserver.monitor.MonitorFilter.doFilter(MonitorFilter.java:177)         at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:70)         at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:45)         at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)         at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49)         at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)         at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)         at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)         at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)         at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)         at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)         at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)         at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)         at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)         at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)         at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)         at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)         at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)         at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)         at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)         at org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:53)         at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)         at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter      This is the originl config.yaml :               dpis: [75, 150, 300]          scales:         - 524288000         - 262144000         - 131072000         - 65536000         - 32768000         - 16384000         - 8192000         - 4096000         - 2048000         - 1024000         - 512000         - 256000         - 128000         - 64000         - 32000         - 16000         - 8000         - 4000         - 2000         - 1000          hosts:         - !localMatch             dummy: true         - !ipMatch             ip: 0.0.0.0             mask: 0.0.0.0          layouts:              A4:             metaData: &commonMetaData                 title: "${mapTitle}"                 author: "GeoExplorer"                 subject: "Map printed with the OpenGeo Suite"                 keywords: "map,print"                 creator: "OpenGeo Suite"             mainPage:                 pageSize: A4                 rotation: true                 items:                     - !text                         text: "${mapTitle}"                         fontSize: 30                         spacingAfter: 30                         align: center                     - !map                         spacingAfter: 10                         width: 440                         height: 600                     - !scalebar                         type: bar                         maxSize: 100                         barBgColor: white                         fontSize: 8                         align: right                         spacingAfter: 10                     - !text                         text: "${comment}"              Legal:             metaData: *commonMetaData             mainPage:                 pageSize: LEGAL                 rotation: true                 items:                     - !text                         text: "${mapTitle}"                         fontSize: 30                         spacingAfter: 30                         align: center                     - !map                         spacingAfter: 10                         width: 440                         height: 650                     - !scalebar                         type: bar                         maxSize: 100                         barBgColor: white                         fontSize: 8                         align: right                         spacingAfter: 10                     - !text                         text: "${comment}"              Letter:             metaData: *commonMetaData             mainPage:                 pageSize: LETTER                 rotation: true                 items:                     - !text                         text: "${mapTitle}"                         fontSize: 30                         spacingAfter: 30                         align: center                     - !map                         spacingAfter: 10                         width: 440                         height: 550                     - !scalebar                         type: bar                         maxSize: 100                         barBgColor: white                         fontSize: 8                         align: right                         spacingAfter: 10                     - !text                         text: "${comment}"


title: Export georeferenced image into Google Earth

text: I have created a georeferenced image as instructed in this fine tutorial: http://qgis.spatialthoughts.com/2012/02/tutorial-georeferencing-topo- sheets.html Now I would like to get this image into Google Earth, as an Image Overlay or such. Any tips?


title: Does the Bing Maps API have a distance to coast service?

text: Does the Bing API contain a distance to coast service from an address? All we need to do is calculate the distance to a major coastline (Atlantic or Gulf of Mexico).


title: how to combine GPS track logs using modelbuilder?

text: I'm creating a model to import GPS tracks(.GPX files) into ArcMap, this is to create a network of driveable off road vehicle routes. I've manage to do some of the things I'm trying to do, but there are some problems I haven't been able to figure out, and I was hoping that some of you might be able to help! I'm using ArcGIS desktop 10.2. what i want "out" is: 1) generalized lines from the different tracks( Integrate tool) 2) number of tracks combined to make one line segment (with integrate) 3) average speed on the line segments 4) average time(seconds) it takes to drive the line segment 5) last date driven 6) graphic representation of how many times a line segment is driven So far I've made two separate models, simply because I can't figure out how to combine them. model one: ![enter image description here](http://i.stack.imgur.com/i3pVd.png) This model takes GPX files from the folder "Tracklogs", "GPX to feature" imports the gps points with all its data. "Convert time field" converts a dateTime field into a Date field. "GPX speed" creates a polyline containing speed values for each line segment(line segments between gps points), "Split line at vertices" so I can use "join field" to get both time and speed info togehter. "Add field" and "calculate field" to calulate speed and distance to get seconds it takes to drive on line segment. model two: ![enter image description here](http://i.stack.imgur.com/ajCgo.png) this one merges all files from the first model, ideally I would like to have this one connected to the first model, but when i tried that it would not merge all features together, i think "merge" ran once for every file separately instead of once for all the files.? Integrate gives me a feature class with the averaged line from all the lines and "kernal Density" gives me a graphic representation of how much traffic there has been in different areas.   (in this example there is only two GPX-files, but the model is intended to run potentially for several hundred) attribute tables: ![enter image description here](http://i.stack.imgur.com/6oIU8.png) split_0 and split_1 is the result of the first model,and the SplitLine_Merge is the result of the second model. here you can see some of the problem, the attribute speed and seconds is the same as from split_1, even though the Shape_Lenght is different. I need it to average the speed from both tables when it integrates. so to sum up: 1) generalized lines from different tracks - Accomplished using Integrate 2) Number of tracks combined to make on line segment on the Integrate - not accomplished 3) average speed on the line segments - not accomplished in the generalized lines 4) average time(seconds) it takes to drive the line segment - not accomplished in the generalized lines 5) last date driven - not accomplished in the generalized lines 6) graphic representation of how many times a line segment is driven - accomplished using Kernal Density I know that this is a comprehensive question with several sub-questions so I'm happy with every answer/tip that can help me solve parts of my problem. Thanks in advance!


title: Problem on MapFishPrint in jpeg formate images

text: i am using MapFishPrint plugin for printing the my gis map .I am printing the map in two format PDF and JPEG format.my problem is that when i am printing the map in JPEG image formate then the map title and Comment is not printing with JPEG images But map is printing fine.the map title and comment is blank in JPEG image. But when i am printing the image PDF formate then all map is printing fine with map title and comment. So i want to know that JPEG formate is supported by JPEG image in MapFishPrint.? This my code on config.yaml file for A4 page size #=========================================================================== A4 portrait: #=========================================================================== # override the default outputFileName defined above # outputFilename: A4_Layout               mainPage:       rotation: true       pageSize: A4       header:         height: 50         items:           - !text             font: Helvetica             fontSize: 20             align: center             text: '${mapTitle}'            items:         - !map           spacingAfter: 30           width: 440           height: 580         - !text           text: '${comment}'           spacingAfter: 30            footer:         height: 30         items:           - !columns             items:               - !image                 maxWidth: 150                 maxHeight: 100                 align: left                 url: http://www.links-map.com/live/pymble/img/logo1.jpg               - !text                 align: right                 text: 'Page ${pageNum}'      Basically how to print Text with image Thanks


title: ggmap fortify start and end jumble

text: I have a census tiger line file for counties available from the Census website. I am trying to display this file on a `ggmap`, but `fortify` seems to jumble the regions. I can't find anyone else who has run into this error, but I'm certainly not doing anything out of the ordinary...               library(maptools)     library(ggmap)     library(rgeos)          # read shapefile     WGS84 <- CRS("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +towgs84=0,0,0")     Counties <- readShapeSpatial("tl_2013_us_county.shp", proj4string = WGS84)          # limit to Ohio     Counties <- Counties[ Counties$STATEFP == 39, ]          # fortify     Counties.fort <- fortify(Counties, region = "GEOID")          # get base map and plot     OhioMap <- get_map("Ohio", source = 'google', maptype = 'terrain', zoom=7)     ggmap(OhioMap) + geom_polygon(aes(x=long, y=lat), fill = 'grey', alpha=0.4,                                    color = 'black', data = Counties.fort)      ![enter image description here](http://i.stack.imgur.com/CP0Mq.png)


title: cad to shapefile conversion

text: i have use arcgis10.1,arcobjects.net. i did following code                       ESRI.ArcGIS.Geoprocessor.Geoprocessor gp = new ESRI.ArcGIS.Geoprocessor.Geoprocessor();             gp.OverwriteOutput = true;                  ESRI.ArcGIS.ConversionTools.FeatureClassToShapefile tool = new ESRI.ArcGIS.ConversionTools.FeatureClassToShapefile();                       tool.Input_Features = @"F:\test buffer of JAMNAGAR SHP FILES ex3\FOOTPATH.dwg";             tool.Output_Folder = @"C:\Temp1";             gp.Execute(tool, null);      but after execute this code i got error "Error HRESULT E_FAIL has been returned from a call to a COM component. " if any one have any suggestion or any sample for this conversion or any link then send me please ..


title: finding length of a custom type array in mapbasic

text: Hello I am just getting started with MapBasic and I have run in to some trouble trying to count the items in a custom type i have tried accomplishing this by running a loop until an error occur. Problem is that the error trapping does not seem to happen i just keep getting a dialog with an out of range error message what am I missing here? My code is as follows:               Type KeyValuePair     Pos As Integer     Key As Integer     StringVal As String     End Type          Type PopupMenu_Items     ControlId As Integer     Values() As KeyValuePair     End Type          Sub CountPopupMenu_Items (countResult As Integer, arrayToCount() As PopupMenu_Items)     Dim i As Integer      Dim controlId As Integer     i = 1     Do While i = i         controlId = arrayToCount(i).ControlId         OnError Goto endOfArray         i = i + 1     Loop     last_exit:         exit sub     endOfArray:         countResult = i - 1         resume last_exit     End Sub


title: How to implement viewshed calculation?

text: I'm looking for a way to implement visibility (aka viewshed). I found a previous GIS SE question that suggested a few GIS applications (not what I need - I'm trying to embed the calculations), and also SAGA. SAGA looks more like what I'm looking for (C++, Java, C# classes), but I can't understand enough of the API documentation to figure out what classes I even need to instantiate (or subclass). I'm not tied to the idea of SAGA - I'm just looking for library / engine that can do intervisibility calcs. The constraints are that it needs to be:   * reasonably "light weight" (since I'd like to be able to cover embedded / mobile)   * reasonably open source (since my application will be open source, although I'm flexible on exactly which license as long as its (L)GPL compatible). Can anyone recommend such a library or engine, and provide a description of or link to which bit of the library or engine I need to use to viewshed calculations? Alternatively / in-addition, I'd also appreciate references to papers or tutorials that explain how to do these calculations in an efficient way (as applicable to embedded / mobile devices, so a GPU based implementation may not be as useful as something that is more general, and handles low power devices) My preference is an existing implementation, rather than creating something myself (which is a a backup option). _Edit: C++ isn't a firm requirement - anything reasonably portable (C#, C++, Java) will do. I'm trying for a library or templates rather than embedding a large application._


title: How to generate random GeoJSON polygons (latitude, longitude)

text: I am looking how to generate polygons in GeoJSON format with random locations (latitude, longitude), if I generate totally random set of points it will not produce valid polygons. So my question is there a tool or algorithm that allows to generate valid polygons of specific size (radius?) inside of bounding box. **UPDATE#1** Here is more details to clarify my question: Desired polygons should consist of 30-60 points each and represent something similar to square. All generated polygons should not intersect with each other (no inner polygons either). All generated polygons should be placed within specified bounding box (border)


title: ArcGIS 10.1 Database Connection vs ArcSDE

text: I think one of the best capabilities of ArcGIS desktop 10.1 and 10.2 is **Database Connection**. Users can connect to every Database servers without using Middleware(ArcSDE) . You can Distribute, manage users and other capabilities.But why ESRI release ArcSDE 10.1 or 10.2 while we can use Database connecion? What are capabilities of ArcSDE VS Database Connection? Thanks For advance


title: ArcGIS JS Api: Getting information by location from multiple layers

text: I have two layers published in my ArcGIS Server 10.1 server. One is a polygon layer representing the **World map by country** and the other is a **point layer depicting cities**. **Please, note** that cities layer does **NOT** contain the information of the country they belong to, it is contained in the other world countries layer. What I would like to do is creating a sample interface written in ESRI Javascript API to display those Feature Layers, so the user can click on a point representing a city and it appears a popup (or another widget) with the two features associated to this city: **name of the city AND name of the country** the city belongs to. But, if the user clicks on an **area with no cities** , **only the name of the country** should be displayed. I know that it is a quite basic example, but I am not sure on how to tackle this problem: I see examples on retrieving information from a unique layer, but not about how to distinguish between information required from different layers and integrate it all together in a single widget. **EDIT:** Of course, the problem is not building the JS interface but how to retrieve and integrate the information coming from different layers just having the coordinates where the user clicked. Please, can anyone provide some information/concepts/ideas/links to tutorials about that? Thanks for your help!


title: MapServer connection to SQL Server 2008

text: I'm trying to view some data held in a SQL Server 2008 database using MapServer. I can run the GetCapabilities requests without any errors, but when i try and run a GetFeature I get the following error:               <ServiceExceptionReport xmlns="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2.0" xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd">     <ServiceException code="NoApplicableCode" locator="mapserv">     msWFSGetFeature(): WFS server error. ms_error->code not found msMSSQL2008LayerOpen():      Query error. Couldnt make connection to MS SQL Server 2008 with connect string 'Server=xxx;user id=yyy;password=zzz;database=db;trusted_connection=yes'.       Error reported was '[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database "db" requested by the login. The login failed.'.      This error occured when trying to make a connection to the specified SQL server.  Most commonly this is caused by     (1) incorrect connection string      (2) you didnt specify a 'user id=...' in your connection string      (3) SQL server isnt running      (4) TCPIP not enabled for SQL Client or server <br>     </ServiceException>     </ServiceExceptionReport>      When I use the same connection string in a VB.Net aspx page, I can get into the database and table I'm trying to access with MapServer, so I think the connection string is ok. I've enabled the TCP/IP protocols in the SQL Server Configuration Manager. I think this is a MapServer issue in that it can't get to my SQL 2008 database in the same way as my aspx page can. I've also tried setting the SQL 2008 layer connection details using the "plugin" connection type and also as an OGR connection in my mapfile but without any luck. Can anyone give me any pointers as to what to try next please?


title: Error in Symbol Selector Sample

text: This question can seems to be n00b, but really im stuck at running this Arcengine Sample code, then i got this error i'm looking for any working example of Symbol Selector. i'm working on XP SP3, ArcGIS 10.1 and ArcEngine 10.1 Any help please


title: Is transformation of spatial data lossy?

text: I have a shapefile that contains data of a country from the following Geographic Coordinate System ( GCS_North_American_1927 aka NAD27 ) contents from the shape file .prj: GEOGCS["GCS_North_American_1927",DATUM["D_North_American_1927",SPHEROID["Clarke_1866",6378206.4,294.9786982]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]] I have the following questions regarding this data. 1.) When i load this shapefile into SQL server in NAD27 Geographic coordinate system and also convert it to WGS 84 and load it into sql server. When i render both on google maps they look as if they overlap perfectly. Is this because google doesn't have the precision to go out to the proper decimal places to render the spatial data? NOTE: Google maps assumes you will give it WGS 84 spatial data to work with. 2.) Are Transformations lossy? for example if i perform the following transformation NAD27 -> WGS 84 and then go back WGS -> NAD27 do i get the same exact spatial information back or is some precision lost? 3.) If i transform my information from NAD27 to WGS84 to be displayed on google maps will my coordinate alway show the right position of the spatial data relative to WGS84 or will it be slightly off?


title: Add custom CRS - 2.2.0 Valmiera

text: i've builded a custom proj.4 library, tested it by command line (proj and cs2cs) and with postgres/postgis. All works fine. Now i'm trying to make the same with Qgis 2.2.0. I've replaced the original proj.dll, cs2sc.exe, geod.exe, nad2bin.exe, proj.exe with my customs, in my /OSGeo4W/bin folder. in Qgis: "settings/custom CRS" + "Add new CRS" in the "parameters" i've copied the same string as for other tests as '+proj=mercxx +ellps=intl +units=m +datum=WGS84 +no_defs' (without quotes) in 'name' field i've wrote...almost everthing my keyboard can write... even the default 'new CSR' the result is always the same when i hit "OK" : "the proj4 definition of 'mercxx' is not valid. let me know where i'm wrong, please. thanks.


title: How to properly combine and export (as raster) vector lines on top of raster

text: I have a georeferenced TIFF with building plans on it. I then laid topo lines on top of it. it looks right in QGis. I now want to export this as an image (i.e. with the topo lines overlaid). How do I do this? Thanks


title: Create NetCDF subset with different sizes

text: I have to create a netCDF file with different subsets. For example subset1 must be a 2d matrix, subset2 a vector, etc. I am using functions of netcdf library in C/C++ code: nc_create for the file creation, nc_def_dim for dimensions definition, nc_def_var for variable (subsets) definition. Can you indicate me an example code which creates more variables with several dimensions? I didn't find it.


title: Is it possible to distinguish between points with the same coordinates?

text: I have several points with the same coordinates in one layer and of course they are located on top of each other. Is there a way to separate this points automatically (not manually)? I don't want to label them differently nor can I change the coordinates (although there's actually no other way...). But is there a trick or a tool I can use? I'm working ith qgis, v.2.0.1. Thanks.


title: Canada FSALDU 6-digit Postal Code Data Providers

text: I have been looking into finding point data for the Canadian 6-digit postal code (FSALDU). I have come up with 3 sources so far, 2 being far more expensive than the other. After speaking with the sales reps they all seem to be only offering me just the data. Does anyone know what is a causing the large difference in price? Are the more expensive ones more accurate or something? Cheapest (by far) Statistics Canada Most Expensive DMTI Spatial , www.maponics.com/products/gis-map-data/canadian- postal-codes-database/overview


title: Coordinate system for map downloaded Digimap?

text: I have download a 1: 25000 map from Digimap. It came as a tif file along with a tfw file. When I try to import the tif file as a raster layer, I get the following message: 'this layer appears to have no projection specification. By default, this layer will now have its projection set to that of the project, but you may override this by selecting a different projection below'. I then need to pick a projection. The message suggests that the tif isnt georeferenced. How can I georeference the image to a WGS84 projection?


title: Bivariate Mapping (running a single variable regression and mapping r-squared value)

text: I am hoping to produce a bivariate map displaying the correlation between two variables (specifically percent SNAP participation by county against several social variables). I would like to produce something similar to the bivariate maps produced in Geoviz Tool Kit, that can then be exported in a finished format with a scatter plot and map of R-squared values. I have looked into GeoDa, but have been unable to figure this out. I am also wondering if it is possible to do this in QGIS. Attached are examples of what I hope to produce from Geoviz ToolKit. ![Bivariate Map](http://i.stack.imgur.com/ymane.png) ![with scatter plot](http://i.stack.imgur.com/BRS8K.png)


title: QGIS Valmiera, Labels only show for part of polygons

text: Using 2.2.0-Valmiera on Ubuntu 13.10 I have for Croatia 21 Counties as polygons. Labels show only for 12 counties: here I see that no labels are shown for multipart features. So I checked "Show labels for multipart features": No change I unchecked "Discourage labels from covering features: No change I tried a layer with all Municipalities cca 500 polygons. Labels show for most polygons but not all. All multipart polygons failed to show labels. Then I found out that this behaviour of is dependent of the scaling. At 1:25000 all labels show, also on multipart but at 1:50.000 part of the labels are not shown. I controlled: - Scale based visibility : unchecked so okay - Topology: No errors - Geometry validity: no errors Has anyone seen this behaviour and perhaps know a solution Thanks


title: Problem editing raster and saving with projection and transformation intact

text: I am trying to make a custom tool to Arcmap using Python. It is supposed to read in a raster DEM, a point shape file and a distance, and output another raster. The output raster should be essentially the same as the input one. In the process however, I want to edit some the raster values according to a specified function, namely those that are within the input distance from a point in the point file. The problem with my script is the saving part. I have two different approaches. Alt 1 is working in the meaning that I get an output file. However is the projection and transformation completely off and I'm not sure how to fix it. Alt 2 is my preferred approach, but i can't figure out how to write my array to a band in the file. Also I am not sure that the edits gets saved back to the array properly, at least they are not visible in the files I do get. Python is still a bit new to me, so there might just be something simple that I've missed. I'm grateful for all the help i can get! I'm using Arcmap 10.0 and Python 2.6 on Windows 7.               import os, sys, json, osgeo, arcpy, math, arcgisscripting, numpy     from osgeo import gdal, osr, ogr, gdal_array     from osgeo.gdalconst import *          inDEM   = arcpy.GetParameterAsText(0) # .tif     Outlets = arcpy.GetParameterAsText(1) # Point shapefile     outDEM  = arcpy.GetParameterAsText(2) # Path     buffr   = arcpy.GetParameterAsText(3) # Value          # Register GDAL drivers     gdal.AllRegister()          ## Open the DEM     dem    = gdal.Open(inDEM, GA_ReadOnly)     band1d = dem.GetRasterBand(1)     cols   = dem.RasterXSize     rows   = dem.RasterYSize     trf    = dem.GetGeoTransform()     prj    = dem.GetProjection()     driver = dem.GetDriver()          # Get info     band_info  = arcpy.Describe(inDEM + '/Band_1')     nodata_dem = band_info.noDataValue     cellsz     = band_info.meanCellHeight     area       = int(buffr[0])     buffers    = area/cellsz # The area around each chosen cell to use for calculations          # Convert to point file to raster     outlet_raster = 'testraster'     arcpy.env.overwriteOutput = True     arcpy.env.extent = inDEM     arcpy.PointToRaster_conversion(Outlets, "Enabled", outlet_raster, "MAXIMUM", "", cellsz)     arcpy.env.overwriteOutput = False               # Convert rasters to arrays (can probably be done in a more memory-efficient way)     outl_arr = arcpy.RasterToNumPyArray(outlet_raster, "", cols, rows, None)     nodata_o = outl_arr[0,0] # I know this is not the best way, but not an issue atm     f = numpy.argwhere(outl_arr != nodata_o)          dem_arr  = arcpy.RasterToNumPyArray(inDEM, "", cols, rows, None)               # Create slope array     slope = []     x_list = numpy.arange(0,5,.01)     for i in x_list:         slope.append(-math.exp(-i))     length = len(slope)          # Make modifications     non = []     for i in range(len(f)):          index = f[i]         if dem_arr[index[0], index[1]] != nodata_dem:             r_low = index[0] - buffers             r_up  = index[0] + buffers +1             c_low = index[1] - buffers             c_up  = index[1] + buffers +1             data  = dem_arr[r_low:r_up, c_low:c_up]             dim  = math.sqrt(numpy.size(data))             n1 = math.floor(dim/2)             for j1 in range(dim):                 for j2 in range(dim):                     n2 = data[j1,j2]                     dist = math.sqrt((n1-j1)**2 + (n1-j2)**2)*cellsz                      decr = length * dist / area                     if decr < length and decr != 0 and n2 != nodata_dem:                         data[j1,j2] = n2 + slope[int(math.floor(decr))]                     elif decr == 0:                         data[j1,j2] = n2 + slope[0]                     elif decr == length:                        data[j1,j2] = n2 + slope[-1]             dem_arr[r_low:r_up, c_low:c_up] = data           else:             non.append(f[i])          # Trying to save the changes Alt 1.     newraster = arcpy.NumPyArrayToRaster(dem_arr, "", inDEM, "", nodata_dem)     newraster.save(outDEM)          # Trying to save Alt 2.     newdem = driver.Create(outDEM, cols, rows, 1, gdal.GDT_Float32)     newdem.SetGeoTransform(trf)     newdem.SetProjection(prj)     newband = newdem.GetRasterBand(1)     newband.WriteArray(dem_arr) #


title: clipper transformer FME

text: I have a fairly extensive workspace which among other things has an output of shapefiles in several needed projections.   I have those going to the respective folders for use in different business needs. There seem to be several problems with one of my processes (I am using the clipper to split datasets by county lines.) First the configuration of my clipper is with the counties (polygon)[esri geodatabase sqlserver] as the clipper and the dataset (polygon)[esri goedatabase sqlserver] as the clippee. The clippee has several polygons (20) that overlay several counties.   Several of those would "cut" a clippee polygon.   ![clipper1](http://i.stack.imgur.com/NS326.png)   I have tried several scenarios within the parameters dialog (including single clipper, multiple clippers, and clippers first); but first don't see a change in the results and, second don't see what I want. The results are that   1. some of the data is passed through the "inside" port of the transformer, but is not clipped by the boundaries in the clipper dataset.    2. the attributes I want to use to fanout my dataset on are not in the data.    3. All of the data is passed through the "outside" port but is again not clipped, and has no attributes from the clipper dataset.  What I ultimately want is a separate dataset for each county with each respective clippee element having the attributes of the county that clipped them, and a few of their own attributes from the original data.   **Edit:**   I am confused. I created a new workspace with only my clipper and one clippee.   I do get results in my inspector view but all values show clipped - no. I have done as you said the clipper is on top and the multiple clippers is chosen.   I still can't make the 2 attributes from the clipper turn "green" but they are in the output (blank values).   HMM! Not sure what I am doing wrong at this point. I see these values in the log. REJECTING BELOW FEATURE: Error - Expected an aggregate or area geometry. REJECTING BELOW FEATURE: Polygon feature must have at least 4 coordinates...rejecting REJECTING BELOW FEATURE: Error - Expected an aggregate or area geometry. REJECTING BELOW FEATURE: Polygon feature must have at least 4 coordinates...rejecting   Apperantly clipper doesn't take line features as clippee. I added a bufferer (because of the confusing message) and not It is creating 3300 fan out datasets.   Now I have to figure out how to make it just create a dataset for clippers that have clippees in them.


title: How to detect densely labelled areas?

text: I'm trying to detect densely labelled areas for a given scale like explained below. so dense labelled area is the area having high rate of overlapping labels. ![enter image description here](http://i.stack.imgur.com/p81DV.png) I'd like to detect densely labelled area to make inset maps to make labels clear for that areas. like explained in this question I'm using arcpy or ArcObjects.


title: zoomToExtent on Vector Layer

text: Can someone explain if I am doing this correctly please? I've added some vectors to my map, now wish to zoom and centre the map based on the extends of those vectors. I'm using the following code:               var dataExtent = borders.getDataExtent();      which, when examined in FireBug does return the following values:               CLASS_NAME    "OpenLayers.Bounds"     bottom         4187116.4740651     centerLonLat   null     left           -20037508.34     right          20037508.34     top            16852219.924326      And then I'm executing the following:               map.zoomToExtent(bounds, true);      (if it helps to determine if I'm indeed returning the correct values from the getDataExtend() function, the region should be Russia) Do I need to convert those figures from the getDataExtent() to a different format? I've also tried the following, which again didn't do anything:                   var dataExtent = borders.getDataExtent();         console.log(dataExtent);              var tl = new OpenLayers.Geometry.Point(dataExtent.top, dataExtent.left);         tl = tl.transform(new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:900913"));              var br = new OpenLayers.Geometry.Point(dataExtent.bottom, dataExtent.right);         br = br.transform(new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:900913"));              var bounds = new OpenLayers.Bounds(tl.x, tl.y, br.x, br.y);         map.zoomToExtent(bounds, true);


title: Merging Shapefiles With Geotools

text: I am trying to merge some shapefiles with different schemas in geotools. Im aware of ogr2ogr, but for now I would like to figure out this problem with Geotools. The steps I'm taking are: 1) Create a new Merged shapefile with the schema from the first shapefile in a list 2) Update the schema of the Merged shapefile file with the subsequent shapefiles in the list of shapefiles 3) Add features to the merged shapefile 4) Write the shapefile The problem is, I cant add features from shapefiles that contain different schemas. Ok, that seems straight forward enough. But when I try to get the schema from a subsequent shapefile and update the Merged shapefile schema, Geotools throws an exception: "Schema modification not supported" Why wont geotools let me update the schema? Is there something more than just simply calling mergedData.updateSchema(shapefileData.getSchema())               public static void init(ArrayList<String> shpArray, String sessionName)     {         Config config = new Config();              String sessionData = config.getProperty("pathTo_fade_servlets_data") + "sessions/" + sessionName;         String newUrl = sessionData + "/tempShp.shp";              init(newUrl, shpArray.get(0));              for(int k = 1; k < shpArray.size(); k++)         {             mergeShapefile(shpArray.get(k));         }              saveShapefile();     }          @SuppressWarnings("rawtypes")     public static void init(String newURL, String copyURL)     {         try          {                  File newFile = new File(newURL);                  Map<String, Serializable> newFileParams = new HashMap<String, Serializable>();             newFileParams.put("url", newFile.toURI().toURL());                  ShapefileDataStoreFactory dataStoreFactory = new ShapefileDataStoreFactory();                  mergedData = (ShapefileDataStore) dataStoreFactory.createNewDataStore(newFileParams);                  //                  File copyFile = new File(copyURL);                  Map<String, Serializable> copyFileParams = new HashMap<String, Serializable>();             copyFileParams.put("url", copyFile.toURI().toURL());                  ShapefileDataStore shapefileData = (ShapefileDataStore) dataStoreFactory.createNewDataStore(copyFileParams);                  mergedData.createSchema(shapefileData.getSchema());                  mergedFeatureStore = (FeatureStore)mergedData.getFeatureSource(shapefileData.getTypeNames()[0]);                  mergedTransaction = mergedFeatureStore.getTransaction();              }          catch (MalformedURLException e)          {             // TODO Auto-generated catch block             e.printStackTrace();         }          catch (IOException e)          {             // TODO Auto-generated catch block             e.printStackTrace();         }             }          @SuppressWarnings({ "rawtypes", "unchecked" })     private synchronized static void mergeShapefile(String url)      {         if (url == null) return;              try          {             File file = new File(url);                  Map<String, Serializable> fileParams = new HashMap<String, Serializable>();             fileParams.put("url", file.toURI().toURL());                  ShapefileDataStoreFactory dataStoreFactory = new ShapefileDataStoreFactory();                  //                  ShapefileDataStore shapefileData = (ShapefileDataStore) dataStoreFactory.createNewDataStore(fileParams);                  FeatureCollection features = shapefileData.getFeatureSource().getFeatures();             //error occurs here:             mergedData.updateSchema(shapefileData.getSchema());                  mergedFeatureStore.addFeatures(features);              }          catch (Exception e)          {             e.printStackTrace();         }     }           private static void saveShapefile()       {             if (mergedTransaction == null) return;                  try              {                       mergedTransaction.commit();                      mergedTransaction.close();                  }              catch (Exception e)              {                 e.printStackTrace();             }         }


title: Connect overlapping lines

text: I am currently trying to build my first multimodal network using ArcGis 9.2. This is a test using simple data of what I will need to do later with more complex data. **Here is my data:**   * layer 1: One shapefile containing a line feature. It's the main road.   * layer 2: One shapefile containing a polyline feature. These are the secondary roads. My problem is that layer 1 has not been created as connected to the features in layer 2 (created as a long line). As a consequence, there is no vertex where two features intersect, they simply overlap. To be clearer, here is a picture. The blue line is layer 1, the black ones is layer 2 (all the vertices belong to the feature where they stand). **So here is my question:** How can I make to overlapping lines intersect so they can understood as connected when I build my network? Thanks for your help! Damien


title: How to publish maps to web with no programming required?

text: I am new to GIS web development. I do not have any programming background and I want all the maps that I design in GIS (shapefiles, using ArcGIS 9.3) to be published on the web. Please tell me the direct or easy way to do this as I am short of time.


title: Trouble with GeoJSON in HTTP GET Request

text: I using a Vector Layer with the HTTP protocol to request GeoJSON from my web server, and am trying to get this GeoJSON to display on my map. The GET request appears to be working correctly, as I can see the example JSON I requested in Firebug. However, I am getting an error telling me that "this.format is null Openlayers.js (line 1186)". Unfortunately, the OpenLayers.js file is essentially unreadable so I am having a hard time figuring out what my problem might be. I set the format for the Vector Layer to GeoJSON. My code for the layer is below:               var newLayer = new OpenLayers.Layer.Vector("Filtered by Zoom Level", {                             strategies: [new OpenLayers.Strategy.BBOX(),                                          refresh,                                         ],                                  protocol: new OpenLayers.Protocol.HTTP({                                 url: "http://server:8080/test-webapp/servlet",                             }),                                  filter: filter,                                  styleMap: styleMap,                             format: new OpenLayers.Format.GeoJSON({                                 externalProjection: new OpenLayers.Projection("EPSG:4326"),                                 internalProject: new OpenLayers.Projection("EPSG:900913")                             })                              });      Does anybody have any ideas as to what the issue might be? Thanks, -Rob


title: CssParameter stroke-width min max value Geoserver

text: I wonder if there is a minimum value for the stroke width parameter since I've a LineSymbolizer with stroke 0.1 but i want it to be thinner so i change the value to 0.05 but i dont see any difference on the map when the lines are drawn. PS: sorry my english


title: QGIS print composer: Transparency in legend symbols

text: Is there a way to make the legend in the QGIS (v2.0.1) print composer reflect the same degree of transparency as set in the Style box in the main window? The legend symbol colours are shown with no transparency but these look very different to the transparent colours on the map... Doing a search of this question on a different website I found the following answer: "There are two transparency sliders in the style dialog. Altering the big one at the top doesn't affect the transparency of the legend symbol or the style preview in the dialog, but the small transparency slider below the size unit selector does." However, I only see one transparency slider in the style dialog. Or am I looking in the wrong place? Any ideas? Thanks!


title: Split single line based on the 3D length

text: so I have a transect line which I already add the z value using the Interpolate Shape. I need to split this line into 100m in 3D length, which due to elevation must be different than 2D. However the split tool in 3D editor only give me the 2D length. Is there anyway to resolve this? and it will be great if I can do it in batch process. Thanks!


title: How do you change the Window Icons in QGIS 1.7

text: I am a beginner to Qgis 1.7, and I want to change the icon files in Qgis, (whereever we see the 'Q' icon I have to change that). I tried and I got success in the case of mainWindow, and also somewhere it was reflecting but the problem was with menuitem named 'Layer'. when ever i trigger 'add postgis layer' a widget opens but the icon 'containing Q ' was there .. So could you suggest a method through which I can change all the window Icon in the Qgis with the icon which I want... Thank you


title: Issues with defining projection to that of the current root file

text: I am creating a shp file with the extent of all the raster file in a set of directories and it works fine when all the rasters are in the same projection but not when they switch around. So I want to first make sure the temp raster extent shape file has the same projection as the raster and then re-project it to overall projection I am using. These re-projected files are then merged to produce one file with all the extents and other info. The issue is it does not seem to allow me to use the value               desc = arcpy.Describe(File)     spatial_reference = desc.spatialReference      in               arcpy.DefineProjection_management(ShapeFile, spatial_reference)      This gives the following error... > > > > Reading files from C:\arcgis\ArcTutor\Raster\Data\Amberg_tif 12 > Changing Directory to: C:\arcgis\ArcTutor\Raster\Data\Amberg_tif\12 > Processing 2 files in the directory. [u'090160.tif', u'090161.tif'] > Deutsches_Hauptdreiecksnetz_Transverse_Mercator 090160.tif > C:\arcgis\ArcTutor\Raster\Data\Amberg_tif\12 Temp_Polygon_Extent_090160.shp > Copied Defined Executing: Project > C:\arcgis\ArcTutor\Raster\Data\Amberg_tif\12\Temp_Polygon_Extent_090160.shp > C:\arcgis\ArcTutor\Raster\Data\Amberg_tif\12\prj_Temp_Polygon_Extent_090160.shp > PROJCS['GDA_1994_MGA_Zone_55',GEOGCS['GCS_GDA_1994',DATUM['D_GDA_1994',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',10000000.0],PARAMETER['Central_Meridian',147.0],PARAMETER['Scale_Factor',0.9996],PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]] > # > PROJCS['Deutsches_Hauptdreiecksnetz_Transverse_Mercator',GEOGCS['GCS_Deutsches_Hauptdreiecksnetz',DATUM['D_Deutsches_Hauptdreiecksnetz',SPHEROID['Bessel_1841',6377397.155,299.1528128]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Transverse_Mercator'],PARAMETER['false_easting',4500000.0],PARAMETER['false_northing',0.0],PARAMETER['central_meridian',12.0],PARAMETER['scale_factor',1.0],PARAMETER['latitude_of_origin',0.0],UNIT['Meter',1.0]] > Start Time: Thu Sep 08 13:28:15 2011 Failed to execute. Parameters are not > valid. Undefined geographic transformation. So my question is how do I get the script to automatically choose the transformation when the input spatial ref changes from file to file? best,


title: How to migrate GDB data into PostGIS without ESRI apps?

text: Can you tell me how I can load geodatabase data into PostGIS without having to install ESRI apps? The solution I found online talked about using ArcGIS to convert GDB to SHP and then importing SHP to PostGIS. Thanks.


title: Obtaining Australian Spatial Data?

text: I already have basemap data - for that Bing Maps or OpenStreetMap are fine. However, for demonstration purposes I need data for operational layers that I can throw on top of this. It needs to be free, within Australia, and open for use (or I can credit people where need be). For example:   * Flood Zone Data   * Historic bush fire data   * Historic weather data   * Census data   * Crime data   * Disease data Anything. The more the better! Can anyone help provide some sources to gather this information? Google has not given me much luck.


title: How to let the user select a spatial reference using ArcObjects?

text: I need to build a tool where the user selects a coordinate system for a given CAD file. What is the easiest way to do this with ArcObjects? Obviously, I could populate a list with the hundreds of projection constants (i.e. `esrSRProjCSType`), but what user is going to want to scroll through such a huge list? Must be a better way... any tips? Update: Thanks everybody. I went with the SpatialReferenceDialog approach below. Now, anybody know how to use NewGeoTransformationDialog to apply datum trans?               private void btn_getCs_Click(object sender, EventArgs e)         {                  string StatusMsg = "";             bool Status = true;             SpatialReferenceDialog oSpatialReferenceDialog = null;             ISpatialReference oSpatialReference = null;             ISpatialReferenceFactory2 oSpatialReferenceFactory2 = null;             IGeographicCoordinateSystem oGCS = null;                  try             {                 oSpatialReferenceFactory2 = (SpatialReferenceEnvironmentClass)new SpatialReferenceEnvironmentClass();                 oGCS = oSpatialReferenceFactory2.CreateGeographicCoordinateSystem(esriSRGeoCSType.esriSRGeoCS_WGS1984.GetHashCode());                 oSpatialReferenceDialog = new SpatialReferenceDialogClass();                 oSpatialReference = oSpatialReferenceDialog.DoModalEdit(oGCS, false, false, false, false, true, this.Handle.ToInt32());                      txtBx_srDwg.Text = oSpatialReference.Name;             }             catch (System.Runtime.InteropServices.COMException CE)             {                 StatusMsg = CE.ErrorCode.ToString() + ": " + CE.Message;                 Status = false;             }             catch (Exception E)             {                 StatusMsg = E.ToString();                 Status = false;             }             finally             {             }     }


title: Can I intersect (slice) a multipatch geometry and obtain the perimeter line of the intersection as a result?

text: Can I intersect (slice) a multipatch geometry with a vertical polygon (or an extruded line) to obtain the perimeter line of the intersection? (or better yet a polygon) I am creating fairly complex vertical cross sections in ArcGIS and my workflow for creating a sectional view of complex subsurface geological features is VERY time consuming. I am thinking the "Intersect 3D Line With Multipatch" tool might somehow be utilized but it only seems to work with 3D lines and points whereas I need to extract a slice from the multipatch. ![enter image description here](http://i.stack.imgur.com/gbszM.jpg)


title: Arcpy problems regarding convertToMSD() Function

text: I am having trouble getting the ConvertToMSD Function to work. Technically it works, but not in the long run of my script. I use the converttomsd function to create an msd. I then publish this msd as a web service. However, the webservice does not show the map. But.. I can save the mxd to an msd in ArcMap, and then publish from my python script and it works. So the snag seems to be the converttomsd function, I originally thought it was the publishmsdtoserver function, but I was wrong. Any ideas..... I can provide my code if necessary.


title: Which GEO data format does this data represent

text: I am parsing GIS data from a ESRI webservice in which I get the data specified as the following in a JSON file               "geometryType" : "esriGeometryPoint",     "spatialReference" : {     "wkid" : 102100      an example of the data provided has the following look               "geometry" : {         "x" : 1734891.0457560429,         "y" : 5740400.9625475956       }      I don't usually work with GIS data so I am not sure what I am doing. I want to store it in a SQL server DB as a GeoGrapy datatype which requires values between [-90, 90] and [-180, 180] degrees. How Do I convert these coordinates. I do not know which format it is so I can not search for transformation equations. could it be wgs84? (The location is in Europe)


title: Street-view Image not rendering in CartoDB infoWindow

text: Following instructions on Infowindows with Google Street View Images, I'm trying to add this feature to a visualization Instead of an image, I'm simply getting the link to the image via the SQL query as text: ![enter image description here](http://i.stack.imgur.com/PUWu4.png) Wondering if I've done anything wrong. Thanks!


title: How to edit AutoCad coordinate drawing boundaries

text: How can I edit the Autodesk-AutoCad x and y coordinate surface? I would like it to have a larger coordinate boundary than the default...


title: troubles with osm2pgrouting

text: I'm trying desperately to write my first query in pgRouting using maps in osm format (as shown in http://www.carsonfarmer.com/?p=799). Im using Ubuntu 10.10 with Postgresql 8.4 ang postgis 1.5. After adding pgrouting functionality to my database and run osm2pgrouting command:               ./osm2pgrouting -file /home/cfarmer/Downloads/ireland.osm -conf mapconfig.xml -dbname routing -user postgres -clean -passwd myPW      I get this message (that looks to be correct):               connection success     Trying to load config file mapconfig.xml     Trying to parse config      and I was expecting to find in my base tables such as ways, but I see only geometry_columns and saptial_ref_sys. Moreover when I try to run the query:               select * from shortest_path             ('select gid as id,                 source::int4,                 target::int4,                 length::double precision as cost                 from ways',             52343, 39219, false, false);      I get this error: errore di sintassi vicino il simbolo non atteso "from". If I run the same query on pgAdmin I get a more specific error i.e.: relation "ways" does not exist. Can anyone help me? Thanks a lot Laura * * *               postgres@laura-VirtualBox:/home/laura$ cd /usr/bin     postgres@laura-VirtualBox:/usr/bin$ ./osm2pgrouting -file /home/laura/Scaricati/ireland.osm -conf mapconfig.xml -dbname routing -user postgres -passwd laura -clean     host=127.0.0.1 user=postgres dbname=routing port=5432 password=laura     connection success     Trying to load config file mapconfig.xml     Trying to parse config     postgres@laura-VirtualBox:/usr/bin$ select * from shortest_path ('select gid as id,source::int4,target::int4,length::double precision as cost from ways', 52343, 39219, false, false);     bash: errore di sintassi vicino il simbolo non atteso "from"     postgres@laura-VirtualBox:/usr/bin$ psql -U postgres routing     psql (8.4.8)     Digita "help" per aiuto.          routing=# select * from shortest_path ('select gid as id,source::int4,target::int4,length::double precision as cost from ways', 52343, 39219, false, false);     ERROR:  relation "ways" does not exist     RIGA 1: ...int4,target::int4,length::double precision as cost from ways                                                                    ^     QUERY: select gid as id,source::int4,target::int4,length::double precision as cost from ways     routing=#


title: Toggle Toolbar Button and Activate Identify

text:
I already asked how to toggle an identify button in a previous question, and was given the correct answer to the question, but when I tried to implement it into a toolbar that would disable the identify button when another button was pressed it didn't work. I guess I should have asked the question a little better. I am hoping that soneone will be able to help put the two pieces of code together. An example can be found at the following link and my code is below. http://geoville.org/viewers/PopUp/                   <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">                     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">         <meta http-equiv="X-UA-Compatible" content="IE=7" />                  <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>         <title>Identify with Popup</title>         <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.3/js/dojo/dijit/themes/claro/claro.css">              <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.3/js/esri/dijit/css/Popup.css">

Zoom In

Zoom Out

Identify

                       Thanks to those that can help and thanks to those that helped with the previous question. -Mike


title: Resize polygon along one axis

text: Using the following example I'm able to resize by scale and origin.                   polygonFeature.geometry.resize(scale, origin);         vectorLayer.redraw();      But does anyone have any suggestions or sample code on how I would go about resizing a polygon on one of its axes? _For example:_ I would like to resize the orange polygon to something like the red polygon. **So only the north and south edges move while the east west edges stay constant.** ![enter image description here](http://i.stack.imgur.com/Cava5.png) **EDIT #1** Here's a use case and example data: A user only wants a portion of the orange rectangle because he's only interested in the coastline and satellite vendors will charge him more for the entire image. User needs to specify what portion of the image they want to order. Although, i don't need the entire solution with sizing handles **all i need is the ability to resize the Height of the polygon**. ![enter image description here](http://i.stack.imgur.com/or5pl.png) ![enter image description here](http://i.stack.imgur.com/KS8DR.png) ![enter image description here](http://i.stack.imgur.com/GfbzY.jpg) **EDIT #2:** Maybe i'm going about this wrong. I need an openlayers javascript (browser) solution and cannot go back to the server for resizing. Maybe what i should be doing is interpolating points along east and west edges of the polygon geometry (black dots). Then create two lines (green lines) in which the user can drag but restricting movement(draging) to those interpolated points. When the user is "done" i get the remaining yellow polygon? ![enter image description here](http://i.stack.imgur.com/7niwk.png)


title: How to pragmatically upload a shapefile to geoserver using cURL? I'm having problems

text: I'm building the curl command in a python script, but when I run the script I get this error:               * Connected to localhost (127.0.0.1) port 8081     * Server auth using Basic with user 'admin'     > PUT /geoserver/rest/workspaces/csEvo/datastores/ABSM/file.shp HTTP/1.1     > Authorization: Basic YWRtaW46Y3NlbWVyZ2Vuc3lz     > User-Agent: curl/7.15.1 (i386-pc-win32) libcurl/7.15.1 OpenSSL/1.0.1c zlib/1.2.3     > Host: localhost:8081     > Accept: */*     > Content-type: application/zip     > Content-Length: 16302     > Expect: 100-continue     >     < HTTP/1.1 100 Continue     HTTP/1.1 500 Internal Server Error     < Content-Type: text/plain     < Transfer-Encoding: chunked     < Server: Jetty(6.1.8)     Error occured unzipping file:error in opening zip file* Connection #0 to host localhost left intact     * Closing connection #0      but if I run the same built curl command directly in the cmd line it works. My py script is as follows (zips the shapefile and uploads it into geoserver) and I'm running it from inside the OSGEO4W shell in order to inherit environment settings:               #!/usr/bin/env python     import os     import zipfile     from subprocess import call     # Geoserver Variables     gshost = "http://localhost:8081"     gsuser = "admin"     gspassw = "geoserver"     gsworkspace = "csEvo"     gsstore = "teste"     AB_shpfile = "C:/data/theshpfile.shp"     #zip file for Geoserver upload     thezipfile = zipfile.ZipFile(AB_shpfile.replace('.','').replace('shp', '.zip'), "w")     for filenametozip in [ABSM_shpfile, ABSM_shpfile.replace('.shp', '.dbf'), AB_shpfile.replace('.shp', '.shx'), ABSM_shpfile.replace('.shp', '.prj')]:             arcname=os.path.basename(filenametozip.replace('.',''))            arcname=str(arcname).replace(str(arcname)[-3:], '.' + str(arcname)[-3:])            thezipfile.write(filenametozip, arcname)     # Send to Geoserver     thefileforgs = AB_shpfile.replace('.','').replace('shp', '.zip')     call("curl -u "+gsuser+":"+gspassw+" -v -XPUT -H " + '"Content-type: application/zip"' + " --data-binary @"+'"'+str(thefileforgs)+'"' + ' ' + gshost +"/geoserver/rest/workspaces/"+gsworkspace+"/datastores/"+gsstore+"/file.shp", shell=True)      What on earth am I missing? Cheers


title: Polygon Neighbors Analysis script (ArcPy 10.1) producing erroneous results?

text: I'm struggling with a python script that is supposed to calculate a field for a polygon feature class. The calculation is of the average of a field value (P_TOT_DEV) for each of a given polygon's neighbors. The script should:   1. Make a table of each polygon and it's neighbors   2. Use that table to get each polygon's neighbor's P_TOT_DEV value   3. Calculate that to a table called P_TOT_DEV_SUM   4. Use that table to calc to a table called P_TOT_DEV_AVG   5. Determine each polygon's average of its neighbor's P_TOT_DEV score   6. Write that back to the original polygon feature class. This is not a script I wrote. Here's the whole script:               # NeighborScore.py     # Created on: 2013-01-07 13:26:35.00000     # Description: Will create output tables based on the average and sum of neighboring polygon values     # Updated 2014-03-10               # Import arcpy module     import arcpy          #   Script arguments     #   This is the table that will be joined to the polygon to create the scoring     #   score_table = arcpy.GetParameterAsText(0)     #   if score_table == '#' or not score_table:     #    score_table = "C:\\Project Work\\Squaxin\\Data Recieved From Squaxin\\SquaxinCat.gdb\\NZ"          #  Join Field for the Score Table and the Polygon Features     searchfield = arcpy.GetParameterAsText(1)     if searchfield == '#' or not searchfield:         searchfield =  "HydroID"          workspace = "\\\\Fs3\\fs\\Campus Share\\GIS\\Dept\\NR\\Current\\LandscapeAnalysis\\Working.gdb"          #  Polygon Features used in the Neigborhood scoring     polygon_features = arcpy.GetParameterAsText(2)     if polygon_features == '#' or not polygon_features:         polygon_features = workspace +"\\SSHIAP_Catchment_HARN_1220"          #  Key Field for the Polygon Table to Join to the score table     neighborhoodkeyfield = arcpy.GetParameterAsText(3)     if neighborhoodkeyfield == '#' or not neighborhoodkeyfield:         neighborhoodkeyfield =  "HydroID"          #   List of fields to be scored (must be numeric)     scorefields = arcpy.GetParameterAsText(4)     if scorefields == '#' or not scorefields:         scorefields = "P_TOT_DEV"          #   Swap the ; for a , in the delete fields     scorefields = scorefields.split(';')          #   Get the name for the feature class     infeature_name = polygon_features[polygon_features.rindex("\\") + 1:]     print infeature_name          #   inscore_name = score_table[score_table.rindex("\\") + 1:]     #   print inscore_name          #   Set Geoprocessing environments     arcpy.AddMessage("Seting up the input tables")     #   polygon_features[:infeature_name.rindex("\\")]     print workspace     f_layer_out = "flayer"     polygon_neighbors = workspace + "\\PolygonNeighbors"     arcpy.AddMessage(workspace)     arcpy.env.workspace = workspace     arcpy.env.overwriteOutput = True     field = "src_" + searchfield     neighborfield = "nbr_" + searchfield          sum_insert = "P_TOT_DEV_SUM"     avg_insert = "P_TOT_DEV_AVG"          #   Process: Make Feature Layer     arcpy.MakeFeatureLayer_management(polygon_features, f_layer_out, "", "", "")          #   Process: Add Join     #   arcpy.AddMessage("Joining score to neighborhood table")     #   arcpy.AddJoin_management(f_layer_out, neighborhoodkeyfield, score_table, searchfield, "KEEP_COMMON")          #   Process: Create Polygon Neighbors Table     arcpy.AddMessage("Creating Polygon Neighborhood Table")     arcpy.PolygonNeighbors_analysis(f_layer_out, polygon_neighbors, searchfield, "NO_AREA_OVERLAP", "BOTH_SIDES", "", "FEET", "SQUARE_FEET")          #   Process: Copy     arcpy.AddMessage("Copying score tables")     arcpy.Copy_management(polygon_features, avg_insert, "Table")     arcpy.Copy_management(polygon_features, sum_insert, "Table")          #   Process: Delete Rows     arcpy.AddMessage("Cleaning up the score tables")     arcpy.DeleteRows_management(avg_insert)     arcpy.DeleteRows_management(sum_insert)          #   List the Fields for processing     fields = arcpy.ListFields(sum_insert)          #   Determine the Fields to Delete     deletefields = []     for infield in fields:         if not infield.name.upper() in scorefields and infield.name.upper() <> searchfield.upper():             print infield.name             if infield.type == "OID" or infield.name == "Shape" or infield.name == "Shape_Length" or "Shape_Area":                 continue             else:                 deletefields.append(infield.name)          print deletefields          #   Clean up the extra fields we do not want here     #   arcpy.DeleteField_management(sum_insert, deletefields)     #   arcpy.DeleteField_management(avg_insert, deletefields)          #   Cursor through the neighborhood table     arcpy.AddMessage("Starting the Scoring System")     cursor = arcpy.SearchCursor(polygon_neighbors)     changeid = -99     score = 0     rowcount = 0     average = 0     for row in cursor:         key_id = row.getValue(field)         #   shape = row.getValue("SHAPE")         arcpy.AddMessage("Processing Row....")         print key_id         if changeid <> key_id:             if changeid <> -99:                 try:                     #   Insert the score values                     print score                     insert_cur = arcpy.InsertCursor(sum_insert)                     insert_avg_cur = arcpy.InsertCursor(avg_insert)                     insert_row = insert_cur.newRow()                     insert_avg_row = insert_avg_cur.newRow()                     insert_row.setValue(searchfield,key_id)                     #   insert_row.setValue("SHAPE",shape)                     insert_avg_row.setValue(searchfield,key_id)                     #   insert_avg_row.setValue("SHAPE",shape)                     for key, value in list.iteritems():                                   if key <> searchfield:                             insert_row.setValue(key.upper(),value)                             insert_avg_row.setValue(key.upper(),value / rowcount)                     insert_cur.insertRow(insert_row)                     insert_avg_cur.insertRow(insert_avg_row)                          del insert_cur, insert_avg_cur                 except Exception as err:                     print err.message                  #   Track the neighborhood blocks             changeid = key_id             score = 0             rowcount = 0             list = {}             for lookfield in scorefields:                 if(lookfield.upper() <> searchfield.upper()):                     list[lookfield.upper()] = 0              #   Select the appropriate neighborhood fields         print searchfield + "," + neighborfield         where = "\"" + searchfield + "\"" + " = "  + str(row.getValue(neighborfield))         print where         score_table_search = arcpy.SearchCursor(polygon_features,where)         for score_table_row in score_table_search:             for lookfield in scorefields:                 if(lookfield.upper() <> searchfield.upper()):                     list[lookfield.upper()] = list[lookfield.upper()] + score_table_row.getValue(lookfield.upper())             arcpy.AddMessage(list)             #  Look through for all the doubles and calculate the scores             rowcount = rowcount + 1         del score_table_search      del cursor          ##  Do not delete while testing/review     #   Perform some cleanup     #     if arcpy.Exists(polygon_neighbors):     #   Execute Delete     #   arcpy.Delete_management(polygon_neighbors, "")      The script runs without crashing but, it appears;   1. the first polygon of the PolygonNeighbors table is not being calculated   2. fact the that first item/row in the table is not being calculated then throws off all the following calculations. It appears that the calculations (SUM & AVG) are being written to the wrong (+1) polygon. So, poly B is getting poly A's correct results. Poly C is getting B's. Poly A does not make it from the PolygonNeighbors table to the SUM & AVG tables. The particulars that are confusing me are:   1. line 44: infeature_name = polygon_features[polygon_features.rindex("\") + 1:] confused as to what infeature_name would be after this (thur each iteration of the loop)   2. line 90: the delete_fields list appears to be empty Is that right?


title: ArcGis Server 9.3 - arcgis api for javascript

text: I have 2 graphic objects - (polylines) one over the other in the same graphic layer. How can I show both infowindows for polyline objects (values of attributes are different)?


title: How to add title in TileMill/Mapbox map

text: I have successfully made a legend and teasers for a tilemill map. However, I don't know how to add a title and don't see a function for it. If I wanted to add a title, how would I do that? Thank you, Olivia


title: iPhone GPS Tracker app that INCLUDES timestamps?

text: I simply need to import GPS tracks into Google Earth that come in with time data so that I can use the Google Earth time slider and animate the track. I can do this with Android using "My Tracks". I have attempted to use apps such as "Motion X" and "GPS Tracks" on the iPhone and while they can import a track they do not include any timestamps. Does anyone know of an iPhone app that can do this? I've been looking for something like this for a while and have been getting nowhere. Just to clarify: I don't mean a track with a "start" and an "end" time, I mean that the whole track is time stamped so that I can move the slider and see exactly where I was at a specific time as well as hit "play" and watch the track move. Any help would be greatly appreciated.


title: Qgis 2.2 how to fix bad epsg.wkt load

text: I installed Qgis 2.2 this morning from the ubuntugis repository for ubuntu precise. Qgis works great, except that all the common projections have been deleted. So, I am a Little bit having a heart attack. It Looks, from the install log, like what happened is this:               Synchronizing CRS database with GDAL/PROJ definitions.     Load srs db from: /usr/share/qgis/resources/srs.db     QFSFileEngine::open: No file name specified     QFSFileEngine::open: No file name specified     QFSFileEngine::open: No file name specified     QFSFileEngine::open: No file name specified     QFSFileEngine::open: No file name specified     Loading epsg.wkt     0 WKTs loaded     CRS update (inserted:0 updated:0 deleted:3631 errors:0)     No CRS updates were necessary.     qgis-common (2.2.0-1~precise1) wird eingerichtet.      This log is printed if I remove qgis and just install qgis-providers. apt-get install --reinstall qgis doesn't fix it.   Even worse, I did an apt-get remove purge and went back to the qgis.org debian main, which installed dufour. Projections were still wiped, and I got the same install log from qgis-provider-commons. So, I can't get functional qgis back at all. Is there any dependency I should be reinstalling to make this all go away, or a way I can explicitly update the CRS lists? Thanks!


title: Libraries and/or ideas for navigating WMS time-parameter

text: I'm currently working on a project where we need to incorporate the TIME- dimension of WMS-layers (see http://docs.geoserver.org/latest/en/user/services/wms/time.html#wms-time) in our web map. The technicalities of the time-dimension is rather straight-forward, but in terms of creating a good user-interface things are more difficult. What I'm wondering is if there exists some (open-source) javascript library for handling a "timeslider" of sorts, where the user can skip through time and update the map, preferrably also with a "play"-button to play back an animation. My searches haven't turned up anything, so I don't expect such a library to exist. What I do suspect exists are several implementations of similar functionality. If you know of any such implementations (be it web, desktop or mobile) I'm interested in hearing about them, to get ideas to how this can be solved. So, specifically, what I'm asking is:   1. Do you know of any open source openlayers-components/plugins/examples of advanced time-navigation?   2. Do you have any input on how the GUI for such a component could look like? Screenshots, links to programs/apps or websites. (A bit more background: I'm working on a web map that uses OpenLayers 2.x, and we currently have 20-something map layers that supports the TIME-dimension. These ranges from 48 hours into the future to 100 years back in time (with different resolutions of course). The available timestamps for each layer can be parsed from the GetCapabilities-document. This means that I need to create (or find) a rather generic component with no hard-coded dates or layers. I do realize that creating a timeslider-component that handles both the year- by-year and hour-by-hour aspect will be difficult. Some compromise could be done here. Technically I'm thinking of basing a solution on OpenLayers, moment.js, Backbone.js and bootstrap, but I'm open to suggestions here as well)


title: Finding percentage of feature in a raster

text: I am attempting to find the percentage of polygon features at a 5 meter resolution that are located inside each 25km raster cell. I am looking to assign percentages to each cell based on the percentage of a feature appearing in the cell (10%, 20%...). Is there a tool that can do this procedure? The raster being limited to only a single value field has prevented me from being able to run attribute queries. I am using ArcGIS Thank you.


title: Drawing Line on existant Shapefile in Geotools

text: I have a shapefile that is opened and looks as such: ![Java Geotools Demo](http://i.stack.imgur.com/fsGXM.png) Now I am attempting to draw a line from two points I click on that map; however the code they give for the `QuickStart.java` example is exceptionally vague. Here is their code:               package org.geotools.tutorial;          import java.io.File;          import org.geotools.data.FileDataStore;     import org.geotools.data.FileDataStoreFinder;     import org.geotools.data.simple.SimpleFeatureSource;     import org.geotools.map.FeatureLayer;     import org.geotools.map.Layer;     import org.geotools.map.MapContent;     import org.geotools.styling.SLD;     import org.geotools.styling.Style;     import org.geotools.swing.JMapFrame;     import org.geotools.swing.data.JFileDataStoreChooser;     import org.geotools.geometry.jts.JTSFactoryFinder;     import com.vividsolutions.jts.geom.Coordinate;     import com.vividsolutions.jts.geom.LineString;     /**      * Prompts the user for a shapefile and displays the contents on the screen in a map frame.      * <p>      * This is the GeoTools Quickstart application used in documentationa and tutorials. *      */     public class Quickstart {              /**          * GeoTools Quickstart demo application. Prompts the user for a shapefile and displays its          * contents on the screen in a map frame          */         public static void main(String[] args) throws Exception {             // display a data store file chooser dialog for shapefiles             File file = JFileDataStoreChooser.showOpenFile("shp", null);             if (file == null) {                 return;             }                  FileDataStore store = FileDataStoreFinder.getDataStore(file);             SimpleFeatureSource featureSource = store.getFeatureSource();                  // Create a map content and add our shapefile to it             MapContent map = new MapContent();             map.setTitle("Quickstart");                  Style style = SLD.createSimpleStyle(featureSource.getSchema());             Layer layer = new FeatureLayer(featureSource, style);             map.addLayer(layer);                  // Now display the map             JMapFrame.showMap(map);         }          }      Now, where I am confused is as to what method I should use to click two points and draw a line between them? Anyone have any good resources on this? I've read up on the GeoTools documentation and am still a bit confused. **EDIT 1:** I attempted to do the generic code on the site but it does not appear on the map.               GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory( null );             Coordinate[] coords  =          new Coordinate[] {new Coordinate(0, 2), new Coordinate(2, 0), new Coordinate(8, 6) };              LineString line = geometryFactory.createLineString(coords);         Style style2 = SLD.createLineStyle(Color.BLUE, 1);         Layer layer2 = new FeatureLayer(featureSource, style2);         line.


title: How to write a expression in field calculator for finding $X and $Y?

text: I'm trying to calculate the lat/long of points using the Q GIS field calculator.Nathan W suggested to First, save the layer as WGS84 and import it again. Then in the field calculator you can use $x or $y as a variable to get the x and y. but the problem is this: i dont know how to write a expression in field calculator for finding $X and $Y?


title: IQueryFilter where Clause quering two feature class at a time

text: I need to query two feature class at the same time using IQueryFIlter. For eg - FeatureClass -- A has field OBJECTID FeatureClass -- B has field OBJECTID what i am tring to do is --               IQueryFilter iqf = new QueryFilter();     iqf .setWhereClause(B+".OBJECTID = "+A+".OBJECTID");     IFeatureCursor resultCursor = B.search(iqf, false);        Is this possible , if yes what is the correct methord because currently i am facing error-- > "Too few parameters. Expected 1" Might its not taking A.OBJECTID properly ////


title: Adding osm data to Postgres via Osm2pgsql : duplicate key value violates unique constraint

text: I'm trying to import osm global world data into a database created in postgreSQL but after a while of processing, I've got this error :               Reading in file: E:\planet-latest.osm\planet-latest.osm     Processing: Node(1873580k) Way(0k) Relation(0k)COPY_END for COPY planet_osm_node     s FROM STDIN;      failed: ERREUR:  la valeur d'une cl├® dupliqu├®e rompt la contrainte unique ┬½     planet_osm_nodes_pkey ┬╗     CONTEXT:  COPY planet_osm_nodes, ligne 1758128898 : ┬½ 2147483647       68830134     7       -16699132       \N ┬╗          Error occurred, cleaning up      I read that I have to remove the slim mode but when I do that, another error appeared and tell me I don't have RAM enough. Have you got any idea?


title: Density analysis producing extreme values?

text: I have point data of gas flares and I am trying to create a simple density raster of those flares. Results are either 0 or in the 100,000-1,000,000 range (when there's 5 to 40 or so points in each box). At least as I see it, I am trying to do the most basic of point density analyses. I'm just simply trying to count up how many points are in that box! I'm using a reference raster of 15 arcseconds. My point density dialogue is as below. Note that I've tried it two different ways with very similar results. Any suggestions of where I'm going wrong? I'm guessing it has to do with my search radius, but how do I tell Arc I want my search radius to be the same as the pixel? Dialogue: ![tool dialog](http://i.stack.imgur.com/N9G8U.jpg) Results: ![results](http://i.stack.imgur.com/LNsvh.jpg) Environments: Processing extent same as reference raster   Input: Gas Flares Points   Population: none   Output: ...\Flare_Dens.tif   Output cell size: 0.004167 (15 arcsecs in dec degrees, same as raster I'm snapping to)   Neighborhood: Rectangle   Radius: Map, 0.004167 x 0.004167 OR (getting similar results in the >100,000 range)   Radius: Cell, 1 x 1


title: Calculating percent cover from shapefiles

text: I normally do not work with shapefiles, so I am a bit lost here. I have two shapefiles each with multiple objects. The first is a set of 32 polygons (each one is a plot). The second shapefile has >10,000 objects which represent vegetation clusters of different sizes within each plot. I am trying to figure out: 1) How do I calculate percent cover of total vegetation cover within each site? 2) What percentage of each the vegetation cover is less than 5 meters in area in each plot? This is what my data looks like in ArcGIS for a single plot. I am open to advice on how to do this in arcGIS too. This link will take you to the shapefiles in my dropbox: https://www.dropbox.com/sh/wyokxximppexyb3/p7VC-pfF2E ![enter image description here](http://i.stack.imgur.com/sXHhQ.png)


title: Custom Leaflet Controls

text: I have gotton some help in creating a custom control for leaflet, but I am still having trouble upgrading to the CSS styles used by the latest versions of Leaflet. Basically, all I need is a icon in the white box, with the drop shadow around it. Here is what I have working so far, take a look and feel free to fork it: http://codepen.io/DrYSG/pen/zJsiG


title: Choosing the correct value for proj4string for shape file reading in R "MapTools"

text: I am having a shape file of polygons and another CSV file which contains a list of points as (Lat, Lng) pairs.. I want to check for each (lat, lng) pair from the CSV file which polygon does it fall inside.. The shape file is projected and the proj file reads like this..               PROJCS["Transverse_Mercator",GEOGCS["GCS_OSGB 1936",     DATUM["D_OSGB_1936",SPHEROID["Airy_1830",6377563.396,299.3249646]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",49],PARAMETER["central_meridian",-2],PARAMETER["scale_factor",0.9996012717],PARAMETER["false_easting",400000],PARAMETER["false_northing",-100000],UNIT["Meter",1]]      My plan is as fllows:   1. Read the shape file using the `readShapePoly` function in the R `MapTools` package.   2. Read the points coordinates from the CSV file into a dataframe and convert it to SpatialPointsDataFrame   3. Use `over` function to determine which polygon it falls inside. In order to do so,, I need to specify the `proj4string` while loading the shape file in step 1 and also transform the coordinates from the CSV file into the same projection system using `spTransform` function before applying the `over` function in step 3 as it requires that the points and polygons must be under the same projection system. Any idea about what should the correct value for the proj file content shown above ?


title: How much precipitation must fall within a catchment area to fill up a sink’s entire volume assuming that the runoff conditions are perfect

text: I am perfoming an exercise and I need to answer these question, any hints would be extremely useful. **How can it be calculated how much precipitation that must fall within a catchment area to fill up a sink’s entire volume assuming that the runoff conditions are perfect (i.e. the entire runoff from the precipitation reaches a local sink)?** Thanks very much for your help


Is there an online reference available for the Fiona and Shapely libraries? I'm thinking a real reference, beside the tutorial-style documentation: http://toblerity.github.io/shapely/manual.html http://toblerity.github.io/fiona/manual.html Thanks


title: Is there a way to group regions on a world map for common functionality?

text: I'm new to trying to use mapping, and not finding the kind of documentation I need. I'm looking at OpenLayers, but open to other solutions. I have a client that has sales reps with territories worldwide. Those territories are not country exclusive, there may be more than one rep in a country with territories divided between states/provinces. I need the map color-coded so the territories are highlighted by sales rep. OpenLayers at least, looks like it might be the way to go because zooming in on a world map more sharply defines the regions within a country (zooming in on the US, shows the individual states). As it stands, I don't know if OpenLayers will support splitting a country on an un-zoomed view, or how to color code any of the territories (many of the example pages for OpenLayers don't seem to work).


title: ArcGIS model builder: How to reclassify 16,000+ rasters and do weighted sums on these rasters per year?

text: I've been trying to build a model in model builder (ArcGIS 10.1) which can do the following task: I have a folder full of ca. 16,000 raster files (.asc) representing mean temperatures for each day of 40+ years with names like 19800101, 19800102 (first two days of January 1980) etc. Now I want:   1. import each .asc to raster   2. reclassify each raster (e.g. temperature x = 0, temperature y = 1)   3. do a weighted sum of all rasters of one year (to get the number of all days with temperature y)   4. write resulting yearly rasters to a different folder I tried different things but nothing worked for the whole process. I can get 1) and 2) working in a model but fail to do 3) and 4) along with it automated and had to do it by hand which is very time consuming. I suppose it comes down to using different iterators, but I just can't find a way to get it working for days now. I'm a little desperate by now :) Does anyone of you can point me in the right direction for doing this task automated and efficient in model builder? Help would be very much appreciated. Thank you. Happy holidays!


title: Clip or Intersection tool - QGIS giving empty files

text: I am trying to clip an Ordnance Survey Master Map (OSMM) feature based on a polygon created for the sake of clipping which does not have any attributes, but the output is an empty file. Projection of both the files is similar. Could you please let me know how to achieve the result either using polygon or if there is any method I can use in QGIS?


title: How to adjust the projection of a buffer?

text: I'm using ArcGis 10.1, and when I do a buffer at a point, the created buffer do not match the dimensions I asked for. For example, in the creation of buffers, in the option 'linear unit' I choose 50 meters, so it should create a circle with 100 meters of diameter, but when I measure, it has 127 meters. How can I fix this? It is in a portuguese geographic coordinate system, Datum 73/ Hayford-Gauss. It's units are meters.


title: Debugging ArcPy script to search, get value, compare to field names and sum field values?

text: `I am looking to do the following task:   * Look at the values in RegID_6k99 field (numerical field).    * Select all records where "RegID_6k99 == 0". In this case 6 records should be selected.    * For each of the selected records look at the FLABEL field value (String) for each record (6 different FLABELs).    * Look at the field names of the feature class (fieldlist).    * If any of the field names are equal to the value (string) of the FLABELs then sum the value (numerical) for each of the fields for that row. In this case for one row 6 fields have the same string as the FLABEL so for this row the six values will be summed into the new field (RegIntFlows) for that row. In this case 6 rows will have a RegIntFlows field value.   * Then increment for "RegID_6k99 == 1" and so on until the maximum RegID_6k99 value. All records should have a RegIntFlows value. I have written some code but it doesn't run and needs modification. Attached is screendump of feature class and current script.               import arcpy     fieldlist = arcpy.ListFields("C:/Temp/NIData.gdb/fc_f6000_in99Matx") #create list of fields     fc = "C:/Temp/NIData.gdb/fc_f6000_in99Matx" #reference feature class     result = [row[0] for row in arcpy.da.SearchCursor(fc, ("RegID_6k99"))] #search field     unique = set(result)     lengthDict = {}     for uni in unique:         where = "\"RegID_6k99\" = '%s'" % (uni)         lengths = [row[0] for row in arcpy.da.SearchCursor(fc, ("FLABEL"), where)]         for field in fieldlist:             if field.name.lower() == lengths: #if field name is equal to FLABEL value                     lengthDict[uni] = sum(lengths)                 for each in lengthDict.keys():                     print "%s: %s" % (each, lengthDict[each])                     else #not sure how to finish          import arcpy     > fieldlist = arcpy.ListFields("C:/Temp/NIData.gdb/fc_f6000_in99Matx")     > fc = "C:/Temp/NIData.gdb/fc_f6000_in99Matx"     > rfield = "RegID_6k99"     > nfield = "FLABEL"     > # create an expression with proper delimiters     > expression = arcpy.AddFieldDelimiters(fc, rfield) + "=2"     > # create a search cursor with list comprehension to return a unique set of values based on sql expression     > values = [row[0] for row in arcpy.da.SearchCursor(fc, (rfield, nfield), where_clause=expression)]     > uniqueValues = set(values)     > list = []     > # check if FLABEL value equals field name     > for field in fieldlist:         if field.name.lower() == values:             list.append(field)             RowRegFlows = sum(list)             row.UpdateRow(row)               >>> ## Attempt to sum the values of the applicable field values      The code works - does what I want - up until the last three lines. I have attempted to do the last part of task in the last three lines but not confident about them. There is no error message (see attached jpg). If the FLABEL value for row is equal to all of the field names then I want to sum the values into a blank field (TotRegFlows) for each row. Do I need an update cursor as well? Can anyone advise? Many thanks ![Revised_code](http://i.stack.imgur.com/TjE6Y.jpg)


title: Sources for German Standardized Symbols in QGIS

text: German Original: Gibt es für QGIS eine Phytonerweiterung "Planzeichenverordnung"? Zur Bearbeitung von Flächennutzungsplänen und Bebauungsplänen kommt man an den Planzeichen nicht herum. * * * **Translation** (provided by Jens): In Germany we have to use standardized symbols for maps of the land use planning ("Bauleitplanung","Bebauungspläne","Flächennutzungsplane"). These symbols are defined in an act called “Planzeichenverordnung”. Here are some examples of the defined symbols for polygons ![enter image description here](http://i.stack.imgur.com/EzxFr.jpg) and for points. ![enter image description here](http://i.stack.imgur.com/fa465.jpg) All symbols are listed here. How can I use these symbols in QGIS? Are there any predefined symbol sets which I can use?


title: Create a 3D surface from xyz csv using GRASS

text: Apologies if this is a repeat question guys. I am trying to create a 3D bathymetry surface from xyz data. There is approximately 300,000 points with lat, long and z (depth data). The data is sonar point data similar to lidar data. I want to use GRASS and I'm looking around for the right functions. I can import the data to grass with v.in.ascii -z and I tried using v.extrude which killed my computer (must be the number of points) I might be able to create contours in qgis and use v.to.rast and r.surf.contour but I think I'll lose resolution if it works at all. I'm not familiar with grass and I guess that, this is probably a relatively easy thing to do but I've hit a wall with it. I would imagine someone has encountered this before. Any help would be greatly appreciated. Best regards Kieran


title: identify percentage of raster cells within a polygon

text: As per the title I want to determine the population inside multiple polygons according to different land use zoning (High Residential, Low Residential, National Parks etc) that's in raster format. To do this I'm thinking I should calculate the percentage of raster cells inside the polygon and then join the tables so I can calculate the population. So far I've reclassified these land use zones to make 3 different binary rasters. e.g. For High Res:- 1 for high Res and 0 for the other two (National Parks and Low Res); For Low Res:- 1 for Low Res and 0 for High Res and National Parks. The next step would be to use "Zonal Statistics by Table" and join the table to the polygon table that has population information. However it seems I'm just adding up polygon population essentially coming out with the same number.


title: Initialising a MapView off-screen

text: I'm using ArcGIS for Android, version 10.1. I'm trying to add mapping technology to an existing system, and all Activities are created in-code instead of using XML files. This is something I cannot change. I've found that when creating MapViews in this way, they will not initialise until they have been displayed on the screen. I've tried to force the view to behave as though it has been displayed on the screen, using code such as:               this.map = new MapView(context);     map.setOnStatusChangedListener(mapStatusListener);          this.baseLayer = new ArcGISTiledMapServiceLayer(basemap);     baseLayer.setOnStatusChangedListener(basemapStatusListener);     map.addLayer(baseLayer);               linearLayout = new LinearLayout(context);     linearLayout.addView(map, new LayoutParams(300, 300));     int spec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);     linearLayout.measure(spec, spec);     linearLayout.layout(0, 0, linearLayout.getWidth(), linearLayout.getHeight());      I then have the `mapStatusListener` which will remove the MapView from `linearLayout` as soon as it is initialised, freeing up the MapView to be displayed in the interface. To pre-emp the question "just add it to the interface to make it initialise", one of the ways we are using the maps is to draw it to a bitmap instead of drawing the whole map object. Using MapViews produced tearing in the interface when scrolling, and there are likely to be multiple maps on-screen in our application. I expect that redrawing an image will be far less expensive than redrawing the MapView with all its layers, etc. Therefore, I want to draw the image off-screen and recycle the map itself, only using the image. In this scenario, there is no reason for the MapView itself to ever be drawn on the screen. I believe almost all of my current problems could be solved if I could initialise the map off-screen, but I'm stuck on how to achieve this.


title: Are there ARCIMS still around or phased out?

text: My understanding is there are few companies still using ARCIMS and am wondering if it is still alive or phased out ? THanks


title: What causes this unexpectedly poor GeoServer/PostGIS/OpenLayers performance?

text: I am having a tough time making this map run smoothly (play around with it for a bit, you'll see). I have taken a few tips from OSGeo's Making Maps Fast document, but I think there's another issue because: **A)** sometimes the map runs just fine, but when I refresh the page it takes a very long time to load and/or times out on some layers, and **B)** occasionally when zooming in/out, the Bing basemaps change appropriately but my layers stay at their original scale. I have not yet taken the step of simplifying/generalizing geometries because, although it may help, I don't think that's the issue. I'm only bringing in a few layers on the initial load, and they're not overly complex, at least not complex enough to slow things down this much IMO. Also, I briefly employed GeoWebCache, but that didn't make much difference either. In terms of additional performance improvement techniques, I have also followed GeoServer's container considerations and my JAVA_OPTS look like so:               grep -i useparallelgc /etc/*/*     /etc/init.d/tomcat6:export JAVA_OPTS="-server -Xmx256M -Xms48m -XX:SoftRefLRUPolicyMSPerMB=36000 -XX:MaxPermSize=128m -XX:+UseParallelGC"     /etc/java/java.conf:export JAVA_OPTS="-server -Xmx256M -Xms48m -XX:SoftRefLRUPolicyMSPerMB=36000 -XX:MaxPermSize=128m -XX:+UseParallelGC"      Here's my environment:   * GeoServer 2.1.1   * PostGIS 1.5.3   * PostgreSQL 8.4ish   * OpenLayers 2.11   * GeoExt 1.1   * ExtJS 3.4.0   * Amazon EC2 Linux Micro Instance (awww, 613 MB of memory) If it helps, here is my GeoServer server status:               Data directory      /usr/share/tomcat6/webapps/geoserver/data        Locks           0        Connections     2        Memory Usage        144 MB       JVM Version     Sun Microsystems Inc.: 1.6.0_29 (Java HotSpot(TM) 64-Bit Server VM)      Available Fonts     GeoServer can access 97 different fonts. Full list of available fonts        Native JAI      true         Native JAI ImageIO  false        JAI Maximum Memory  113 MB       JAI Memory Usage    0 KB         JAI Memory Threshold    75.0         # of JAI Tile Threads   7             JAI Tile Thread Priority        5        ThreadPoolExecutor Core Pool Size   5        ThreadPoolExecutor Max Pool Size    10       ThreadPoolExecutor Keep Alive Time (ms) 30000        Update Sequence             236      You can look at my code on the website itself, but here is an example of the parameters I'm using for all my WMS layers (tried them as tiled layers, which didn't seem to make much difference):               var wildSingleTile = new OpenLayers.Layer.WMS(         "Wilderness Areas",          "http://50.112.123.161:8080/geoserver/OR_wild_wkspc/wms",         {             LAYERS: 'OR_wild_wkspc:OR_Wilderness',             STYLES: '',             transparent: true,             format: 'image/png8'         },{singleTile: true, isBaseLayer: false}      );            I realize that Amazon's micro instance is not the speediest thing in the world, but I don't think it should be THIS slow. I am quite the noob at just about everything here, including JavaScript and Linux, so any tips and suggestions would be appreciated! P.S. Sorry for the hideous layer colors, it's not final...