Enabling Geodatabase from ArcMap 10.1

I have created a sde schema in my postgresql database , I check all the priviliedges and everything. I also put the st_geometry.so in lib path of postgresql 9.1.3 installed on the server. I have ArcGIS 10.1 When I am trying to "enable geodatabase" from the database in ArcMap 10.1 I am getting theses errors:               relation "sde.sde_layers" does not exist at character 22     STATEMENT:  select count(*) from work.sde.sde_layers          ERROR:  relation "sde.gdb_items" does not exist at character 15     STATEMENT:  select 1 FROM sde.GDB_ITEMS          ERROR:  function st_geometry_version() does not exist at character 8     HINT:  No function matches the given name and argument types. You might need to add explicit type casts.          STATEMENT:  SELECT ST_GEOMETRY_VERSION()::varchar     ERROR:  could not load library "/usr/local/pgsql/lib/st_geometry.so": /usr/local/pgsql/lib/st_geometry.so: undefined symbol: DirectFunctionCall1          STATEMENT:  Create OR Replace FUNCTION public.ST_Geometry_Version() RETURNS text AS 'st_geometry', 'ST_Geometry_Version' LANGUAGE 'C' WITH (ISCACHABLE, ISSTRICT)      I appreciate any help.


How to delete multiple fields in an attribute table?

Is there a way to select multiple fields in an attribute table and delete them together in Arcmap without writing the script?


QGIS, how to change the centre point of a global map?

I have two global maps I want to show on one map in Qgis, however they each have different centre points, i.e. in one the atlantic is in the centre, and in the other the pacific is. How do I get them both to show the pacific ocean as the centre point?? They are both on the same coordinate system.


Can MaxRecordCount be set for layers within a service in ArcGISServer 10.1?

I see a MaxRecordCount property in the REST api for ArcGIS Server map services. But i also see a MaxRecordCount for individual layers within a service at the REST endpoint. I know from experience that these numbers can vary. So the child layers don't seem to be inheriting the value from the parent service. I know there is one place within the AGS manager web application to set the "Maximum Number of Records Returned by Server" value for each map service. and I know there is a setting within ArcMap when publishing the service itself to set the "Maximum Number of Records Returned by Server" value. So my question is how do i set the maximum number of records returned for a layer within a service so that it is different than the max number of records value for other layers within the service?


How to find out which Geoserver version is running?

Is there a way to find out which version of GeoServer is running from any standard document such as `GetCapabilities`?


How to add a road to a network dataset

I have a street network file, and I want to add a section of road to it. I start editing on the road network dataset, snapping on, create a new feature line road segment from the edge of the old road to where I want it, click save edits, then stop editing. I then calculate geometry to determine the cost of the road in km, which works fine. When I create a network dataset from this it adds in the junctions in the correct places, however, when I try to solve a route to the end of it there is no connectivity. How do I fix this? Thanks.


Getting city GIS data

I need some help on how to go about it. I do not have much knowledge about GIS. For a project we need a complete set of city data to perform calculations on. In terms of generating a map of the city, is there a way that I can get the details of the city - i.e. all streets, landmarks, lanes etc. etc. in any format? Once I have these data, then I can insert them into the database and proceed.


Script for Editing TIN in Arcgis: modelbuilder works, when exported as script gives an error

Arcgis can give such a headache! I want to automate loads of small tasks, and so I need to edit empty TIN with python in order to create a full TIN. My srcript is giving errors, so I tried by hand to make it work with ModelBuilder AND EditTIN IT WORKS FINE!!!! Exported the same Model (that just worked) as python script gives errors!               # Local variables...     raster = "F:\\...\\mClip_1"     raster_InterpolateShape = "F:\\...\\mClip_1_InterpolateShape"     # Process: Edit TIN...     gp.EditTin_3d(raster, "raster_InterpolateShape Shape <None> softline true")      and the error message:                   Traceback (most recent call last):       File "F:\....\test_editTin.py", line 26, in <module>         gp.EditTin_3d(raster, "raster_InterpolateShape Shape <None> softline true")     ExecuteError: Failed to execute. Parameters are not valid.     ERROR 000800: The value is not a member of <None>.     ERROR 000800: The value is not a member of %s.     ERROR 000800: The value is not a member of %s.     ERROR 000800: The value is not a member of %s.     Failed to execute (EditTin).      All extensions and everything is checked since it is exported from model builder. I suppose something wrong is just with first shp input In ArcgisHelp ex for the input 3d shp name it shows the name with extension               ..."masspntz.shp Shape <None> masspoints true"      And so I tried both, with extension and without, but the same errors come. Any ideas, how can I get that TIN from feature automatically.. ???


How to read csv with WKT geometry in Arcmap?

I have found several parcels I need on a county map viewer. However, the only option to download any of the data is found on a click context menu to "Copy selection as csv" which gives me this:               HGID,ShapeWKT,parcelnumber,locationstreet,owner2,totalassd,parcelid,sec,ownerzip1,ownermailing1,rge,ownerstate,owner1,ownercity,formattedparcel,twp     "13514","POLYGON((825759.0653999997 326186.8526000008,825590.3153999997 326176.4357999992,825572.2887000003 326356.2666999996,825741.2658000002 326367.40330000035,825759.0653999997 326186.8526000008))","1406130003000009000","1470  HIGHWAY M","","9810","10682","13","63902","P O BOX 1021"," 5","MO","RHODES FREDERICK & PATRICIA","POPLAR BLUFF","14-06-13.0-003-000-009.000","24"     "13512","POLYGON((825759.0653999997 326186.8526000008,825770.4408999998 326065.06709999964,825776.7737999997 325997.26920000085,825727.1403000002 325988.53079999983,825720.1957999999 325559.36419999966,825716.0288000003 325041.31090000086,825380.9403999997 325018.1026000008,825384.6557 325291.9681000002,825387.7232999997 325518.09530000016,825390.7329000003 325739.9436000008,825393.6021999997 325951.46199999936,825395.5236999998 326093.1026000008,825399.5045999996 326344.8791000005,825572.2887000003 326356.2666999996,825590.3153999997 326176.4357999992,825759.0653999997 326186.8526000008))","1406130003000010000","M HWY","","10530","10683","13","63901","1563 M HWY"," 5","MO","MORGAN SHERMAN F & MARY I","POPLAR BLUFF","14-06-13.0-003-000-010.000","24"      I pasted this into a text editor, but I am unfamilliar with the file format. It is not a point based csv that could be added to ArcMap using Display XY data. It looks like it may be some type of OGR file like this (http://www.gdal.org/ogr/drv_csv.html). Is there a way to convert the csv file to a format readable in ArcMap rather than using GDAL? It looks like I may be able to creat an associated .vrt file, but I am not sure where I could go from here as far as getting the data into ArcMap. VRT might look something like this something like this:                <OGRVRTDataSource>         <OGRVRTLayer name="test">             <SrcDataSource>parcels.csv</SrcDataSource>             <GeometryType>wkbPoint</GeometryType>             <LayerSRS>WGS84</LayerSRS>             <GeometryField encoding="PointFromColumns" x="Longitude" y="Latitude"/>         </OGRVRTLayer>     </OGRVRTDataSource>


What's the strongest refresh method available to ArcEngine?

I have five layers: polygon, line, and point with a single IRasterLayer file. I am programmatically setting the ILayer.Visible attribute for the Raster but the layer is not refreshing. If I zoom in, or zoom out, then it refreshes properly. I tried these two methods:               mapControl.Refresh();     mapControl.Refresh(esriViewDrawPhase.esriViewAll, null, null);       But they didn't refresh my map. What method is stronger that this for refreshing the entire map?


Split a line having different Angles

I want to split a line haveing zigzag(different angles) but bthere are many vertics. I have an option in Arc GIS 10 to split from vertics but i need to split only where the angle or dimension is changed


CutFill Analysis in Arcgis10

I have point feature with elevation data and area in polygon feature. now what will be next i don't know. pl. can anyone give me process step by step. Thanks


How to programmatically identify and rename duplicate records?

I'm trying to identify duplicate records from a field and then change these records so they become unique (eg A,B,C, or 1,2,3) and assign this to the end of the text (eg F3241 A56_A or F3241 A56_1). I've tried the scripts that are in this forum but can't get these to work or not sure if they will give me the result I'm after. Any input into to this would be greatly appreciated.


How to find a point half way between two other points?

I'm working on implementing the OSM Mobile Binary format for map data, and because it uses a 16 bit delta for each point along a way, it cannot represent a way if there is a large distance between two points. The documented solution is to inject new points into the way, to keep the gap smaller. Here's the relevant section of my code:               // calculate the distance between this point and the previous point,     // multiplied by 1,000,000 so it can be represented as an integer.     int32_t realNodeLatDelta = ((point.latitude - lastPoint.latitude) * 1000000);     int32_t realNodeLonDelta = ((point.longitude - lastPoint.longitude) * 1000000);          // cast as a 16 bit int (reduces filesize by about half)     int16_t nodeLatDelta = realNodeLatDiff;     int16_t nodeLonDelta = realNodeLonDiff;          // check if the cast caused corruption     if (realNodeLatDelta != nodeLatDelta || realNodeLatDelta != nodeLatDelta) {       // if this point is reached, we need to add new points in the way,       // which can be represented in a 16 bit delta     }      I'm not sure how to calculate the position of new points along the way? I assume it needs to be a great circle? Points far enough apart to cause this issue are rare, but when they do happen it's usually a political boundary or similar, which tend to be quite long, and need to be accurately represented.


Determine the Degree of Data Lossiness when Converting Data

I'm working through some of the ESRI tutorials on Data Interoperability and it briefly mentions the issue of data conversion being a lossy process. Some questions that come to mind are:   1. What is being lost?   2. Does the degree of lossiness depend on data type and format?   3. Which conversion combinations are most affected?   4. Is there situations where conversion should be avoided at all costs?   5. What techniques are used to determine the degree of lossiness?  Feel free to add to the list or express any other concerns.


ArcGIS 10 sr.lock "LOCK file" how to delete?

http://forums.arcgis.com/threads/312-Beta-10-Lock-Files ArcGIS 10: Lock Files According to the above post the only way to delete these sr.lock files is to completely exit all ArcGIS programs. When attempting copy & paste of a recently used shape file (with corresponding mxd closed) this error pops up ![sr lock error](http://i.stack.imgur.com/NX9Go.png) It will paste a portion of the shape files, but not all of them. I have both service packs 1 and 2 installed. Anyone think Esri will have this problem fixed in 10.1?


How to read binary rainfall data (*.trm) in ArcGIS for Desktop?

I have some *.trm binary data that is merged Tropical Rainfall Measuring Mission (TRMM) rainfall data. I have to read it through ArcGIS for Desktop to extract rainfall data from this.


QGIS - Is it possible to Animate Polygons based on column values?

If you have an number of polygons with numeric data across 4 attributes/columns, you can display the data for one column but can you automatically cycle through the values for other selected columns? This doesn't necessarily have to be time based animation so the Time Manager doesn't work. It could be spend across different areas of business or profit by Quarter. EG Column names of Quarter 1, Quarter 2, Quarter 3 & Quarter 4 with associated values for each.


Line features into polygon features

Can any one tell me how to convert line features into polygon features in ArcGIS. I am using ArcGIS 10. I searched the arc toolbox for any tools for this conversion, but I couldn't find any. Please help me regarding this.


Split lines at polygon intersection with attributes saving

This relates to this question but what about keeping the attributes. ![enter image description here](http://i.stack.imgur.com/ksl9B.png) Having   * line_layer (id, geom, attribute1, attribute2)   * poly_layer (id, geom, attribute3, attribute4) How do I split the lines after polygons and preserve the attributes for each segment? I would also like to take attribute3 from the overlapping polygons but this is only optional. Thank you! My current code is:               SELECT row_number() OVER () AS id, *        FROM ( WITH lines_in_polygons AS (                      SELECT st_intersection(ln.geom, a.geom) AS inter                    FROM line_layer ln,                     polygon_layer a                 ), diff AS (                  SELECT st_difference(ln.geom, st_union(pl.geom)) AS geom                    FROM line_layer ln               JOIN polygon_layer pl ON st_intersects(ln.geom, pl.geom)              GROUP BY ln.geom                 )                  SELECT st_geometryn(d.geom, n.n) AS geom                    FROM diff d              CROSS JOIN ( SELECT generate_series(1, st_numgeometries(diff.geom)) AS n                            FROM diff) n         UNION                  SELECT lines_in_polygons.inter                    FROM lines_in_polygons) coco       WHERE geometrytype(coco.geom) = 'LINESTRING';


Creating planes, eg roof surfaces, from LiDAR/DSM data

Bit stuck here, Im capturing the area of roof tops of buildings from a DSM (derived from LiDAR data) which has not been much of a problem. I can then also derive angle, hillshade and aspect but it is only per-pixel. What I need to do is create the actual roof planes (either as raster or polygons) and I just don't know how to do it. I've read a lot about cluster analysis, using nearest neighbour etc. I've also read creating a TIN from the raw points, would this work? and if so, would this need to be created instead/before a raster of the DSM? Creating planar surfaces of roofs, just not sure. Thanks


Missing a Geom field in PostGis

I am working in a Database preaparation for that I exported a shapefile from Qgis to PostGis.The Problem is this: In Qgis I can see a Polygon feature but when the same polygon feature is exported to postgis the particular fields is missing its Geom what is the problem behind it?


Migrate from ArcGIS 10.2 GDB to 10.0

I need to export data from an ArcGIS 10.2 File Geodatabase (GDB) to an older version, so that users running an older version can access the data. Similarly, I would like to save a .mxd file to an older version, ideally 10 or 10.1. It seems that most people want to go the other direction. Has anyone found a way to do this with access to only a 10.2 license?


overlap two GeoTiffs to fill missing information (transparency)

I have several hundered geotiff files. Some of them (almost all of them) have black areas (irregular) on the edges. However, these black areas are covered by some other file in the file set. I read this post but it looks that the black in my file is not marked as NODATA (only 3 bands in the VRT file). Is there away to join/overlap two geotiff files (into one) and make the black color as transparent so missing areas are filled from the other file? Thanks.


How To Calculate Height of Point B?

I have a survey point data which has coordinates X,Y, Height, Angle(Dip),Azimuth, and Depth(Distance). for Example, point A: Easting: 290694 Northing: 715927 Elevation: 1060 Angle: 65° Azimuth:45° Distance:150 Can you please let me know hoe I can calculate the end point(End of trace) Height? Thanks for your time and comments


Can QGIS save layer direct to PostGIS?

I see that there is no option in the layer->save as menu for saving to a postgis database. There are for both SpatiaLite and SQLite. I am guessing that the interface to PostGIS is significantly more complex than either of the "Lite" options and it has simply never made it to the top of anyone's todo list seeing as there are reasonably straight forward workarounds that can (presumably ?) be automated by scripting. I ask because I am looking for something relatively straight forward to work on as a programming project involving QGIS. I am assuming that I can use the other two as a sort of template along with the shape to Postgres plugin. I am an experienced programmer but a relative novice at GIS stuff.


Creating a Simple Join Script in Python

I'm trying to create a simple join script in python from an arcgis model, where the only steps are joining a map to a table to produce a map with the table's properties. The attributes joined together are "CNTYFPID" from the shapefile map and "fips" from the textfile. I have tried editing the script produced by arcgis, but it's not working. Where am I going wrong?               # Import arcpy module     import arcpy     arcpy.env.workspace = "C:/Users/Documents/ArcGIS/Testing123.mdb"     arcpy.env.overwriteOutput = True          # Script arguments     Map = arcpy.GetParameterAsText(0)     if Map == 'tl_2009_us_county_albers_USGS.shp' or not Map:         Map = "C:/Users/Documents/ArcGIS/Python/tl_2009_us_county_albers_USGS.shp" #provide a default value if unspecified          Crosswalk = arcpy.GetParameterAsText(1)     if Crosswalk == '#' or not Crosswalk:         Crosswalk = "C:\\Users\\Documents\\ArcGIS\\Testing123.mdb\\cao_fips_crosswalk_for_gis" # provide a default value if unspecified)          # Local variables:     Map = "C:\\Users\\Documents\\ArcGIS\\geography\\tl_2009_us_county\\tl_2009_us_county_albers_USGS.shp"     Final = Map          arcpy.MakeTableView_management(Crosswalk, "fips")          #Process: Join Field     arcpy.AddMessage("Performing Join Field")     arcpy.JoinField_management(Map, "CNTYIDFP", Crosswalk, "fips", "")      The python version I am using is 2.7 and the arcgis version is 10.2. This is what it looks like in modelbuilder > Error message: "Traceback (most recent call last): File > "C:/Users/Documents/ArcGIS/Yo2.py", line 28, in > arcpy.MakeTableView_management(Crosswalk, "fips") File "C:\Program Files > (x86)\ArcGIS\Desktop10.2\arcpy\arcpy\management.py", line 6306, in > MakeTableView raise e ExecuteError: Failed to execute. Parameters are not > valid. ERROR 000732: Input Table: Dataset > C:\Users\Documents\ArcGIS\Testing123.mdb\cao_fips_crosswalk_for_gis does not > exist or is not supported Failed to execute (MakeTableView)."


How to add custom widget into Mapguide Maestro 4.0.1?

I am developing a Web-Mapping application using **Mapguide Maestro 4.0.1** , in that I need to add a custom widget. Any suggestions for, How and Where to add the custom tools in the Mapguide Maestro. **Is there any documentation for how to add the custom tools?** I am using MapGuide OpenSource 2.2, MapGide Maestro 4.0.1. Thanks in advance..


publishing arcgis map services to a different server

Is it possible to publish a map service to a server different to the one where ArcGIS Server was installed? If so, how can this be done? Thanks!


How can I create random points along a polyline in QGIS?

I am trying to create random points along a polyline shapefile in QGIS. Basically, like the 'random points' tool in 'research tools' but for polylines instead of polygons. I have tried converting the line file to a polygon shapefile, but it fills in some areas with polygons, whereas other areas remain long line-type polygons. I am pretty new to QGIS, and am not really familiar with Python code. Thanks


How to efficiently find points within an elliptical area?

Using PostGIS 2.0.0 I need to filter the results of a function, which returns many POINTs, to find the ones that lie within an elliptical area defined by two points and a distance (all parameters passed into the query). A filter using ST_Distance does the trick, but I wonder if there's any way to speed it up? Simplified query:               SELECT candidate_point     FROM my_function(some, params)     WHERE         ST_Distance(candidate_point, 'SRID=4326;POINT(1 2)'::geography) +         ST_Distance(candidate_point, 'SRID=4326;POINT(3 4)'::geography) <= 60000      I tried using ST_DWithin as an additional filter, but that slows it down tenfold! Because candidate_point comes from a function, not a table, there is no index to use. Perhaps there is still something that can make it faster?


How to identify a selected graphic element(s) in python

I have a situation where I am inserting items from Excel into maps a lot. When I insert the items it always makes them a fixed width and then adjusts height to maintain aspect ratio. What I would like to do is paste the object, then click my tool. THis would prompt me for a number of units the item should be, and the tool would then resize it appropriately. I am able to get to a list of graphic elements ( narrowed down to photo elements even) using               arcpy.mapping.ListLayoutElements(mxd, "PICTURE_ELEMENT")      But, I'm not sure how to identify which one/ones are selected in order to start manipulating it/them.


Edit multiple tables with the same structure at the same time?

does anyone know how to edit multiple tables at the same time? I have multiple .tab files and I want to change the order of the fields. Is there any way to do this for all of them at once. They all have identical table structures. I have both MapInfo and QGIS available to use. Thanks, Alan


Color depending on attribute

I'm trying to set the color of a vectorlayer feature depending on the feature attributes with PyQGIS. How do you acces the attributes of a vectorlayer feature?


How do I control rendering order of items in composer?

Alternative formulation of the question is: Is there any other way apart from the order of adding items to the canvas of setting the rendering order> The problem is that I want to change the map which was added first and the legend overlays the map so when I delete and replace the map the legend is underneath it.


Unable to show tiff "parameters"

Why this raster (tiff) does not have any values? Why I am unable to perform:               doubleclick -> onechannel pseudocolor -> clafify      Both rasters are downloaded from the same site: www.globalforestwatch.org from their "data page" respectively. **Working** (from picture below) http://commondatastorage.googleapis.com/earthenginepartners- hansen/GFC2013/Hansen_GFC2013_lossyear_50N_130W.tif **Not-working** (from picture below) http://commondatastorage.googleapis.com/earthenginepartners- hansen/GFC2013/Hansen_GFC2013_lossyear_60N_140W.tif What is the _difference_ in these tiff's? **I am using Qgis 2.2 on Ubuntu.** ![enter image description here](http://i.stack.imgur.com/wqKRD.png)


Connecting uDig with Sql server 2008

I tried to connect uDig with Sql server 2008 but could not do it the following error poped that it missed imageio ext and jdbc driver for sql server. I added it to jre/ext/lib (both of them). Now the error is not present but when I click next and click finish there is no change.What is the Error in here? ![enter image description here](http://i.stack.imgur.com/xmFjt.png)


How to sort a column in attribute table programmatically

Is there any way to sort ( alphabetically ) a column in the attribute table programmatically (without clicking on the column header) in QGIS ?


How to Calculate the Maximum Distance Between Features?

I'd like to calculate the _maximum_ distance between polyline features. I have a base polyline with many other polylines either touching or near the base polyline as shown in the picture. The distance I would like to calculate is from the base feature (red) to the other features (blue). Because I'm looking for maximum distance, it would be the perpendicular distance from the "peaks" of the blue polylines to the red polyline. ![Calculate Max Distance](http://i.stack.imgur.com/vIoR6.jpg) I'm using FME for this process and I can't seem to find anything that calculates _maximum_ distances. I thought about chopping the blue lines to points using the "Chopper" transformer and calculating the distance to the base feature and then grouping by some ID and finding the maximum within that grouping. Then, possibly, put that value back into an attribute of the unchopped line. However, I'm not really sure how to do all that. Am I on the right track? Can anyone advise of another method? Or how I can implement my method? Thanks.


Problem with Mapnik and custom XML-File

I'm right now working with navteq data and building 'the XML-File' to generate the tiles! I started with an all original osm.xml, and set all the status' to "off". First I checked the dataset in my database with SRID(the_geom) and got a return "SRID:4326". So I set up the layer to SRID4326 instead of SRID900913.               <Layer name="myLayer" status="on" srs="+init=epsg:4326">      My pgSQL query was written according to the OSM query:               (select the_geom, 'true' as "water", polygon_nm as "name"           from waterseg ) as myLayer      The next step was to setup the stylesheet. I did that - set the max and min zoom level to the maxima. So the zoomlevels should influence the rendering. But it's not working. I can't see a single stroke on the image. I just get an empty picture. I tried to look through the file and see if there is any problem with a potential z-level - don't think so. Next was to check the bounds - no matter if I set bounds as 900913 or 4326 the image is still the same. I assume strongly, that I have somewhere a problem with the projections. Can anyone help me? Has anyone ever tried to render a full map from scratch, without the predefined stylesheet! Thanks


create convex hull polygons / cluster for sets of N points in a point dataset

I have 50k points in a feature class which I need to build convex hull or polygon for each set of 50 points that are nearby each other. I guess the question is very similar to create census areas for each 200 households. I've tried all tools in ArcGIS Desktop 10.1 but none of them does what I'm after. I also tried some other third-party tools which allows me to create convex hull based on K-means algorithm - means I can specify the number of convex hulls to be generated but still can't see how to create convex hulls for a specified number of points. I'm open to any solutions not just limited to ArcGIS, but the final result need to be imported back to ArcGIS. Any advise would be appreciated! Thanks.


How to prevent running part of a model when iterator is used?

My process is to run Buffer on two feature layers, intersect the buffers and then Clip intersected buffers with polygon object from Iterate Feature Selection iterator. Here's my model: ![Model with iterator](http://i.stack.imgur.com/0c9TQ.png)   The model runs Buffers and Intersect firstly, then iterate and create Single Object, and lastly Clip features. But in the next iteration it again runs Buffers and Intersect, what is not needed.   Is it possible to prevent running Buffers and Intersect in each iteration?   In other words, how to create Intersected buffers only once and then reuse it in each iteration?   * * * EDIT:   Following blah's suggestion I managed to create desirable model. I enclose it, because it's slightly different than web-help example: ![enter image description here](http://i.stack.imgur.com/pTbTG.png)


OpenLayers 2.12 + KML from String + Change markers'icons

Reading this post How to add KML data but from variable - not from url? I changed the way of reading KML files (from HTTP to a string loaded using jQuery)               /**      * The OpenLayers object      * @type {OpenLayers.Projection}      * @var      */     var geographic = new OpenLayers.Projection('EPSG:4326');          /**      * The OpenLayers object      * @type {OpenLayers.Projection}      * @var      */     var mercator = new OpenLayers.Projection('EPSG:900913');          ****     success: function(data) {         if (data != '') {             var format = new OpenLayers.Format.KML({                 'internalProjection': mercator, //EPSG:3785/900913                 'externalProjection': geographic, //EPSG:4326                 extractStyles: true,                 extractAttributes: true             });             sFeatures = format.read(data);         }     }      I would like to use the icons that come from the KML string, but when I click on a feature I would like to increase the size of the icon or even change it. My Layer definition:               var hydrographsLayerVector = new OpenLayers.Layer.Vector('hydrographs', {         //renderers: renderer,         styleMap: new OpenLayers.StyleMap({             "default": new OpenLayers.Style(OpenLayers.Util.applyDefaults({                 externalGraphic: "http://openlayers.org/dev/img/marker-green.png",                 graphicOpacity: 1,                 rotation: -45,                 pointRadius: 10             }, OpenLayers.Feature.Vector.style["default"])),             "select": new OpenLayers.Style({                 externalGraphic: "http://openlayers.org/dev/img/marker-blue.png"             })         })     });      If I remove the lines extractStyles and extractAttributes = true I see the effect using the styleMap defined in the new OpenLayers.Layer.Vector('hydrographs'*. How can I use the styleMap:"select": if I use extractStyles and extractAttributes = true? Ideally, I would like to increase the size of the feature onmouseover and if the user clicks on it I want to keep the bigger size until the "unFeatureUnSelected". Thanks!


Change printer for a specific map document from Arcpy

Is it possible to change the printer for a particular map document from ArcPy? The mxd is saved with the default printer settings, and I know with the PrintMap() function one can specify the printer to use. In my case, I do not want to print the map, just change the printer.


QGIS python - identify and highlight features programatically

In QGIS there is an option to select features of a selected layer using a "identify feature" tool. Then the feature get highlighted in a different color and attribute dialog is poping up. like that i want to highlight the multiple features programatically. Ex: scenario i have a set of vector layers which consists of number of roads as features. I need to select few roads by looking at its attributes and highlight. is there any way of achieving this using python code? appreciate your help


How to uninstall standalone QGIS & reinstall in OSgeo4w on Win7?

I need to apply a patch to QGis but installed as standalone instead of OSGeo4w: foolish. I'd like to uninstall then reinstall via OSGeo4w so as to have linux-like updating support, but before I do so, can anyone advise me whether my maps & WMS info will be saved, or if there's anything one specifically needs to do to avoid extra headaches/work during this process? Many thanks in advance.


How to generalize SpatialPolygons and conserving topology in R?

I would like to generalize a `SpatialPolygonsDataFrame` in R to make plotting more efficient. The polygons I have result in huge pdf plots that are slow to load and hard to integrate into a document. I tried to use the `gSimplify` function from the `rgeos` package, but unfortunately it does not conserve the topology of the polygons. Is there an alternative that I can use? thanks


How to stop writeOGR from abbreviating Field Names when using "ESRI Shapefile" driver

I'm currently using the following script to add some attribute data from a table to lots of individual shapefiles:               library(rgdal)     specieslist <- read.csv("SpeciesList1.txt", header=F)     attdata <- read.table("TestAtt.csv", sep = ",", header=T)     for (n in 1:dim(specieslist)[1])      {     speciesname <- specieslist[n,1]     shp <- readOGR("Mesoamerica_modified_polygons", speciesname)     shp$ENGL_NAME<-attdata[n,2]     writeOGR(shp, "PolygonsV2", speciesname, driver="ESRI Shapefile")     }      I get the following warning(s) at the end:               1: In writeOGR(shp, "PolygonsV2", speciesname, driver = "ESRI Shapefile") :     Field names abbreviated for ESRI Shapefile driver      When viewing the attribute table of the shapefiles after this process, the Field name has been shortened to 'ENGL_', but I want it to stay as 'ENGL_NAME'. Is there a way to turn this abbreviating off? Any help much appreciated.


How to find isolated geometry/attributes in road network?

I have a road network with paved/unpaved status in attribute table. This road network don't must contain isolated paved geometry. There are any solutions find isolated geometry in GIS software (ArcGIS/QGIS or other)? ![enter image description here](http://i.stack.imgur.com/jsPY2.jpg)


Flash more than one feature in arcmap using C#

How to flash many features at same time in ArcMap using C# coding? Currently I call this function in a loop,               private void FlashFeature(IActiveView _activeView, IFeature _feature)     {         IActiveView activeView = _activeView;         IFeatureIdentifyObj featIdentify = new FeatureIdentifyObject();         featIdentify.Feature = _feature;         IIdentifyObj identify = featIdentify as IIdentifyObj;         identify.Flash(activeView.ScreenDisplay);     }      but unfortunately it flashes one feature at a time, and while flashing is happening it holds the process. As a result of that it flashes around 2 features in a second, instead of them all at once. I also want to flash thous features without changing my curent feature selection in map, if posable. The default ArcMap Find tool(form or whatever it is) can do it, and i'm trying to find a way to implement that in my tool.


How to customize ArcGIS Silverlight API 2.4 legend?

I am using Esri's ArcGIS Silverlight API 2.4 and below is my legend. My map has one feature layer and one dynamic service layer with nested layers like below               Feature Layer A     Group Layer     Group A     Layer A1     Layer A2     Layer A3     Group B     Group B1     Layer B1     Layer B2     Group B2     Layer B2     .....      'Feature Layer A' is the same as 'Layer A1' and I want to bring this 'Feature Layer A' to position of Layer A1. But this layer should be remain as feature layer only. How can I do this? i.e feature layer inside the dynamic service layer group?


Define "geospatial data" for a non-GIS professional

I realize this is a sort of a subjective question, but I've seen other subjective questions on the site, so I thought it I'd put it out there. A colleague recently had a request for "geospatial data" with a grant that they were submitting, and were confused by exactly what was being asked for. My explanation was that they were asking for any GIS data related to the project area. My explanation seemed to work, but I wanted to put it to the community at large for a more defined definition. How would you define "geospatial data" to a non-GIS professional?


Can't Select and Export from Python Script

I am a novice in python programming but I am trying to learn by doing. I got stuck with this function a while back and can't seem to find a solution or a workaround. I am writing a script that is trying to select all data in an MXD within a 70m distance from a layer and then export that data to a newly created file geodatabase. I can´t seem to get this to work, all I get is the error:               FDO error: -2147024894 [GDB_Items]          The table was not found. [Output name]      And I somehow manage to get some kind of output, in the form of empty geodatabase tables in the output file geodatabase with the “correct” output names. I have a suspicion that the problem lies in the feature layers origins. They reside deep in our file tree (for exampel G:\KONSULTUPPDRAG VMN\SAMRÅD\2012\Uppsala\C 55 Örsundsbro - Kvarnbo\Kartor\Grundkartor\Fastighetskartan.gdb\vo) there is nothing I can do about it unfortunately. Here is my code:               import arcpy, os, re     from unicodedata import normalize          Skapa_mapp = (unicode ("C:\\Users\dabr\\Desktop\KMZtest\\", 'UTF-8'))     Mxd_Natur = arcpy.mapping.MapDocument((unicode ("C:\\Users\\dabr\\Desktop\\KMZ test\\YAYYY_Test1.mxd", 'UTF-8')))     Vag = "c 801"          def Select_and_Export (Mxd_Natur, Skapa_mapp, Vag):         Db = Skapa_mapp +"KMZ\\KMZ_Databas.gdb\\"                        #Define the output DB          for df in arcpy.mapping.ListDataFrames(Mxd_Natur):                  #Find the road from whitch the selection is made with.          for lyr in arcpy.mapping.ListLayers(Mxd_Natur, "", df):             if lyr.name.lower() == unicode (Vag, 'UTF-8'):                 Utgangslager = lyr          for df in arcpy.mapping.ListDataFrames(Mxd_Natur):                           for lyr in arcpy.mapping.ListLayers(Mxd_Natur, "", df):         #Loop trough all the layers in the MXD to make                                                                          #a selection and exprt if annything got selected             Sokvag = lyr.workspacePath                                  #Get the path to the specific layer             SokvagNamn = lyr.datasetName                                #Get the name of the specific layer             File_path = Sokvag + "\\" + SokvagNamn                      #Combine to create full path             print File_path                  if not Sokvag.endswith(".gdb"):                             #layers in mxd can be both from GDB and .shp                 File_path = File_path + ".shp"                  Namn = lyr.name.lower()                                     #                 Namn = re.sub('[ ]', '_', Namn)                             #create a output name bades on the layer name              Namn = normalize('NFKD', Namn).encode('ascii', 'ignore')    #in the mxd                       if arcpy.Exists("TEMP"):                                    #if temporary file exis´ts from previous run, remove it                 arcpy.Delete_management("TEMP")                 print "temp removed"                       arcpy.management.MakeFeatureLayer(File_path,"TEMP")         #Recreata a empty templayer             arcpy.SelectLayerByLocation_management("TEMP", "WITHIN_A_DISTANCE", Utgangslager, "70 Meters", "NEW_SELECTION") #populate the templayer whit selected objekts?             out = os.path.join(Db, Namn)                                #Create a path to the output location                  print str(arcpy.GetCount_management("TEMP").getOutput(0))+" Selected from " + Namn      #Show number of selected objekts.                  if int(arcpy.GetCount_management("TEMP").getOutput(0)) > 0: #check if anny objects were selected. if not dont export                 try:                          if "TEMP".endswith(".shp"):                         #test if the temporary layer is based on a shp file?                         print Namn + " skall shp kopieras"                         arcpy.CopyFeatures_management("TEMP", out.rstrip(".shp"))        #Coppy selected objekts to FDB                         print Namn + " shp kopierad"                     else:                         print Namn + " skall koppiers"                         arcpy.CopyFeatures_management("TEMP", out)      #Coppy selected objekts to FDB                         print Namn + " är kopierad"                      except:                    print arcpy.GetMessages()                       else:                 print lyr.name.lower() + " no objekts were selected"      Does anyone see a solution to my problem or perhaps a workaround? Edit: After some tweaking I stumbled upon the problem and solution. I was using a File GDB as an output in the CopyFeatures_management function. I don’t know why but if I changed it to a personal GDB everything went fine. Can anyone explain why?


Has anyone discovered any compatibility issues between ArcGIS 10 clients editing older ArcSDE geodatabases (e.g 9.3.x)?

I’ve read the ESRI documentation here: http://goo.gl/UUSM (link to ESRI) and http://goo.gl/TsmV (link to ESRI) , so I know the documentation states that you can. And I’ve actually edited data (a very small amount) in a 9.3 ArcSDE with no problems. For those who are actually producing & maintaining on their versioned 9.3 geodatabases with ArcGIS 10 clients, have you experienced any issues? Or has it been a relatively smooth experience (i.e works as advertised)?


How do I make lines look "continues" (images inside)?

> **Possible Duplicate:**   >  How can I merge segmented roads into one line? A TAB file in MapInfo looks like this : ![enter image description here](http://i.stack.imgur.com/kCKoP.png) but when I import it to QGIS (and convert to shp) it looks like this : ![enter image description here](http://i.stack.imgur.com/pHFPo.png) How can I make the QGIS layer look like the MapInfo layer (I don't know the term of this functionality)


How to perform a spatial join of point and polygon layers in PostGIS?

I have a point dataset representing households that I want to associate with a parcel layer (i.e. assign its parcel_id). With ArcMap, I could spatially join the polygons to the points and specify that the join have a certain search radius and use the nearest polygon. I wish to perform this with postgres and was wondering what the most prudent way of doing this was. I can't use ST_contains because points fall on streets and not on actual parcels. In stead of ST_contains, is there another function allowing for proximity checks?               update households h set parcel_id = p.parcel_id      from parcels p where ST_contains(p.the_geom, h.xy);


How to choose pixel values according to each land cover class?

I would like to do following steps using two types of images (precpitation and Land cover image):   1. select pixel values of precipitation image within each land cover classes   2. calculate total amount of precipitation of each land cover classes Could you please tell me the tools I use and the steps I need to follow in ArcGIS, ENVI, or ERDAS.


How to get the two nearest points between two polygons

I'm trying to draw the nearest line between the nearest polygons in a Polygon dataset (ESRI Shapefile). I know that for this purpose there is the Near Tool (ArcGIS), but it just return the point TO which to connect but not the point FROM the first polygon and I don't want the centroid. So I tried to do my own implementation and surprisingly it is running faster than Near Tool (at least for my huge data), and it is performing this way:   1. Get a cursor and loop through all polygons   2. For each polygon in cursor get another cursor2 from polygons which are in certain range from the extents   3. Then it just calculate distances using built-in functions and get the closest one   4. I can get the two closest points looping through all point in the polygons and use distance functions Am I doing it the best way? I tried using QgsSpatialIndex but it is returning the wrong pairs for some reason. Is there any built-in function to return the two closest points directly? FWY I'm using arcpy, but previously I was using pyqgis.


Imagery on March 6, 2014 @ Lat 42dd55'22" N, Long 079dd37'36" W

I am looking for any advice where to find imagery on March 6, 2014 (or a few days following) for: ![location](http://i.stack.imgur.com/wjqT4.jpg) I have searched the USGS, ImageHunter, and Digital Globe with no luck. Does anyone have a resource where I can find imagery for Dunnville Ontario on March 6, 2014? * * * There was a fire on this day and I am looking for before/after imagery. See this article by the hamilton spectator about the fire. Dunnville ‘in shock’ over Rosa Flora fire


query CartoDB private tables with the api-key show error 503

I'm doing a test map with two tables, one with polygons and the other with points. I create a layer with two sublayers (polygons and points). The user selects a state and the query is updated showing the selected state and the points contained therein. I have a code that works with public tables, but when I try to use the api-key (as seem on here) I get an **Error 503 backend read error** when the query updates This is my code for createLayer:                  cartodb.createLayer(map, {         user_name:user,         type: 'cartodb',         sublayers:[subLayer0Options, subLayer1Options],         options: {           table_name: point_table,           user_name: user,           extra_params: {             map_key: key           }         }       })       .done(function(layer) {         layer.options.extra_params.map_key = key;         layer.addTo(map);         layer.setInteraction(true);         updateMap(layer);       })      The updateMap() function:                function updateMap(layer){         layer.setInteraction(true)              // change the query for the sublayer(0) == polygons         var myquery0= "SELECT b.* FROM usa_states b, point_table s WHERE b.state = '"+state+"' AND st_intersects(b.the_geom_webmercator, s.the_geom_webmercator)"         var subLayer0Options = {           sql: myquery0,           cartocss: "#usa_states {polygon-fill: #0f3b82;}"         }         var states = layer.getSubLayer(0)         states.set(subLayer0Options);         //states.setInteraction(false);                    // change query of the sublayer(1) == points         var myquery1= "SELECT s.* FROM usa_states b, points_table s WHERE b.state = '"+state +"' AND st_intersects(b.the_geom_webmercator, s.the_geom_webmercator)"              var subLayer1Options = {           sql: myquery1,           cartocss: "#point_table{marker-fill: #FFCC00;}",           interactivity: 'cartodb_id, column1, column2, column3',           infowindow: true          }         var points = layer.getSubLayer(1)         points.set(subLayer1Options);         points.setInteraction(true)         points.infowindow.set('template', $('#infowindow_template').html());         //cdb.vis.Vis.addInfowindow(map, points, ['cartodb_id, column1, column2, column3'])              var sql = new cartodb.SQL({ user: user, api_key: key});         sql.getBounds(myquery1).done(function(bounds) {             map.fitBounds(bounds)         });       })     };      Use the apikey on the client is only for local testing, I read something about how the maps with private tables now **must** use "template maps". Edit: I'm trying to do a template.json file but I don't know how to put two sublayers in the layergroup:               "layergroup": {        // see https://github.com/CartoDB/Windshaft/wiki/MapConfig-specification        "version": "1.0.1",        // Array of layers defined in render order        "layers": [{           "type": "cartodb",          "options": {            "cartocss_version": "2.1.1",             "cartocss": "#layer { polygon-fill: <%= color %>; }",            "sql": "SELECT s.* FROM usa_states b, points_table s WHERE b.state = <%= state %> AND st_intersects(b.the_geom_webmercator, s.the_geom_webmercator)",            "affected_tables": [ "usa_states", "points_table" ],            "interactivity": [ "cartodb_id", "field1", "field2", "field3", "field4"]          }        }]      }


How to select more than one feature using values?

What should I do if I want to select more than one feature using values ? For selecting a single feature, I enter an expression like this which works:               "LINK" = 28      Assume `LINK` as a field in the above example. Now what if I want to select more fields like that. I expect something like this:               "LINK" = [28, 56]      The above expression doesn't work (obviously). Is there a way to achieve this in Quantum GIS ?


Is there a way to constrain an FME.exe to certain amount of RAM?

If I have FME Desktop running on a workstation with a large amount of RAM (e.g. 128 GB), is there a way to constrain an FME.exe process to a certain amount of RAM (e.g. 48GB)? This question is inspired by my closely related question:   Is there an optimum RAM configuration to use for FME Desktop?


Why can't I edit attribute table imported through 'text as layer'

I imported the coordinates from an Excel table. They show as single points as intended. Now I want to add columns to the attribute table, but I'm not able to edit it. I wanted to import the following columns from Excel as well, but that doesn't seem to work either. Sorry for the noob-question, but I couldn't find anything relating the theme through google and such. Ok, with pictures then: I want to use that to add columns with information to these ![enter image description here](http://i.stack.imgur.com/hGuri.jpg) ![enter image description here](http://i.stack.imgur.com/NMvJx.jpg) You see, the small pensil thingy is greyed out, so I can't edit anything in this layer and I can't add any information to my points. If I try Ale suggestion I get this error: ![enter image description here](http://i.stack.imgur.com/R1PoM.jpg)


How to add points to LAS copy using liblas?

I am trying to make a copy of a LAS file while inserting new points using python liblas module. The code below creates the copy and adds the points, but for some reason the added points are not in the correct location. Also, it seems that x, y, z values are being stored int instead of float values. Can anyone explain why I am having this problem? Thanks in advance for your help.               import liblas     from liblas import file as lasfile          las_file = r"path here"     out_las = r"path here"          # Read las file     f = lasfile.File(las_file, mode='r')     h = f.header          # Open file to write to, using original header     fout = lasfile.File(out_las, mode='w', header=h)          counter = 0     for p in f:         if counter != 0:             # Code to Interpolate             # x, y, z for new point             # from existing points             vD = (new_x, new_y, new_z)             # vD is tuple of floats             new_pt = liblas.point.Point()          # Create Point object             new_pt.x = vD[0]                       # Set x property             new_pt.y = vD[1]                       # Set y property             new_pt.z = vD[2]                       # Set z property             fout.write(new_pt)                     # Write new_pt to fout         # Write p to fout, retaining original properties         fout.write(p)         counter += 1     fout.close()


Is there an optimum RAM configuration to use for FME Desktop?

I have a couple of workstations with 32GB RAM where fme.exe processes often exceed 25GB, if its available. And I'm looking to possibly add a 3rd workstation. I noticed in an FME2014 beta build some performance degredation for fme.exe processes using large amounts of memory. Log file had tons of `ResourceManager: Optimizing Memory Usage. Please wait...` statements, so I think it was spending more time **optimizing** memory than it was using it. But I'm not in a position where I can test a newer betas and different releases at the moment. Do production releases of FME Desktop work best on a certain RAM configuration (or is there an optimum range). Would FME benefit from 128GB of RAM? Or would there be issues? I'm intentionally leaving versions out of this question because I'm interested in any experience with FME Desktop with a RAM configuration higher than mine. _FWIW, it's really cool that I get to ask a question about a software that can use 25GB._


False easting/westing with MGI/Austria M28

After extracting the XY coordinates from geometry data via "save as csv" I get coordinates which are about 150 km more in the west than they should be. North/south seems right. I set the CRS to MGI/Austria M28. Any suggestions?


Help interpreting open text file

I have an existing Arcpy script written by others that I need help interpreting. The script reads records from a feature class and loops through and writes them to a log file. Here is the section I need help with: Hope this conforms.               if r_count <= 0:             print str(r_count) + " No IDs Found"                  # Open a log text file for reading             ef = open(ERRORFILEname2, 'rb')             # Create a text/plain message             msg_body = MIMEText(ef.read())             ef.close()      Question: what does the 'rb' represent in the open statement? Thanks for the support!


Creating Buffer from field in Attribute table

I have a shapefile in ArcMap with about 30 polygons and want create an inside buffer, using a different value for the distance of each buffer on each polygon. I was wondering if there was a way to use a field in the attribute table of that shapefile to created an inside buffer, and if there is a way, how would I specify the units for that field in the attribute table. Thanks!


Exporting classnames using Monteverdi

i managed to get my rgb-Image classified with Monteverdi. I discribed 8 classes with different classnames. For my work i dont need the rgb-values, i just need the classnames. Is there any way to export my classification result as vector file? Or can i save the information about the classname? I was just able to export my classification result as tif-file. So my input file contains 3-Band rgb values and my exported file has the same as well, just different values. Iam open for all suggestions. Thanks. Update: I am still not able to export my resulting classes. All i get is a 3-band rgb images regardless whether i choose *.img or *.tif. How can i do that?


Leaflet WMTS layer

I would like to start using Leaflet instead of OpenLayers, but I can't find a way to load WMTS layer into the map. Is that possible with Leaflet, or do I have to stick with OL? I haven't found anything related to this topic.


What are duck egg patterns in weighted moving average spatial interpolation method?

I'm dealing with spatial interpolation methods, in particular with the weighted moving average. I come across really oft with a term "duck egg patterns" which are caused by isolated data points. Does any one has an idea what do they mean. What do duck eggs look alike? (not different as any other egg.....).


Where can I find a Unesco World Heritage List as boundaries?

I was wondering if anyone knows where to find the UNESCO world heritage list with boundaries? I can extract point data from the json feed for the map on the website http://whc.unesco.org/en/list via http://whc.unesco.org/?cid=31&l=en&mode=json but polygon or polyline data would be much more preferable. Edit: I was particularly interested in Australia, but it would be good to know where to go to find this sort of info worldwide, so if you have other countries, feel free to post them up as well.


Breaklines in QGIS interpolation plugin

How can I prepare data to generate a DTM using points and breaklines, but where every breakline has nodes at different heights. For example, a river valley, which regularly falls, or a dorsal line, where each vertex is a different height. Thanks for the answer. Tom


Spatial distance analysis in QGIS

I'm quite new to QGIS and trying to figure out how to analyze the following problem. I have three layers:   1. settlements _point_ layer with 253 entries    2. waste treatment facilities _point_ layer with 24 entries   3. roads _polyline_ layer My problem is to find the distance between each settlement from layer (1) to each treatment facility in layer (2), however it has to be subjected to roads (layer 3), namely instead of getting aerial distance matrix I am looking for to the matrix that describes the actual driving distance. I'm kindly asking your help with suggestion of how to perform this analysis with QGIS 1.7 (note that I don't know how to use PostGIS layers, if relevant)   * what plugin can or should I use?   * Should the polylines be connected to the points in both layers?


Why does Transverse Mercator projection have scale factor?

Why does the Transverse Mercator projection have a scale factor in ArcGIS and the standard Mercator projection not? In other words what is the difference between these two projections beside being a horizontal respectively vertical cylinder?


How to draw 3d objects from .kml file on gwt-openlayers map?

I tried to run gwt-openlayers KML example on my PC but failed to see KML layer. I set `protocolOptions.setUrl("http://dev.openlayers.org/releases/OpenLayers-2.13.1/examples/kml/lines.kml");` instead of `protocolOptions.setUrl("lines.kml");` without any success. I also tried               Vector kmlLayer = new Vector("KML");     VectorFeature[] kmlFeatures = kml.read("lines.kml");     kmlLayer.addFeatures(kmlFeatures);      but I'm in doubt does `read()` method take file name as argument. Probably I have to provide KML string to `read()`am I right? Is there any working example with ready KML file with 3d objects inside? How modify showcase example in order to use local files? I guess `HTTPProtocolOptions.setUrl()` method in the example relevant only for remote, non-local .kml files.


How to get only one biggest point in polygon?

I have polygon and point feature classes. Every polygon have 2 points inside them. For output I need only one point with highest value. I need incorporate this step in ModelBuilder. I had idea about iterator, but I'm not sure about this since it might have problems with bigger feature classes and older hardware. So I'm looking a way around it. ![enter image description here](http://i.stack.imgur.com/YsV8Y.png)


avoid using the same road twice

I am currently developing an application to create tours for motorbikes. At the current stage of development there is a start/endpoint and several points which outline the tour. Between these points the pgr_dijkstra function is used (with a customized cost function). The problem is best described by the picture attached. ![Problem](http://i.stack.imgur.com/OlEKX.png) Is there a way to avoid an edge getting traveled twice? I have tried to use the reverse cost column with a high cost but as the graph is not directed I get odd results. At least the pgrouting documentation states that the graph has to be directed to use the reverse cost if I understood that correctly. Any help would be much appreciated and thanks in advance.               <-- language: lang-sql -->     sql := 'SELECT DISTINCT ON (seq)              seq, id, the_geom, id1 AS node, id2 AS edge, cost, km                  FROM pgr_dijkstra(''                      SELECT id,                      source::integer,                      target::integer,                      my_cost::double precision AS cost,                          FROM network                           WHERE network.the_geom && bbox                 '',' || source || ',' || target || ', false, false),                  network WHERE id2 = network.id';      Sorry I forgot about the code. This is the statement to create a part of the route. It is nested inside a loop which passes new source and target in every iteration as long as there are some. This code is executed and returned record-wise.


Styling/Selecting based on a hstore column in TileMill?

I have added an OpenStreetMap dump file to PostGIS using osm2pgsql --hstore (and the default osm2pgsql style file). I have added and opened up this to TileMill. Is there anyway to style the map based on the values in the hstore column (`tags`) in TileMill using only CartoCSS? Or do I have to change the subquery on the layer to 'extract' the hstore column to make it look like a real column? e.g. pretend I want style based on the OSM `wifi` tag, which is a key in the hstore `tags` column. In SQL I could select it with: `select * from planet_osm_point where tags->'wifi' = 'yes';`. If `wifi` was a real column, then I could style it in CartoCSS with:               #mylayerid[wifi='yes'] { … }      What would I put in to select based on the `tags` column?               #mylayerid[?????] { … }      I would like to use TileMill as a server to demo using OSM, and allow people to style based on esoteric/edge cases. These are not very technical people, so I'd like to have it as easy as possible.


What does coordinate system WG 21° mean?

I have a land survey document for a piece of land, it contains absolute coordinates that I would like to locate on google maps, but I don't know how to correctly interpret the data. ![Coords](http://i.stack.imgur.com/qci76.png) What does the "System: WG 21°" mean and how do I convert these coordinates to decimal notation for google maps? The land is located in South Africa. My Attempt: I considered that the constants were somehow the baseline values, and tried adding the constants to each coordinate value, but the result doesn't match decimal notation. In any case, in South Africa, the latitude is negative and the longitude is positive. Both latitude and longitude are positive in this case, which makes me think that they're not latitudes or longitudes at all, but rather the result of a more complicated transform. The transform is probably indicated by the WG21 (hence the question), which is where I am currently stuck.


Data Driven Pages - Page Number with Count

I hope this isn't a duplicate question, I have had a look but couldn't find an answer. I have a set of 100 data driven pages showing different roads. I would like to export the map book by road. E.g. one road will be one pdf, another road will be exported to another pdf. The issue I have is with the page numbering. I have set each page to have a dynamic page number with count. At the moment, when I export _Road A_ , the page numbers show 'Page 1 of 100', 'Page 2 of 100' etc. I want _Road A_ to have 'Page 1 of 5', 'Page 2 of 5', etc. then _Road B_ will have 'Page 1 of 2', 'Page 2 of 2'. I hope that makes sense! I can't seem to work out how to do this, I'm sure I have done it before, but my terrible memory has failed me! If anyone can offer any advice I would greatly appreciate it.


How to convert lat long to meters using Mercator projection in C#

I have set of lat long values and I want their equivalent in meters using Mercator projection in C#. Can you please post some sample code or api example of some library that does exactly this?


Converting point sets to polygon boundaries

I'm trying to convert sets of points to their respective polygon boundaries. I think this is something like a Voronoi diagram or Convex Hull, but not quite. I'm sure there's a technical term for it, but I'm a beginner to GIS. It's probably best illustrated with the following image: ![enter image description here](http://i.stack.imgur.com/lXx7K.jpg) So, given 4 sets of points (each set in its own colour), what are the four polygons surrounding each respective set of points such that the spacing between polygons maximizes the margins and all the polygons meet together? Here's a simplified example with 3 points:   * A,43.656943,-79.393928,blue   * B,43.66663,-79.402682,green   * C,43.656447,-79.408004,green You'll have to view the following graphic for it to make sense: ![enter image description here](http://i.imgur.com/SCFED.jpg) Essentially, each point has a colour and you expand a buffer of a certain distance out from it to start. The hard part is when there's a collision with other points (their boundaries) and where to compute that boundary. The result is a set of polygons (one for each colour/set). Thanks!


Do Data Driven Pages enable PDF merging without losing layers?

I'm setting up a mapbook with layered PDFs, what I have is the first map showing the extent of the grid (an overview map) with the rest of the maps showing each grid. It has been annoying to set up an overview map on the same data driven mxd, it would be much easier to export it as a seperate pdf and then merge it with the rest of the mapbook, but this loses layered pdf. Anyway, so I have the extent and the rest of the mapbook set up - however I have a couple of issues still. I don't know how to set the symbology between the extent map and the grid maps (i.e road label with a font of 200 is huge on my grid maps). Another issue is the scale bar is tiny for the extent map and huge for the grid maps - I need it to fit both scale types. Another issue is if I put in annotations for the extent map to get around labelling - I won't be able to hide it in the grid maps. Also I am unable to hide grids for the extent map (they are too small and I don't want to show them). So ultimately it is an issue of having the same labelling for two map types with different scales on the same mxd - if I could somehow merge the PDFs without losing the layered pdf function I could do this much easier.


Create shape file with point

I am trying to create a .shp file with Point shapes. I am following this tutorial: http://docs.geotools.org/latest/userguide/tutorial/feature/csv2shp.html I create the project, no syntax error and everything is fine. I choose the .csv file and store the generated .shp file. But when I open the .shp file in QGIS I can not see any Point. I Iterate the generated shape file and wrote it to the console I gave this:               SimpleFeatureImpl:location=[SimpleFeatureImpl.Attribute: the_geom<Point id=location.1>=null]     location     SimpleFeatureImpl:location=[SimpleFeatureImpl.Attribute: the_geom<Point id=location.2>=null]     location     SimpleFeatureImpl:location=[SimpleFeatureImpl.Attribute: the_geom<Point id=location.3>=null]     location     SimpleFeatureImpl:location=[SimpleFeatureImpl.Attribute: the_geom<Point id=location.4>=null]     location     SimpleFeatureImpl:location=[SimpleFeatureImpl.Attribute: the_geom<Point id=location.5>=null]     location     SimpleFeatureImpl:location=[SimpleFeatureImpl.Attribute: the_geom<Point id=location.6>=null]     location     SimpleFeatureImpl:location=[SimpleFeatureImpl.Attribute: the_geom<Point id=location.7>=null]     location     SimpleFeatureImpl:location=[SimpleFeatureImpl.Attribute: the_geom<Point id=location.8>=null]     location     SimpleFeatureImpl:location=[SimpleFeatureImpl.Attribute: the_geom<Point id=location.9>=null]     location      I have got another .shp file with Points (my colleague sent this, he created under Qgis). The output is:               SimpleFeatureImpl:pelda=[SimpleFeatureImpl.Attribute: the_geom<Point id=pelda.1>=POINT (772487.8889999986 307764.30050000176)]     pelda     SimpleFeatureImpl:pelda=[SimpleFeatureImpl.Attribute: the_geom<Point id=pelda.2>=POINT (772196.6739999987 307778.6143000014)]     pelda     SimpleFeatureImpl:pelda=[SimpleFeatureImpl.Attribute: the_geom<Point id=pelda.3>=POINT (771960.1587999985 307897.3903999999)]     pelda      Please help. Thanks!


Is it possible to load features into ArcSDE without using ArcObjects?

I have a SDE geodatabase in MS SQL Server, where geometries are stored in MS SQL's native geometry types, rather than the ArcSDE Binary. It seems like it would be relatively easy to create new features in C#, without the use of ArcObjects. I could use one of my favorite Micro-ORMS (Dapper or PetaPoco) in conjunction with the `Microsoft.SqlServer.Types` namespace and load features directly into the database without ArcObjects. I am a novice ArcSDE user, but am quite aware of the rat's nest of stored procedures and other db logic that comes along with ArcSDE, so I am sure its not as easy as I am thinking. I am sure I am not the first person who ever thought about this - so the lack of success stories in this area discourage me a bit. Has anyone ever done this? Are than any compelling reasons why I shouldn't do this?


Should I start a new project using MapGuide OS?

I'm wary of starting a debate based on opinion, so I lifted my title from this question which seems to be doing fine. I'm also worried about offending MapGuide enthusiasts so please understand I am simply trying to avoid unwise strategic decisions. When I try to install, use, develop with, ask questions about, or otherwise entertain MapGuide OS I get the feeling that starting a new project with MapGuide is too risky:   * API documentation has not been updated for years and developers are asked to use 2.0 docs for the 2.2 and 2.4 product   * It took several months from the time 2.2.0 was released for http://mapguide.osgeo.org/ to recognise that 2.1.0 was not the latest stable release, suggesting that no one is actively maintaining the site   * Install documentation is spread wide and thin. I recently spent the best part of a week trying to install on 64-bit linux for use with Oracle and ultimately had to give up (then installed GeoServer in less than one hour)   * Forum threads regularly end unanswered or stumble along with hopeful suggestions only to end with an unanswered question from the OP   * I personally have never managed to get a .NET map viewer up and running due to compile errors that others have reported but had no luck fixing   * It seems like a lot of the effort that goes into MapGuide comes from a very small number of people (especially Jackie Ng) which doesn't bode well should they ever get too busy or lose interest in the project. Someone recently asked a similar question on the MapGuide forum but it took a decidedly ambiguous tone and ended with no clear answer. I appreciate that a lot of work has gone into the project, and also that it provides functionality I can't find elsewhere (this is a big part of the problem I have), as it can provide a complete viewer experience in short order. However in addition to the list above I have other issues:   * Dependency on stateful sessions and associated load balancing considerations   * Requirement for a configuration tool or web service to create opaque configuration files / databases that can't be edited or viewed easily   * PHP web viewer's need for a specific version of PHP which is unlikely to be compatible / ideal for other PHP applications on a shared server   * Distinction between IE and other browsers in the viewers due to ActiveX Yes, I know that this is an Open Source project and so if I think it needs improving I should get involved, but honestly I would much rather donate my time to other projects like GeoServer or OpenLayers as these products have both made my life much easier and have well defined roadmaps.


Raster Attribute Table Where Each Pixel = 1 Row

In ArcGIS, is it possible to create a raster with an associated attribute table where each pixel is represented by a "row" in that table. I would like to specify unique attributes for each raster pixel, rather than for each "Value" of pixels (the default raster attribute table in ArcGIS seems to be one row per "Value" attribute of pixels).


How to publish many MXD files in ArcGIS Server 10.1 automatically?

How to publish many mxd files in ArcGIS Server 10.1 automatically? I have about 60 mxd files and I want to publish them automatically. Is there any way to do this?


update spatial data from excel to ms-sql server 2008

I have 1000's of data with 50's of column. It is point data. The data is in MS-SQL server.Now each day I need to load 100's of data similar in structure. How can I achieve it ? I tried to append table but it was lengthy task. I need to change column type since mapinfo does not properly recognize every field.Also when I change the column it cannot convert some type. **`Is it possible or has anybody done this can of stuff! Is there any solution to this pain?`** I was thinking of doing direct update from excel but before I get started I was wondering advice from experts!!


Counting unique occurrences during Spatial Join?

I have a point shapefile (points.shp) with fields [owner], [name], etc.. [owner] and [name] are both of type string. The owner contains a single string, the unique owner. Name contains a list of names, seperated by ";".               [owner]     [name]        a     ";wood;grass;"        a     ";grass;house;"        a     "house"        b     ";wood;tree;"        b     ";grass;house;"        c     ";tree;"      Now, what I am currently doing is aggregating all points of each unique name- string in [name] by a distance and Spatial Joining those back to count the amount of points containing this string within the Aggregated Polygon. The following script is running in Model Builder.   1. Select all [name] LIKE '%;wood;%'   2. Aggregate Points by distance z = agg_wood.shp   3. Spatial Join agg_wood.shp with points.shp (selection still alive) = adds a field "Join_Count" to agg_wood.shp   4. Select [name] LIKE '%;house;%' etc. The aggregated Polygon Shapes (about 7000) are merged into a final Shapefile. So, my final, merged shapefile will have all counts of [name] occurrences:               shape_wood.shp:     [FID]  [Join_Count]       1         10               2         11               3         2                4         1                5         13               6         4               Finally, I merge all aggregated polygon shapefiles, which works. The point file has something about 800,000 points, about 5,000 unique name strings, and about 20,000 unique owners. My problem is I would like to add a field to agg_wood.shp during the process that sums the number of unique occurrences for the field [owner] for each aggregated polygon. Lets say there are 5,000 points in an area and 500 of those contain "wood" in the list of strings from the field [name]. These are aggregated into one or more polygons. However, there may be 1 up to 500 different owners who generated "wood". I want to add a field [occ_own] with the number of unique owner-strings who added "wood" in the field [name]. So my intermediate output file (agg_wood.shp) would look like this:               shape_wood.shp:     [FID]  [Join_Count]  [Occ_Own]       1         10        1       2         11        1       3         2         2       4         1         1       5         13        13       6         4         1          shape_house.shp:     [FID]  [Join_Count]  [Occ_Own]       1         23        3       2         10        5       3         3         3       4         1         1       5         150       1       6         2         1      Then I would merge all of those to a single shapefile of all [name] polygons. But I can't imagine how to modify my process so it can calculate the number of unique owners for each polygon area and [name]. Does anyone have an idea?


Creating a line from lots of easting/northing co-ordinates

I have hundreds of easting northing points which I need to join as a single line to show a route. How do I import them and get QGIS to automatically turn them into a line?


How to use ET GeoWizard tools or Xtools Pro in ModelBuilder or Python to automate processing?

Is it possible to use ET GeoWizard or XTools Pro tools in automation of mapping in either in ModelBuilder or Python?


ESRI Silverlight Cartography - Looking at whats not there

I have line data that has been symbolozied in ways that I don't have time to understand and would like to make a map that tells me =). My general question is how to display the lack of data results for queries. I have a bunch of layer files that were built with a bunch of def queries in ArcMap. I will iterate over the line data and for each unique line check for results of applying a def query. If results are returned, a new layer file is created representing that query. I want to highlight the queries that didn't return results in a silverlight app. So I have all the queries that returned zero records in a database. I'll be making this map with silverlight but any solid cartography concepts for getting at what's not there are welcome.


GeoJoin with ArcGIS Services

Has anyone seen any ways to dynamically join data in services. E.g. I've already exposed County boundaries in a MapService, now I want to let users join their relative data to this service for their own thematic visualizations.


How to import a raster into PostGIS?

I'm trying to follow the instructions here to load a raster into a PostGIS database:               python raster2pgsql.py -s 4269 -I -r *.tif -F myschema.demelevation -o elev.sql      I understand that I replace `*` with the path to my raster, but I don't understand the part `myschema.demelevation` or `elev.sql`. Should I have my own schema for this file? And what does the `elev.sql` part mean? I also read through the gdal PostGIS raster driver to try and understand this with more examples. Similarly, they suggest loading a raster `katrina`               python raster2pgsql.py -r /path/to/katrina.tif -t katrina -l 1 -k 64x64 -o katrina.sql -s 4326 -I -M      Using my current setup, I tried loading the `katrina` raster in:                   python2.6 ~/src/postgis-2.0.0SVN/raster/scripts/python/raster2pgsql.py -r ~/tmp/katrina.tif -t katrina -l 1 -k 64x64 -o katrina.sql -s 4326 -I -M      However, I got the following errors:               Traceback (most recent call last):       File "/home/src/postgis-2.0.0SVN/raster/scripts/python/raster2pgsql.py", line 34, in <module>         from osgeo import gdal       File "/home/lib/python2.6/GDAL-1.8.1-py2.6-linux-i686.egg/osgeo/__init__.py", line 21, in <module>         _gdal = swig_import_helper()       File "/home/lib/python2.6/GDAL-1.8.1-py2.6-linux-i686.egg/osgeo/__init__.py", line 17, in swig_import_helper         _mod = imp.load_module('_gdal', fp, pathname, description)     ImportError: /home/lib/python2.6/GDAL-1.8.1-py2.6-linux-i686.egg/osgeo/_gdal.so: undefined symbol: GDALSetRasterUnitType      I don't fully understand these errors mean; when I compiled `gdal` should I have specified an argument for `GDALSetRasterUnitType` ? More generally, I'm having difficulty understanding why I am not specifying the database that I am trying to load this data into. * * * After following MerseViking's advice I ran:               python /usr/lib/postgresql/8.4/bin/raster2pgsql.py -r /home/celenius/Downloads/katrina.tif -t katrina -l 1 -k 64x64 -o katrina.sql -s 4326 -I -M      which returned the following output:               ------------------------------------------------------------      Summary of GDAL to PostGIS Raster processing:     ------------------------------------------------------------     Number of processed raster files: 1 (/home/celenius/Downloads/katrina.tif)     List of generated tables (number of tiles):     1   katrina (256)      Then I ran:               psql -d test -f katrina.sql - U postgres -W      which returned the following:                   addrastercolumn                                                                                --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------      public.katrina.rast srid:4326 pixel_types:{8BUI,8BUI,8BUI} out_db:false regular_blocking:true nodata_values:NULL scale_x:'0.029325513196481' scale_y:'-0.029325513196481' blocksize_x:'64' blocksize_y:'64' extent:POLYGON((-100.014662756598 9.98533724340176,-100.014662756598 40.0146627565982,-69.9853372434018 40.0146627565982,-69.9853372434018 9.98533724340176,-100.014662756598 9.98533724340176))     (1 row)          (END)      This message and a blinking cursor appear on screen. I assume that it is loading into the database, but I'm not sure. The `tif` file is just 3MB - I had assumed that it would not take long to load a file of this size but the blinking cursor has already been on the screen for ~1 hour. Has this crashed or do I just need to wait a long time? I have 4GB of RAM and a dual-processor of 2.5 GHz.


How to get a Layer as ILayer (ArcObjects)

I had asked this question previously which I think will work. But as I am new to this, I can't figure out how to get a Layer as an ILayer object to pass to the method that's in my previous questions answer. I have been playing with the Mark Cederholm's 'Snippets.py' that uses comtypes to drive ArcObjects. That works well, but I don't know enough to venture far from the examples given. It first gets an IMxApplication object, and I can't figure out how to get a Layer file as an ILayer from this object so that I can use the script I was shown in my previous question. In the end I want to be able to change the Display Expression of some Table Views, and be able to grab them by their name in the TOC. Note: If you know how to do this with C# or VBA, I can figure it out in Python Update: Here is the answer in Python which relies on Mark Cederholm's Snippets.py and comtypes:               from Snippets import *     GetDesktopModules()     import comtypes.gen.esriCarto as esriCarto     import comtypes.gen.esriArcMapUI as esriArcMapUI     InitStandalone()     pApp = GetApp()     pMxDoc = CType(pApp.Document, esriArcMapUI.IMxDocument)     pFeatureLayer = CType(pMxDoc.FocusMap.Layer(0), esriCarto.IFeatureLayer)


How to send long JSON objects (polygon geometry, table rows) in POST request to Geoprocessing Service?

I am seeking to understand my options for sending long JSON objects in a request to a Geoprocessing Service. In particular, I am looking for some example code to illustrate how to include two long JSON objects (one a polygon geometry as a coordinate string, the other a table as rows of ASCII text with the first row being the column headings) into a POST request to my Geoprocessing Service, and then hints as to how best to read them as parameters in the Python script that I've published as my Geoprocessing Service. At http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/gettingstarted.html it says: > When using the REST API, you will normally use an HTML GET method in a form. > When you use GET, the entire request is encoded in the URL. This is the > preferred method to use whenever possible. However, in this mode, a URL is > limited to as few as 1024 characters depending on the browser. Thus, if you > have a long JSON object to include in the request, you will need to use > POST. > > A second option, when using certain Geometry Service and Geoprocessing > Service operations, is to continue to use GET and to specify a URL to the > input JSON object contained in a file on a public server. I'm familiar with using a GET method when the parameters can all fit into a URL that I can paste into a browser. I'm also comfortable with the idea of using GET to specify a URL to input JSON objects that are contained in files on a public server. However, I am prevented from using this method this because my client does not want files placed on a public server. That leaves me with having two long JSON objects to include in the request and having to use POST which is a method beyond my current level of understanding. If no example code is readily available, then any hints on how to do this will be greatly appreciated.


Legend Limiter will not install to my ArcView 10 - any suggestions?

In an older version of ArcView, I had an add-on called Legend Limiter for my software. It would limit the legend categories to ONLY those shown in your map extent. Say for example, I have a Geology shapefile containing over 100 categories of Geology, but the extent I'm showing on my map only includes 15 categories, this tool will limit my legend to reflect ONLY the categories in my map extent. It is a great little time saver. I installed the version found HERE. When I try to run the .exe file however, I get the prompt shown below: ![Error Message](http://i.stack.imgur.com/KpPah.jpg) I tried googling the error message number, and the information does not resolve my issue. I did find a fix for the newer ArcView HERE. I follow the instructions from the forum to the letter, and when I add the .dll file, it's not recognized (prompt below). ![enter image description here](http://i.stack.imgur.com/VJhmx.jpg) I am officially out of ideas. I just can't get it to work. Any suggestions would be greatly appreciated. Thanks all.


GDAL - creating vector from raster

[SOLVED] Good day! I'm looking at either gdal_contour or gdal_polygonize.py to create a vector layer file from a raster file. I can create the vector file using either method, but it's upside down when I plot it using QGIS. Another list indicated this has to do with the world file. I use gdal_translate and gdalwarp when transforming the orginal raster in lambert conformal to spherical mercator (for use in OpenLayers) and understand that the world file could be created using one of those utilities (probably when using gdalwarp). However, I'm really unsure after that about the next step using either of the raster to vector utilities where the world file comes into play. Do I have to also use ogr2ogr as well? I'd appreciate a detailed list of steps as the GDAL documentation is a bit fuzzy here. Just to note my current steps are:   1. Use gdal_translate to first geo reference the original raster in lambert conformal   2. Use gdalwarp to reproject the resulting raster image to spherical mercator   3. Use gdal_translate to create a PNG at a reduced size. Becomes an Image Layer in OpenLayers.   4. Use either raster to vector utility on the raster produced in step 3. I see where -co for the world file can be included in gdal_translate or gdalwarp. And like I said, I can create the vector file once the original raster has been warped to spherical mercator. Really just unclear here how the world file comes into play for the resulting vector file in step 4 so the image will be rightside up. Thanks for any help! [ **SOLVED** ] As Matthew asked and then I commented on, I apparently was confused about the world file creation and in which step to do that in. But, addding `-co WORLDFILE=YES` in step 3 above created a .wld file for the resulting PNG image. Then used **gdal_contour** creating a shapefile and also gml, brought both into QGIS to view, and they're now rightside up! Thanks all who viewed and Matthew who commented!


arcgis server 10, vb.net add reference problems

i am using 'arcgis server 10' and 'visual web developer 2010 express'. now, i opened a 'web mapping application' then wanted to 'add a reference' to 'esri arcmap object library 10.0' it says:                A reference to 'ESRI ArcMap Object Library 10.0' could not be added.      Converting the type library to a .NET assembly failed. No process is      associated with this object.      it said the same for 'esri 3danalyst object library 10.0', 'esri geoanalyst object library 10.0', 'esri geostatisticalanalyst object library 10.0', 'esri spatialanalyst object library 10.0'... but for this one it says:                A reference to 'ESRI Display Object Library 10.0' could not be added.          Converting the type library to a .NET assembly failed. The type library      importer encountered an error during type verification. Try importing      without class members.      i tried this with target .net frameworks 3.5 and 4.0. plz can you explain how can i add these references successfully? thanks!


Best way to visualize the PostGIS Raster in OpenLayers

I have been stuck by this problem for a long time. Several ways have already been tried, but none of them works as I was expecting. Here are the description of each of these method as well as the problem I am facing. I want to know which is the best option to follow on because I am getting confused now. Thanks.   * Method 1: (GDAL + OpenLayers.Layer.Image); Convert the PostGIS raster to a tif file first using gdal_translate, and then translate this tif file to image (PNG) file. (Because it is faster than convert it directly from PostGIS to PNG). Then, load this image to Openlayers.   * Problems: Don't know how to make it colorful. Because the default iamge is in gray color. Don't know how to add a color table to this. ![Real Result](http://i.stack.imgur.com/AUmdk.png)![Expected Result](http://i.stack.imgur.com/GCaxf.png)   * Method 2: (MapServer + OpenLayers.Layer.WMS): Already get it work in a visual server with 2GB ram. But the problem is the speed. It takes long time to load the data on the map compared with load it as a image file.  Is that the problem with our virtual server or how the way we set up the MapServer?   * Method 3: GeoServer + Openlayers.Layer.WMS:  Cannot get it work yet. Because I don't know how to connect it with PostGIS raster. On the previous Post, it seems we have to connect it to JDBC. But I didn't know someone has ever made it work or not. Waiting for the help. Thanks.


How to set layer symbol and layer name side by side in QGIS Composer?

When I add a legend in QGIS Composer, the layer symbols are set below each layer name. Is there any way to have them side by side? This is what I get: "LayerName" [layer name] ~ [layer symbol] This is what I need: ~ "LayerName"


Shapefile projection issue - layers not lining up

See below for screenshot. The purple rectangle should line up with the green rectangle in the top right (OpenLayers Google Physical layer) and the tan points. I was sent this shp and given the projection information in addition to the included prj, but can't seem to get these to line up after exporting to EPSG:3857. I tried entering the original projection information manually as a custom CRS (http://gis.stackexchange.com/a/55197/8987), then exporting as EPSG:3857, but that didn't seem to work either. What am I doing wrong / how can I get these to line up? I need to export to reproject, right? On the fly is enabled, should it be? Here is whats in the original prj file, what information was sent to me, and what I entered in as a custom CRS. PROJCS["NAD_1927_Lambert_Conformal_Conic",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]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",2999994.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-89.5],PARAMETER["Standard_Parallel_1",33.0],PARAMETER["Standard_Parallel_2",45.0],PARAMETER["Latitude_Of_Origin",33.0],UNIT["Foot_US",0.3048006096012192]] Datum: NAD 27 Spheroid: Clarke 1866 Central Meridian: -89.5 Reference Latitude: 33 Standard Parallel 1: 33 Standard Parallel 2: 45 False Easting: 2999994.0 False Northing: 0 Units: Feet +proj=lcc +lat_1=33 +lat_2=45 +lat_0=33 +lon_0=-89.5 +x_0=914400 +y_0=0 +datum=NAD27 +units=us-ft +no_defs ![layers do not line up](http://i.stack.imgur.com/dZOLo.png) **EDIT:** The data was resent to me reprojected and it now lines up.               <metadata xml:lang="en">     <Esri>     <CreaDate>20130826</CreaDate>     <CreaTime>11391400</CreaTime>     <ArcGISFormat>1.0</ArcGISFormat>     <SyncOnce>TRUE</SyncOnce>     <DataProperties>     <lineage>     <Process ToolSource="c:\program files\arcgis\desktop10.1\ArcToolbox\Toolboxes\Data Management Tools.tbx\DefineProjection" Date="20130716" Time="150151">     DefineProjection july2013_inpc PROJCS['NAD_1927_Lambert_Conformal_Conic',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]],PROJECTION['Lambert_Conformal_Conic'],PARAMETER['False_Easting',2999994.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',-89.5],PARAMETER['Standard_Parallel_1',33.0],PARAMETER['Standard_Parallel_2',45.0],PARAMETER['Latitude_Of_Origin',33.0],UNIT['Foot_US',0.3048006096012192]]     </Process>     <Process ToolSource="c:\program files\arcgis\desktop10.1\ArcToolbox\Toolboxes\Data Management Tools.tbx\Project" Date="20130826" Time="113914">     Project test_inpcdata C:\data\InfoReq2013\test_inpcdata_reproj.shp GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433],METADATA['World',-180.0,-90.0,180.0,90.0,0.0,0.0174532925199433,0.0,1262]] 'NAD_1927_To_NAD_1983_NADCON + WGS_1984_(ITRF00)_To_NAD_1983' PROJCS['NAD_1927_Lambert_Conformal_Conic',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]],PROJECTION['Lambert_Conformal_Conic'],PARAMETER['False_Easting',2999994.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',-89.5],PARAMETER['Standard_Parallel_1',33.0],PARAMETER['Standard_Parallel_2',45.0],PARAMETER['Latitude_Of_Origin',33.0],UNIT['Foot_US',0.3048006096012192]]     </Process>     </lineage>     </DataProperties>     </Esri>     </metadata>


Need to put points on overlapping boundaries

I have two layers: a route (Line) and a county boundary (polygon). I need to intersect them so that the output layer is a point layer. The ArcGIS **Intersect** tool places a point where the route passes the county boundary. But there are some locations where the route goes along the county boundary and then enters the boundary polygon. In such a case, ArcGIS fails to place any intersection point. Is it possible to place two intersection points in such cases, one where the common segment starts and the other where the common section ends? Thanks a lot for your help.


What is topojson and how is it different than geojson?

This is a conceptual question. What are the differences between these? and what are the pros and cons of these formats?


How can I do spatial queries in client side?

My current project is **Map visualization**. In this application I am taking the Input as JSONArray/CSV file and the outputs are Heat Map, pin Map, Thematic Map etc.. So, here I am using postGIS for only to store boundaries(like state/county/city..). Also the data from the user will remain in his place, that means I am not storing the user input data in database. How can I do some spatial queries/functions in **client side**? ie, functions like st_buffer, st_intersect, st_contains, st_distance, st_equals, st_ boundary etc.... I am using Openlayers 2.11, Geoserver, postGIS


qgis2 - hide a layer (or its labels) when another layer is coincident?

I have two road layers - one is a subset of the other, so, there's a lot of overlap. When they are coincident, I see labels from both layers. ![enter image description here](http://i.stack.imgur.com/O8hxy.png) The 'lower' layer is the thin line road in the SW corner; the 'upper' layer is the thicker line road with black edges. One of the 'Ridge Rd' labels is from the upper layer, one is from the lower layer. Ultimately I'd like to get rid of this resulting 'double label' effect. Is there a way to suppress labels from the lower layer when it is coincident with an object from the upper layer? Is the best way to do this by keeping them on the same single layer and just do a rule-based or categorized style, to avoid this whole multi-layer issue? That would have other side-effects though I haven't explored the option yet. Thanks in advance


gdal_grid has some problem with reading vrt file

I am using gdal_grid module(from gdal 1.10) and it has some problem with reading the vrt file. I checked this link but it does not work. gdal_grid problem reading vrt file The command is > ./gdal_grid -l grid grid.vrt newgrid.tif The Error Message is > Unable to open input datasource "grid.vrt". The vrt file is like following               <ORGVRTDataSource>         <OGRVRTLayer name="grid">             <SrcDataSource>grid.csv</SrcDataSource>             <GeometryType>wkbPoint</GeometryType>             <LayerSRS>WGS84</LayerSRS>             <GeometryField encoding="PointFromColumns" x="x" y="y" z="z"/>         </OGRVRTLayer>     </OGRVRTDataSource>      The csv file is like following               x,y,z     565650,5121960,1048     565680,5121960,1043     565710,5121960,1039     565740,5121960,1038     565770,5121960,1036     565800,5121960,1024      Thanks.


Import error when utilizing QGIS's Python Init function

Based on the answer to Referencing Qt UIs external to plugin with python. I'm trying to utilize the "Layer Properties / Fields / Python Init function" to execute a file (test_file.py) that is located in the folder of the plugin that I'm making. I've made sure that the path to my plugin folder is in PYTHONPATH via "Settings / Options... / System / Environment" ... and restarted QGIS. When the layer, for which I'm utilizing Init function, is initialized and a feature is selected test.py is executed. However, I get three consecutive error messages saying:               1) An error occured during execution of following code:           import test_file           Traceback (most recent call last):             File "", line 1, in              File "C:/PROGRA~1/QGISVA~1/apps/qgis/./python\qgis\utils.py", line 453, in _import               mod = _builtin_import(name, globals, locals, fromlist, level)           ImportError: No module named test_file          2) An error occured during execution of following code:           if hasattr(test_file,'DEBUGMODE') and test_file.DEBUGMODE:    reload(test_file)           Traceback (most recent call last):             File "", line 1, in            NameError: name 'test_file' is not defined               3) An error occured during execution of following code:           _qgis_feature_form_20140526104937007 = test_file.py(_qgis_featureform_2, _qgis_layer_workgroups20140526104723778, _qgis_feature_20140526104937007)           Traceback (most recent call last):             File "", line 1, in            NameError: name 'test_file' is not defined      Any suggestions how to fix this?


QGIS Python API: SAGA difference algorithm does not split parts

I am using the QGIS Python API in an external script (platform: ubuntu). Everything works as expected. But when I am using the SAGA difference algorithm within the script, there is an issue. The geometry is calculated perfectly right, but when using the option "split parts" it seems, that this option is ignored. Here the help output:               processing.alghelp('saga:difference')     ALGORITHM: Difference         A <ParameterVector>         B <ParameterVector>         SPLIT <ParameterBoolean>         RESULT <OutputVector>      Here my syntax:               processing.runalg('saga:difference', layer1, layer2, 1, output)      When I do the operation with the same data within QGIS' processing toolbox and the GUI for that algorithm, everything works and the parts are split. Am I missing something here? Does anybody else have that issue?