What is causing syntax error in arcpy NetCDF Raster script

I'm trying to save the raster layer in the stand-alone python GUI but I keep getting a syntax error. I'm using the code from Save To Layer File (Data Management). And the error that shows up is: the LA MESA part of below:               in_features = "spain_1901_1.shp"     out_layer0 = "spain_1901_1"     where_clause = '"NAME" = 'LA MESA''     workspace = "C:/output"      now I've replaced their fill in things from the website with what I need but I keep getting an error saying that LA MESA isn't the correct syntax even when I replace it with my own name. please help! EDIT: Here's the entire code:               #MAKE RASTER FILE     # Import system modules     import arcpy               # Set local variables     inNetCDFFile = "C:/Users/ESS/Desktop/temp/tmpy1901m01.nc"     variable = "tmp"     XDimension = "lon"     YDimension = "lat"     outRasterLayer = "C:/Users/ESS/Desktop/out/spain_1901_1.shp"     bandDimmension = ""     dimensionValues = ""     valueSelectionMethod = ""          # Execute MakeNetCDFRasterLayer     arcpy.MakeNetCDFRasterLayer_md(inNetCDFFile, variable, XDimension, YDimension, outRasterLayer, bandDimmension, dimensionValues, valueSelectionMethod)          #SAVE IT!!!!!!     # Name: SaveToLayerFile_Example2.py     # Description: Saves an inMemory layer to a file on disk     # Author: ESRI          # Import system modules     import arcpy     from arcpy import env          # Set workspace     env.workspace = "C:/Users/ESS/Desktop/out"          # Set local variables     in_layer = "spain_1901_1"     out_layer = "spain_1901_1.lyr"          #MakeFeatureLayer variables     in_features = "spain_1901_1.shp"     out_layer0 = "spain_1901_1"     where_clause = '"NAME" = \'LA MESA\''     workspace = "C:/Users/ESS/Desktop/out"          try:         # Execute MakeFeatureLayer         arcpy.MakeFeatureLayer_management(in_features, out_layer0, where_clause, workspace)              # Execute SaveToLayerFile         arcpy.SaveToLayerFile_management(in_layer, out_layer, "ABSOLUTE")     except:         print arcpy.GetMessages()          ##THE CALCULATIONS       # Import system modules     import arcpy     from arcpy import env     from arcpy.sa import *          # Set environment settings     env.workspace = "C:/Users/ESS/Desktop/out"          # Set local variables     inZoneData = "es2001.shp"     zoneField = "FIDS"     inValueRaster = "spain_1901_1"     outTable = "spain_1901_1_data.dbf"               # Check out the ArcGIS Spatial Analyst extension license     arcpy.CheckOutExtension("Spatial")          # Execute ZonalStatisticsAsTable     outZSaT = ZonalStatisticsAsTable(inZoneData, zoneField, inValueRaster,                                       outTable, "NODATA", "ALL")


dermacation label

i have 3 different features which are   1. country.shp,   2. division.shp    3. district.shp what should i do if i want to make the label is arrange like figure 1 because when i label all the features using maplex, the label was placed at the center at each polygon like figure 2. Is there any ways or scripting that can i apply to make sure the district label is located below the division label and division label located below the country label. ![enter image description here](http://i.stack.imgur.com/jppzJ.jpg) ![enter image description here](http://i.stack.imgur.com/iBYRW.jpg)


Attachments not saving in an Enterprise Geodatabase

I have an ArcGIS Server 10.2.2 feature service. The feature classes are saved in a SQL Server 2012 Enterprise Geodatabase. The feature classes have attachments enabled. They are non-versioned and have archiving enabled to allow syncing and offline editing. I've added the feature service to ArcGIS Online. I can edit the feature classes and add attachments with no errors. But when I close the editor window and then identify the feature it says 'No Attachments Found'. When I look at the geodatabase on the server there is a record in the __ATTACH table but when I Identify a feature it doesn't show any attachments. Has anyone successfully setup attachments on a 10.2.2 feature service in an Enterprise Geodatabase?


Leaflet JS - Polyline and getPopup

I would like to get the popup that was bound to a polyline but it seems that unlike marler objects, polyline do not have such method. Any suggestion ? Also, it seems that the 'popupopen' event is never fired on a polyline, is that a bug or dia I miss something?


Statistics: Estimating U.S. population-weighted average temperature from 100+ daily airport station measurements

I have recently signed up for a developer's key for the Census API (http://www.census.gov/developers/) and will be using a Python wrapper class to access the Census database. My goal is to find the population weighted average temperature for daily temperature and forecast temperature for the U.S. and possibly certain regions (north, west, east, etc.) I also have access to a data feed for the daily average temperatures & forecasts from 100+ airport stations distributed across the U.S. (These stations are largely representative of the U.S population since they are located in major cities). With minimal assumptions, what would be the best way to map the entire population of the United States onto the set of 100+ airports, so that I may derive a population weighted average temperature? This would probably entail some kind of distance/climate function. What are some nuances I should consider when doing this? Someone has suggested that I may consider using a Voronoi tessellation built on zip code regions.


Import QGIS Python modules in Python command line or standalone script

I am running a Windows 7 machine with Python version 2.7.8 (32 bit). I installed QGIS 2.4 (Chugiak) from OSGeo4W and simply want to be able to import the QGIS Python modules (e.g. qgis.core) into the previously installed Python, in much the same way one can do so with arcpy. I have Googled and set various folders in my PATH and PYTHONPATH environment variables but nothing seems to be able to let me say:               import qgis.core      I just get the ol' module not found error. Has anyone else had success? Thanks.


Is there a tool to add "noise" to overlapping X, Y coordinates so they are no longer in the EXACT same place?

I have a series of points representing animal observations. Many of them overlap, having the exact same coordinates, and this is causing me trouble when I want to run some analytical tools which requite no identical points. I was wondering if there's any tool that can add some "noise" to the coordinates, that's to say, adding some random decimal values at the end in order to obtain slightly different coordinates which are still close enough in space so as to not really modify the observation. I've heard about such a tool, but I can't find it, at least in ArcGis 10. Maybe there's another software that can do it? Thanks!


Meaning of Spatial Join ERROR 000840: The value is not a Feature Layer?

I'm using ArcGIS (ArcMap) 10.2 to determine the relative location of points of land to a regulated area. I downloaded a layer (.lyr) file that displays the regulated area, and am able to display that information with my data. However, I am unable to use the data in (or referenced by) the downloaded layer... i.e. I cannot use Spatial Join ("ERROR 000840: The value is not a Feature Layer"). To try to determine what was happening, I attempted to "Open Attribute Table" to look at the specific features, but the "Open Attribute Table" command was not visible. That is, when I right-click the layer name in the table of contents, I don't have the normal options I do for features. Thus, it seem I am unable to use this layer as I would a normal feature set. Why is this, and how can I still use this data? FYI: I'm a relative novice at ArcGIS, so perhaps there are fundamental issues I'm not getting? A screenshot of right before the error, and another right after the error


How do I change the order layers are displayed in in MMQGIS?

I am dealing with hundreds of different layers, all of which have one of 6 names - not by choice, that's just the way they show up when I import them. I am trying to merge all those with the same name using MMQGIS>Combine>Merge Layers, but the layers are listed in a random order in the Merge Layers window so I cannot block off the layers I want to select using shift-arrow. The order the layers are displayed in is different to the order in the layers panel. I can press control & click to select different layers, but this is very time consuming and if I make a mistake all the previous selections disappear and I'm back to square one. How can I change the order the layers are displayed in? Click and drag would take forever. Alphabetical order would solve my problem.


Creating PostGIS Geodatabase features in QGIS defaults to ST_Geometry

I have a PostGIS database that uses the PG_Geometry stored in a shape field. This same database is a registered ArcGIS geodatabase. I am able to edit and create features in ArcGIS. I can connect, view and edit attribute data in QGIS, but when I try to create new features I get the error shown below. Ironically it seems that QGIS attempts to use ST_Geometry when writing the data even though the data are stored as PG_Geometry. I am looking for the setting in QGIS that will allow me to write the geometry data using PG_Geometry. Any help is much appreciated. Could not commit changes to layer drp_occurrence Errors: ERROR: 1 feature(s) not added. Provider errors: PostGIS error while adding features: ERROR: column "shape" is of type geometry but expression is of type st_geometry LINE 1: ...atex","dgupdatey","catalognumbernumeric") VALUES (st_geomfro... ^ HINT: You will need to rewrite or cast the expression.


Programmatically download (seamless) NED tiles?

I used to download 1/3 arcsecond elevation geotiffs from extract.cr.usgs.gov using web services. But a few days ago, that stopped working, probably because USGS reorganized their site. I tried emailing USGS and haven't heard back yet. I could, of course, manually download states or degree tiles using the seamless server, but I want to do it programmatically so that users of my trip planner can get elevation data for their region without human intervention. And SRTM isn't high enough resolution for bicycle/wheelchair trip planning. Any ideas?


ArcGIS 10.1 Anyway to make a script tool run immediatly upon opening

I have a script tool that creates an ArcSDE connection folder and copies data from the server to a new folder on the users computer. The tool has no parameters runs fine but when you open the tool it gives the default "this tool has no parameters" interface the user then presses ok and the tool runs. Is there anyway(perhaps with toolvalidator) to just run the script when the tool is opened without this pop-up? ![enter image description here](http://i.stack.imgur.com/HaZFr.png)


Convert from Mercator to transverse Mercator projection in C++?

I'm writing code to import images from a WMS server into some software. However, the software expects the images to be in transverse Mercator, but the WMS server provides it in Mercator. This ends up with images that look like this: http://i.stack.imgur.com/faPzE.png http://i.stack.imgur.com/8bl4n.png Is there some way to transform the image from Mercator to transverse Mercator, assuming I know the EPSG and bounding box of the image?


How to create a dynamic distance calculator for selected line feature classes?

My situation: I am relatively new to GIS so forgive me if this is a stupid question. I am working on a project at a park that I am interning at where the goal is to create a single feature with roads and trails together with some way to show the total distance of selected roads and trails. Currently I have merged the roads and trails features, so I have a single feature with both which contains separate fields with their respective distances. In its current form I could simply add distances manually from selected trail and road intersections, but I was interested in automating a process to show this. I was thinking some kind of model (made in ArcGIS model builder) that when run would return an output table of the summed distance of currently selected features. Question: 1) How can I tell ArcGIS model builder to perform calculations on just selected features? 2) Is there a better way to accomplish the above mentioned task? Thank you for any input.


Schema locking logistics on ArcSDE for SQL Server?

I have a set of feature classes that I want to be able to edit schema or what ever I want to do in the heat of the battle and I don't want to be stiffled by schema locks. I have a interpretable requirement to have all analysis done in the db. I have them outside of any feature dataset but I guess that there may be schema locks for any client hooked to the geodb. Is the answer to house this in a feature dataset? Or are there other alternatives?


Python GDAL/OGR: retrieved feature is NoneType

I'm doing some scripts in Python to deal with shapefiles, and I have an issue I don't understand. I'm looping over a shapefile, and I want to retrieve the geometry of each feature, but very often I get an error saying:                   pointGeo = pointFeat.GetGeometryRef()     AttributeError: 'NoneType' object has no attribute 'GetGeometryRef'      Here's the way I did it:                       for j in range(pointsLayer.GetFeatureCount()):                     pointFeat = pointsLayer.GetNextFeature()                     pointGeo = pointFeat.GetGeometryRef()                     if pointGeo.Within(whatever):                         ...      I don't think my shapefile is corrupted or damaged, as I tried with several... and I often get this error, but for some features I don't get it.   Any idea how to solve this? Thanks


Convert a Tif raster file to vector shp file in QGIS

So I've been trying to convert a georeferenced Tif raster file into a vector shp file using QGIS. It's seems to complete this but it ends up giving me a feature class that has over 500,000 features, almost like it's creating a row per pixel. So with that many features it's very hard to work with and when I do finally get it to Classify like into 8 classes of natural breaks, it doesn't look like the original tif file. My end goal is to only have a few (less than 20) polygons based off the raster not thousands. Could it be that the Tif file I'm using is already pre-processed or something?


How to get exact ISymbol image size in pixels

I found the next code to convert ISymbol into bitmap image, but how to know the suitable image size? (suppose we have a ITextSymbol)               private static Image PointSymbolToImage(ISymbol symbol, Size imageSize)     {         double x = imageSize.Width / 2;         double y = (imageSize.Height - 1) / 2;              IPoint point = new PointClass();         point.PutCoords(x, y);              Bitmap bmp = new Bitmap(imageSize.Width, imageSize.Height);         Graphics g = Graphics.FromImage(bmp);              symbol.SetupDC(g.GetHdc().ToInt32(), null);         try { symbol.Draw(point); }         catch { }         symbol.ResetDC();              g.Dispose();              return (Image)bmp;     }      * * * For more details: I used QueryBoundary but the dimensions returned after transforming to screen coordinates were wrong. Next is my code: Here symbol is ITextSymbol and (x, y) are the lat, lon coordinates of the symbol.               IPolygon boundary = new PolygonClass();     boundary.SetEmpty();          IDisplay screenDisplay = axMapControl1.ActiveView.ScreenDisplay as IDisplay;     IDisplayTransformation displayTransformation = screenDisplay.DisplayTransformation;     IPoint point = new PointClass();     point.PutCoords(x, y);          symbol.QueryBoundary(screenDisplay.hDC, displayTransformation, point, boundary);          IPoint mapPoint = new PointClass();          int minX, minY;     mapPoint.PutCoords(boundary.Envelope.XMin, boundary.Envelope.YMin);     displayTransformation.FromMapPoint(mapPoint, out minX, out minY);          int maxX, maxY;     mapPoint.PutCoords(boundary.Envelope.XMax, boundary.Envelope.YMax);     displayTransformation.FromMapPoint(mapPoint, out maxX, out maxY);


Mass Geocoding Requests for Germany

To say it upfront: This is a question that has already come up before in the GIS Section but did not provide a manageable and legal solution for my problem (see below). I have a database (in STATA format) of around **1,3 million addresses in Germany** with street name, house number, zip code and city stored separately in different variables. For each of those I need the longitude and latitude which I then want to store in a (local) database and use later on in a statistical analysis (in the context of a research project). Note that this is a one-time request for each of those addresses! Essentially, this poses four requirements on the service to be used:   1. It needs to cover Germany (in particular its rural areas)   2. It needs to be _sufficiently exact_ , i.e. I am willing to take the imprecision of around 100m relative to the object placed at the corresponding address, preferably less of course   3. My usage needs to comply with the terms of services   4. It should be for free or the price should be reasonable / It should take a reasonable time to obtain the data (<= 4 weeks) Before I look into licenses for commercial usage, I want to get an overview of free / reasonable priced services. Seen against this background, the third condition seems to rule out the big players like Google and Yahoo since they do not allow to store the data (see also discussion in GIS Stackexchange). I checked with an employee of Google Germany who claimed they would charge 10,000 EUR (which appears to be way too high, though). Do any services come to your mind that suit those requirements? If so, do program codes exists to collect and store the data? I'd be very grateful if you can help me out, thank you! Note: I have also raised this question in the general StackExchange Q&A Section where it was put on hold. Since I did not find restrictions for this kind of "preference question" for the GIS Q&A section, I am posting it here. I am sorry if I am mistaken.


QgsComposerArrow

>>> QgsComposerShape     <class 'qgis.core.QgsComposerShape'>     >>> QgsComposerLabel     <class 'qgis.core.QgsComposerLabel'>     >>> QgsComposerLegend     <class 'qgis.core.QgsComposerLegend'>     >>> QgsComposerMap     <class 'qgis.core.QgsComposerMap'>     >>> QgsComposerPicture     <class 'qgis.core.QgsComposerPicture'>     >>> QgsComposerScaleBar     <class 'qgis.core.QgsComposerScaleBar'>     **>>> QgsComposerArrow     Traceback (most recent call last):       File "<input>", line 1, in <module>     NameError: name 'QgsComposerArrow' is not defined**      I need to create a line in composer window from plugin. But there is no definition.


Image Layers is showing on map using OpenLayers but how can I change it as base layer

I have created one code to display an image layer on my map using open layer, I am using following code               tiled = new OpenLayers.Layer.WMS(                     "layername", "domainname/geoserver/workspace/wms",                     {                         LAYERS: 'layername',                         STYLES: '',                         format: 'image/png',                         tiled: true,                         transparent: "true",                         tilesOrigin : map.maxExtent.left + ',' + map.maxExtent.bottom                     },                     {                         buffer: 0,                         displayOutsideMaxExtent: true,                         isBaseLayer: false,                         yx : {'EPSG:900913' : true}                     }                  );                 map.addLayer(tiled);      My Complete code is:               function init() {         map = new OpenLayers.Map('mapdiv');         var mapnik = new OpenLayers.Layer.OSM();         var zoom = 15;         map.addLayer(mapnik);         map.setCenter(new OpenLayers.LonLat(151.1522771, -33.7288868).transform(new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:900913")), zoom);         tiled = new OpenLayers.Layer.WMS("layername", "url", {                 LAYERS : 'layername',                 STYLES : '',                 format : 'image/png',                 tiled : true,                 transparent : "true",                 tilesOrigin : map.maxExtent.left + ',' + map.maxExtent.bottom             }, {                 buffer : 0,                 displayOutsideMaxExtent : true,                 isBaseLayer : true,                 yx : {                     'EPSG:900913' : true                 }             });         map.addLayer(tiled);     }


Any known WMS/WFS providers?

I searched on Google, found few things, aren't there many of them?


When using OpenLayers plugins maps, can I have Longitude/Lattitude labelled on my grid when using the Map composer in QGIS?

Using OpenLayers plugins maps, can I have Longitude/Latitude labelled on my grid when using the Map composer in QGIS?


Need help: Sorting elements of a combo box in ArcGIS Java script API (ver. 2.8)

I am using sorting elements in combo box in ArcGIS Java Script API (v.2.8) & for sorting I am using “ fetchProperties="{sort:[{attribute:'name', descending:false}]}". All entries in combo box are sorting excluding “ALL” entry. So I am not able to understand that why “ALL” is not sorting ascending. It is displaying at the end but when make “descending: true” then its displaying first. I want to put “ALL” in the beginning of the combo-box. Therefore, any help will be great. Please check the screenshot below: enter image description here![As you can see all elements are sorting but the "ALL" entry is not sorting](http://i.stack.imgur.com/cT9vW.png) Image : Code is :                 //combo box item       function populateList(results) {         //Populate the dropdown list box with unique values         //alert("sss:  "+results.length);         var zone;         var values = [];         var testVals={};              //Add option to display all zoning types to the dropdown list          //values.push({name:"ALL"})              var features = results.features;         //values.push({name:'ALL'});         dojo.forEach (features, function(feature) {           zone = feature.attributes.TOPIC;                if (!testVals[zone]) {             testVals[zone] = true;             values.push({name:zone});                }         });              var dataItems = {                identifier: 'name',                label: 'name',                items: values         };         var store = new dojo.data.ItemFileReadStore({data:dataItems});         dijit.byId("mySelect").store = store;         values.push({name:"ALL"})       }


Splitting worldwide roads into multiple road datasets with less than threshold number of features?

I want to split a worldwide 'road dataset' into multiple grids/blocks-extents, depending on the amount of features resides in that block-extent. If the amount of features(inside that block) is still above the count of features I want, then it must split the first block into too pieces and so on..., until it has the right amount of features inside that block-extent before I can use an function like PolygonToRaster and after that the mosaic function. I came up with this route/possible solution, because i have a lot of errors while trying to raster-rise worldwide road datasets. > ExecuteErrors:ERROR 999998 and 999999: Unexpected Error. > > Failed to execute(PolygonToRaster). So, if anyone have some experience with this issue, I would gladly know how to solve this issue!


IFeatureClass.Search throws error "0x80041599 The number of points is less than required for feature"

I am creating a buffered geometry around a point feature in order to search for other nearby features. I use the TopologicalOperator to create my buffered geometry. I am attempting to search a feature class when a ComException is thrown telling me that 'the number of points is less than required for feature'. I am unsure whether it is referring to the geometry I am searching with, which I have verified is a polygon with 129 points, or to a feature in the feature class that I am searching within. I have run an ArcObject routine to try and rid the various features classes of features with invalid geometries, but this error persists. The data's SR is WGS84 with a XY resolution of .000000001. The MXD's projection is Web Mercator Auxiliary Sphere. I am buffering my points by 10 feet. The code works and buffer size work fine in the dev environment but is failing in the test environment. _Spatial Indexes on Search FCs_               FC1     1.133126     0.000000     0.000000          FC2     0.310968     0.000000     0.000000          FC3     0.193221     0.000000     0.000000      Snippits of source below. Note that GeoUtil has several methods that will pull values off the ServerContext. _Create Buffered Geometry_               private IGeometry GetBufferedGeometry(IFeature feature, int bufferFeet, GeodatabaseUtil geoUtil)     {         // Convert shape to Map's spatial reference         var geometry = feature.ShapeCopy;         geometry.Project(geoUtil.GetMapSpatialReference());              // Convert buffer feet to Map's distance units         IUnitConverter converter = new UnitConverterClass();         var bufferUnits = converter.ConvertUnits(bufferFeet, esriUnits.esriFeet, geoUtil.GetMapDistanceUnits());              // Buffer shape         var topoOp = geometry as ITopologicalOperator;         var bufferedGeometry = topoOp.Buffer(bufferUnits);              // Project buffered shape back to dataset projection         bufferedGeometry.Project(feature.Shape.SpatialReference);         return bufferedGeometry;     }      _Search for features_               // Create buffered filter     var spatialFilter = geoUtil.NewSpatialFilter();     spatialFilter.Geometry = GetBufferedGeometry(feature, searchBuffer, geoUtil);     spatialFilter.SpatialRel = info.SpatialRelationship;          // Search for features within filter     var featureCursor = searchClass.Search(spatialFilter, true);     var foundFeature = featureCursor.NextFeature();     while (foundFeature != null)


Google Maps/ OpenLayers only rendering top left tiles

I'm seeing a weird issue with Google Maps and OpenLayers. When loading a page as shown below, only the two top-left tiles render, leaving the rest of the map blank. I looked in the Network tab in Chrome Dev. Tools, and indeed, those are the only two tiles that came down the pipe. However, once I interact with the map using the mouse in any way, the tiles all come down properly. Rendering the map using Bing or any other provider works fine. One likely possibility: the map is rendered on a tab widget. If I explicitly load that tab in the URL (e.g. specifying #tab-4), the map renders fine. Also, I've seen people having this problem when they don't explicitly specify the dimensions of the map div in pixels, but mine is explicitly set. The behavior is identical in Firefox, IE 9, and Chrome. Anyone seen this behavior? ![enter image description here](http://i.stack.imgur.com/I5E9m.png)


GIS developer blogs ... recommendations?

I'm looking for recommendations for GIS blogs ... specifically GIS _developer_ blogs. I'm less interested in the geography than in how apps are put together. I'd like to keep up with ESRI ArcGIS as well as open source tools. Which blogs are you fine people reading?


Downloading from WFS - no data in returned XML

I want to download some information about lots using WFS hosted by http://geoportal.gov.pl/ . I've tried download data with this link: http://mapy.geoportal.gov.pl/wss/service/pub/guest/G2_GO_WFS/MapServer/WFSServer?service=wfs&version=1.1.0&REQUEST=GetFeature&typename=Dzialki&srsname=EPSG:2180&BBOX=30,30,30.001,30.001 Unfortunately returned XML doesn't contain any interesting data...               <wfs:FeatureCollection xsi:schemaLocation='http://mapy.geoportal.gov.pl:80/wss/service/pub/guest/G2_GO_WFS/MapServer/WFSServer http://mapy.geoportal.gov.pl:80/wss/service/pub/guest/G2_GO_WFS/MapServer/WFSServer?request=DescribeFeatureType%26version=1.1.0%26typename=Dzialki http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd' xmlns:G2_GO_WFS='http://mapy.geoportal.gov.pl:80/wss/service/pub/guest/G2_GO_WFS/MapServer/WFSServer' xmlns:gml='http://www.opengis.net/gml' xmlns:wfs='http://www.opengis.net/wfs' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>     <gml:boundedBy>     <gml:Envelope srsName='EPSG:2180'>     <gml:lowerCorner>133223.25099999999 171678.07000000001</gml:lowerCorner>     <gml:upperCorner>774923.77999999898 861902.51000000001</gml:upperCorner>     </gml:Envelope>     </gml:boundedBy>     </wfs:FeatureCollection>      I've tried variety of coordinates and bbox values, but I've always got the same xml in response. How can I get data from geoportal?


Get a single cluster from cloud of points with maximum diameter in postgis

I have on the order of 100K collections of ~20 points in a PostGIS table. I want to identify clusters within each collections, with a specified maximum diameter. Then I would identify a main cluster, based on the number of points it contains (and in case of a tie, choose the cluster with the smallest area). Since I will be using these clusters further in the database, I'd rather use a technique within PostgreSQL/PostGIS. I'm aware of the k-means pg-extension, but that won't do what I need.


How do I from convert from street level address to block/block group/census track?

I just downloaded block-level census data, using this answer Where to get 2010 Census Block data? It output a spreadsheet with a bunch of rows of the format               GEO.id                   | GEO.id2    | Geo.display-label     1000000US22071000100100  | 2.2071E+14 | Block 1002, Block Group 1, Census Tract 1, Orleans Parish, Louisiana      I want to convert "Block 1002, Block Group 1, Census Tract 1" to something like 700 Block of Jefferson St. Etc. How do I convert these "addresses" into street addresses or longitudes/latitudes? **Edit** I can go individually from street address to census block using the advanced search on American Fact Finder, but I am looking for a way to do a batch conversion. The FCC has an API that will do block conversions from lat/longitude to blocks: http://www.fcc.gov/developers/census-block-conversions-api


iisnode with ArcPy

I am calling the child_process in Node to trigger a python script which is importing ArcPy. This works fine until I start sending requests through IIS. Python runs, but importing ArcPy fails. I have shared the three folders with IIS_USRS if that helps. C:\Program Files (x86)\ArcGIS\Desktop10.1\bin C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy C:\Program Files (x86)\ArcGIS\Desktop10.1\ArcToolbox\Script


Automating a Python expression to calculate acres

I'm not new to GIS but very, very new to using Python and using scripts. I successfully use a Python expression !shape.area@acres! to update a field with acres in a feature class. What my users would like is a tool they can put on their toolbar to see the calculated acres when they select a polygon feature. We had this tool in 9.3 but obviously doesn't work in 10. I am using Desktop 10.2 Advanced. Is there some way to create this as a button so that users can add this "tool." I'm just not sure if I should be looking at ModelBuilder, geoprocessing tools, or add-ins? I just don't want my user to have to load this expression every time they want to use it.


Using a grid of points to generate polygons

I have a csv that has lat/long points for all corners of a perfect grid over an area I am working with. I need to take these corners and generate a shape file with individual polygons for each grid cell. I know I can use points2polygon if I had IDs for each corner but it would be fairly tedious to get those in my input file. Is there a simpler way to do this then with points2polygon? I am using QGIS 2.0.1 Dufour currently


Text issues when exporting from ArcMap 10.1 to Illustrator CS5

When exporting from ArcMap 10.1 to Illustrator CS5 I am getting a lot of errors (red box with plus sign). I have used this workflow in ArcMap 9.3 with no problem. There may have been a couple of errors but not the hundreds I am getting. I have played with the export dpi but the result doesn't change. Any ideas appreciated! Thanks.


Showing a select or hightlighting a point feature in AGS using Javascript

How would you go about "selecting/hightlighting a feature" in the map control when a user clicks on a point in the map - all via ADF Javascript. I know it can be done server side with a selection graphics layer etc, just wondering if it can be done client side. Cheers


How to programatically identify the "Joined Field" in ArcMap?

Is it possible to programmatically identify the **Join Field** that is being used to Table Join two datasets together in ArcMap? I am currently using ArcGIS 10.0, SP5 and would **prefer an ArcPy solution** , however I wouldn't be opposed to other solutions, if an ArcPy solution is not available. One method I tried was looping through all of the fields and look for a matching "baseName", but that is just an "educated guess" where you are hoping that the fieldnames in both databases are the same. For a graphic representation of what I am after, I basically want to identify the "Input Join Field" and "Output Join Field" as seen in the "Add Join" dialog, but after-the-fact, of course. ![How to identify the "Input Join Field" and "Output Join Field"?](http://i.stack.imgur.com/9EzkM.jpg) This is a tag-on question to Can a “Join” be detected programmatically?, but in this case I want to extend the functionality to identify the FIELD(s) being used to join the two (or more) datasets together.


Replace NA's with 0 for raster data using R

I am new in R. How can I replace NA's with 0 for my raster data which have spatial information?


Compilation of GRASS 6.4.trunk on Win7

you may have seen my other posts, at the point now where I am trying to use the landsat plugins in a lower version of GRASS. Markus N noted that the 6.4.2 might be better, since that is not out yet I have given the 6.4 trunk a go. Has anyone had any success installing plugins on a Win7 machine? I worked on a few issues, the plugin path needs to be specified with forward slashes / not back slashes, and it needs to have no gaps, so at the install of the GRASS version start a new directory near the C:\ drive. That should be clear from the output below;               (Wed May 04 17:18:40 2011)                                                           g.extension -s --verbose extension=i.landsat.acca svnurl=https://svn.osgeo.org/grass/grass-addons prefix=C:/GRASSPROG/GRASS64SVN/bin     which: wget: unknown command     Using CURL for downloading data.     Fetching <i.landsat.acca> from GRASS-Addons SVN (be patient)...     A    i.landsat.acca\tools.c     A    i.landsat.acca\local_proto.h     A    i.landsat.acca\main.c     A    i.landsat.acca\description.html     A    i.landsat.acca\algorithm.c     A    i.landsat.acca\Makefile      U   i.landsat.acca     Checked out revision 46175.     Compiling <i.landsat.acca>...     C:/GRASSPROG/GRASS64SVN/include/Make/Module.make:25:     warning: overriding commands for target `install'     C:/GRASSPROG/GRASS64SVN/include/Make/Rules.make:90: warning:     ignoring old commands for target `install'     gcc.exe: installation problem, cannot exec `cc1': No such     file or directory     make: *** [OBJ.i686-pc-mingw32/algorithm.o] Error 1     ERROR: Compilation failed, sorry. Please check above error messages.     test -d OBJ.i686-pc-mingw32 || mkdir -p OBJ.i686-pc-mingw32     gcc -I/c/OSGeo4W/apps/grass/grass-6.4.2svn/include -I/c/OSGeo4W/include -g -O2  -I/c/OSGeo4W/include     -DPACKAGE=\""grassmods"\"  -I/c/OSGeo4W/apps/grass/grass-6.4.2svn/include -o OBJ.i686-pc-mingw32/algorithm.o -c algorithm.c     rm: cannot remove directory     `C:\\GRASSDATA/UTM55S/9384Hay/.tmp/1920.0/i.landsat.acca':      Permission denied     (Wed May 04 17:18:51 2011) Command finished (11 sec)                                  * * * Still no joy               g.extension --verbose extension=i.landsat.toar prefix=C:/OSGeo4W/GRASS64SVN/bin      which: wget: unknown command     Using CURL for downloading data.     Fetching <i.landsat.toar> from GRASS-Addons SVN (be patient)...     A    i.landsat.toar\landsat_set.c     A    i.landsat.toar\local_proto.h     A    i.landsat.toar\main.c     A    i.landsat.toar\description.html     A    i.landsat.toar\landsat.c     Compiling <i.landsat.toar>...     A    i.landsat.toar\earth_sun.c     A    i.landsat.toar\landsat.h     A    i.landsat.toar\landsat_met.c     A    i.landsat.toar\Makefile     A    i.landsat.toar\earth_sun.h     U   i.landsat.toar     Checked out revision 48242.     mkdir -p E:\GRASSDATA/QG_UTM55S/Warren_18Nov10/.tmp/5676.0/dist/include/grass     mkdir -p E:\GRASSDATA/QG_UTM55S/Warren_18Nov10/.tmp/5676.0/dist/bin     mkdir -p E:\GRASSDATA/QG_UTM55S/Warren_18Nov10/.tmp/5676.0/dist/etc     mkdir -p E:\GRASSDATA/QG_UTM55S/Warren_18Nov10/.tmp/5676.0/dist/driver     mkdir -p E:\GRASSDATA/QG_UTM55S/Warren_18Nov10/.tmp/5676.0/dist/driver/db     mkdir -p E:\GRASSDATA/QG_UTM55S/Warren_18Nov10/.tmp/5676.0/dist/fonts     test -d OBJ.i686-pc-mingw32 || mkdir -p OBJ.i686-pc-mingw32     C:/OSGeo4W/GRASS64SVN/include/Make/Module.make:25: warning:     overriding commands for target `install'     C:/OSGeo4W/GRASS64SVN/include/Make/Rules.make:90: warning:     ignoring old commands for target `install'     gcc.exe: installation problem, cannot exec `cc1': No such     file or directory     make: *** [OBJ.i686-pc-mingw32/earth_sun.o] Error 1     ERROR: Compilation failed, sorry. Please check above error messages.     gcc -IC:/OSGeo4W/GRASS64SVN/include -IC:/OSGeo4W/GRASS64SVN/bin/include -IE:\GRASSDATA/QG_UTM55S/Warren_18Nov10/.tmp/5676.0/dist/include -I/c/OSGeo4W/include -g -O2  -I/c/OSGeo4W/include     -DPACKAGE=\""grassmods"\"  -IC:/OSGeo4W/GRASS64SVN/include -IC:/OSGeo4W/GRASS64SVN/bin/include -IE:\GRASSDATA/QG_UTM55S/Warren_18Nov10/.tmp/5676.0/dist/include -o OBJ.i686-pc-mingw32/earth_sun.o -c earth_sun.c     rm: cannot remove directory `E:\\GRASSDATA/QG_UTM55S/Warren_     18Nov10/.tmp/5676.0/i.landsat.toar': Permission denied     (Mon Sep 12 08:01:25 2011) Command finished (13 sec)                                  * * * Still no joy, GRASS 6.4.2svn48674               g.extension -s -u --verbose extension=i.landsat.toar prefix=C:\OSGeo4W\GRASS64SVN\bin     which: wget: unknown command     Using CURL for downloading data.     Fetching <i.landsat.toar> from GRASS-Addons SVN (be patient)...     A    i.landsat.toar\landsat_set.c     A    i.landsat.toar\local_proto.h     A    i.landsat.toar\main.c     A    i.landsat.toar\description.html     A    i.landsat.toar\landsat.c     A    i.landsat.toar\earth_sun.c     A    i.landsat.toar\landsat.h     A    i.landsat.toar\landsat_met.c     A    i.landsat.toar\Makefile     A    i.landsat.toar\earth_sun.h     Compiling <i.landsat.toar>...     C:/OSGeo4W/GRASS64SVN/include/Make/Grass.make:422: warning:     overriding commands for target `E:\GRASSDATA/QG_UTM55S/Narra     ndera_20110918/.tmp/4948.0/dist.i686-pc-msys/bin'     C:/OSGeo4W/GRASS64SVN/include/Make/Grass.make:413: warning:     ignoring old commands for target `E:\GRASSDATA/QG_UTM55S/Nar     randera_20110918/.tmp/4948.0/dist.i686-pc-msys/bin'     C:/OSGeo4W/GRASS64SVN/include/Make/Module.make:25: warning:     overriding commands for target `install'     C:/OSGeo4W/GRASS64SVN/include/Make/Rules.make:90: warning:     ignoring old commands for target `install'      U   i.landsat.toar     Checked out revision 48683.     mkdir -p E:\GRASSDATA/QG_UTM55S/Narrandera_20110918/.tmp/4948.0/dist.i686-pc-msys/bin     mkdir -p E:\GRASSDATA/QG_UTM55S/Narrandera_20110918/.tmp/4948.0/dist.i686-pc-msys/include/grass     mkdir -p E:\GRASSDATA/QG_UTM55S/Narrandera_20110918/.tmp/4948.0/dist.i686-pc-msys/etc     mkdir -p E:\GRASSDATA/QG_UTM55S/Narrandera_20110918/.tmp/4948.0/dist.i686-pc-msys/driver     mkdir -p E:\GRASSDATA/QG_UTM55S/Narrandera_20110918/.tmp/4948.0/dist.i686-pc-msys/driver/db     mkdir -p E:\GRASSDATA/QG_UTM55S/Narrandera_20110918/.tmp/4948.0/dist.i686-pc-msys/fonts     test -d OBJ.i686-pc-mingw32 || mkdir -p OBJ.i686-pc-mingw32     gcc.exe: installation problem, cannot exec `cc1': No such     file or directory     make: *** [OBJ.i686-pc-mingw32/earth_sun.o] Error 1     ERROR: Compilation failed, sorry. Please check above error messages.     gcc -IC:/OSGeo4W/GRASS64SVN/include -IC:/OSGeo4W/GRASS64SVN/include -IE:\GRASSDATA/QG_UTM55S/Narrandera_20110918/.tmp/4948.0/dist.i686-pc-msys/include -I/c/OSGeo4W/include -g -O2  -I/c/OSGeo4W/include     -DPACKAGE=\""grassmods"\"  -IC:/OSGeo4W/GRASS64SVN/include -IC:/OSGeo4W/GRASS64SVN/include -IE:\GRASSDATA/QG_UTM55S/Narrandera_20110918/.tmp/4948.0/dist.i686-pc-msys/include -o OBJ.i686-pc-mingw32/earth_sun.o -c earth_sun.c     rm: cannot remove directory `E:\\GRASSDATA/QG_UTM55S/Narrand     era_20110918/.tmp/4948.0/i.landsat.toar': Permission denied     (Sun Oct 09 16:18:33 2011) Command finished (11 sec)


Is there a way to add system date in print composer?

Is there a way in the Print Composer of QGIS to create a label that will automatically update the date (systems date) instead of having a label that you have to manually have to update?


How to validate whether the BBOX strategy works successfully?

I want to send requests to our feature server that asks only data within the viewable map extent. So I've used BBOX strategy and HTTP Protocol as following code.                       mVectorLayer = new OpenLayers.Layer.Vector("Overlay", {                 **strategies: [new OpenLayers.Strategy.BBOX()],**                 protocol: new OpenLayers.Protocol.HTTP({                     url: 'http://localhost:56786/jlist.geojson',                     format: new OpenLayers.Format.GeoJSON({                         'read': myReadFunction,                         'internalProjection': map.baseLayer.projection,                         'externalProjection': new OpenLayers.Projection("EPSG:4326")                     })                 }),                 projection: new OpenLayers.Projection("EPSG:900913")             });      I've added a feature outside the viewable map to the geojson file shown at below.               { "type": "FeatureCollection",       "features": [           { "type": "Feature",             "geometry": {"type": "Point", "coordinates": [29.0, 41.060]},             "properties": {"name": "IST J1", "img": "img/marker.png"}           },           { "type": "Feature",             "geometry": {"type": "Point", "coordinates": [29.0, 41.100]},             "properties": {"name": "IST J2", "img": "img/marker.png"}           },           **{ "type": "Feature",             "geometry": {"type": "Point", "coordinates": [59.0, 41.100]},             "properties": {"name": "IST J3", "img": "img/marker.png"}           }**       ]     }      To validate, I've added an alert to the function myReadFunction which shows the json string. But the alert shows all features in geojson file. I suppose our feature server sends all geojson content instead of viewable features? How can I validate or observe whether the BBOX strategy works successfully?                   function myReadFunction(json, type, filter) {             **alert("json: " + json);**                  type = (type) ? type : "FeatureCollection";             var results = null;             var obj = null;             if (typeof json == "string") {                 obj = OpenLayers.Format.JSON.prototype.read.apply(this, [json, filter]);             } else {                 obj = json;             }             if (!obj) {                 OpenLayers.Console.error("Bad JSON: " + json);             } else if (typeof (obj.type) != "string") {                 OpenLayers.Console.error("Bad GeoJSON - no type: " + json);             } else if (this.isValidType(obj, type)) {                 switch (type) {                     case "Geometry":                         try {                             results = this.parseGeometry(obj);                         } catch (err) {                             OpenLayers.Console.error(err);                         }                         break;                     case "Feature":                         try {                             results = this.parseFeature(obj);                             results.type = "Feature";                         } catch (err) {                             OpenLayers.Console.error(err);                         }                         break;                     case "FeatureCollection":                         // for type FeatureCollection, we allow input to be any type                         results = [];                         switch (obj.type) {                             case "Feature":                                 try {                                     results.push(this.parseFeature(obj));                                 } catch (err) {                                     results = null;                                     OpenLayers.Console.error(err);                                 }                                 break;                             case "FeatureCollection":                                 for (var i = 0, len = obj.features.length; i < len; ++i) {                                     try {results.push(this.parseFeature(obj.features[i]));                                     } catch (err) {                                         results = null;                                         OpenLayers.Console.error(err);                                     }                                 }                                 break;                             default:                                 try {                                     var geom = this.parseGeometry(obj);                                     results.push(new OpenLayers.Feature.Vector(geom));                                 } catch (err) {                                     results = null;                                     OpenLayers.Console.error(err);                                 }                         }                         break;                 }             }             return results;      } Thanks a lot for your helps and explanations, Yasemin


How to join lines in QGIS for later using "lines to poly"?

After successfully merging lines (using snapping) with merge_selected_features i got nice result - one merged line. Next thing was to make polygon from created merged line. Result is not nice - it creates multiple polygons connecting ends from separate lines which were merged previously together. Somehow merging geometry is not working for me or i am missing something. .. Solved. I imported lines in Grass, then i used v.build.polylines and got nice line from which i was able to create correct polygon.


Hibernate Spatial MappingException for Geometry Column

I'm using Hibernate Spatial in a GIS application. I have an entity class, in which one of the columns is a geometry column, as shown below:               @Entity     @Table(name = "table_name")     public class Admin implements Serializable {              private static final long serialVersionUID = 1L;              @Id         @GeneratedValue(strategy = GenerationType.IDENTITY)         @Column(name = "gid")         private Long id;              @Column(name = "adm1_name")         private String adminName;              @Column(name = "adm1_code")         private String adminCode;                   /*private Integer adminLevel;*/         @Column(name = "the_geom")         @Type(type = "org.hibernatespatial.GeometryUserType")         private Geometry geom;              @Column(name = "pmal")         private String pMale;              @Column(name = "pfem")         private String pFemale;              public Admin() {}              /* Getters and Setter here*/     }      I've done a lot of experiments, and I've eliminated hibernate configuration as the cause. I've also eliminated Spring configuration as the cause. I think my problem may be something to do with the version of hibernate spatial I'm using; I'm using version 4.0-M1. In my earlier experiments, I realized there are some package name changes from versionn 1.x. Other details are as follows: PostGIS JDBC: version 1.3.3, Hibernate Core: version 3.6.10 FINAL, Hibernate Entity Manager: version 3.6.10 FINAL, and PostgreSQL JDBC: version 8.4-702.jdbc3 Whenever I start my server, application deployment fails with the following error: `org.hibernate.MappingException: Could not determine type for: org.hibernatespatial.GeometryUserType, at table: #table_name# for columns: #geometry_column_name#` Any idea on how I can solve this will be highly appreciated.


How do i find out geometries for areas?

I was wondering if anyone could help me out with a website which I can use to get geometries for a area. What I'm looking for is something like google maps where I can drag a cursor over a area of the map and get a bounding box for it (as geometry not geography). If anyone knows of a site like this or one where i can find out bounding box's it would be greatly appreciated.


Error message 'Module qgis.v.kernel.rast.py not found'

How do I repair this error in QGIS: ![Error message](http://i.stack.imgur.com/Lzze4.jpg) The error message was received whilst trying to run v.kernel from the modules list. I can however run v.kernel from the GRASS shell. A while ago, I installed a new plugin which apparently moved or deleted a whole lot of files. The result was that I couldn't use NVIZ. Uninstalling and re-installing QGIS didn't help so I finally resorted to manually locating the files and replacing them. Not sure where to find this file however. Is there anyone who can assist me how to repair this?


How to compute the distance from the beginning of a line for every points using postgis

I have a line, for which I need to know, for every point that compose it, what is the distance from the beginning. The data is stored in PostGis 2.0 For example, for the line with the point a, b, c, d : a -> b -> c -> d The distance I need for each point is :   * a should be 0,    * b should be 5m (distance between a and b)   * c should be 12m (b and c are separated by 7m, + 5m for a and b)   * d should be 18m (c and d are 6m apart, and 12m previously) That distance need to be written as double in another table (where I then mix additional metadata on the point) Right now I use               INSERT INTO myschema.points     (point_id, position, offset, distance)     SELECT         points.id as point_id         points.position as position,         points.offset as offset,         -- Very slow!         ST_Line_Locate_Point(line.full_path, points.position) * line.length AS distance     FROM points_temp AS points     INNER JOIN         temp_line AS line ON points.line_id = line.id     ORDER BY          points.offset;      But it is terribly slow! It seem to recompute the length of the line for every points and that is _very_ inefficient. Points along the line are ordered by offset What would be a better and (possibly) much faster way?


ArcMap ArcPy - Place signs with no lat/lng on map

I'm new to ArcPy and ArcMap but I do have programming experience. What I am trying to accomplish is to take over 22,000 signs from a database and place them on a map in reference to a street layer that is there. The problem is that there is no lat/lng but the database specifies the road it is on, and the two intersections it is inbetween and the distance it is from the first intersection. I found an example of a trace tool and I am attempting to use that with little luck. I have a mainline layer of the road that I can trace and I have intersection points to reference but again, I am new to ArcMap and ArcPy so any help in the right direction would be great. I am thinking that I will put in a loop to select the intersection that corresponds with the sign and then trace the distance from that intersection towards the other intersection point. The loop is not a problem but the trace function is rather foreign to me so I was hoping someone could provide me with a place to find some good examples or just a basic overview of how to implement a trace function. The ArcGIS site wasn't much help. Thanks a lot!


Alternate colors of GeoJSON linestring segments in OpenLayers?

I am rendering a vector linestring via GeoJSON on top of an OpenLayers map. I'd like to alternate the styling between two slightly different shades of blue, such that the colors alternate from one line segment to the next. Is there any way to do this, apart from using points instead of a linestring and constructing the line segments myself?               var path;          function drawPath(table, x, y, id) {       var urlreq = "../grab.php?method=get_path&x=" + x + "&y=" + y + "&table=" + table +                     "&id=" + id;       if( typeof(path) != 'undefined' ) { map.removeLayer(path); }       path = new OpenLayers.Layer.Vector("Path", {         projection: epsg900913,         style: {           strokeColor: "blue",           strokeWidth: 3         },         strategies: [new OpenLayers.Strategy.Fixed()],         protocol: new OpenLayers.Protocol.HTTP({           url: urlreq,           format: new OpenLayers.Format.GeoJSON()         })       });       map.addLayer(path);     }


shp2MySQL GIS Import Coordinates Not Correct

I'm attempting to import the Chicago Neighborhood Boundaries into a MySQL database from the shape files available at https://data.cityofchicago.org/Facilities-Geographic-Boundaries/Boundaries- Neighborhoods/9wp7-iasj using SHP2MySQL. I am able to do it with the Zillows Neighborhood Database and get the correct coordinate boundaries, however when I import the City of Chicago Data the featured column displays incorrect coordinates. Any help would be appreciated. For example, I get the following data for neighborhood of Beverly when I import the City of Chicago Data:               POLYGON((1166097.9701 1844437.85,1166108.3686 1844412.5465,1166142.3191 1844329.9324,1166206.8876 1844160.9099,1166268.781 1843998.89,1166328.18 1843843.4,1166331.6706 1843834.3,1166364.59 1843748.48,1166395.3401 1843670.43,1166459.4958 1843507.5901,1166488.02 1843435.1899,1166507.8499 1843386.56,1166524.0592 1843344.2297,1166588.2577 1843176.5759,1166614.18 1843108.88,1166649.5218 1843016.8707,1166711.99 1842854.24,1166712.5283 1842852.8394,1166763.1101 1842721.23,1166775.7625 1842690.2201,1166787.24 1842662.09,1166838.15 1842530.25,1166849.8318 1842500,1166861.05 1842470.7,1166911.31 1842343.05,1166916.161 1842331.4873,1166788.92 1842328.42,1166900.22 1842041.16,1166909.74 1842016.6,1166924.02 1841979.74,1166938.3001 1841942.88,1166969.68 1841861.9001,1167009.2 1841759.92,1167028.3324 1841706.3521,1167127.2499 1841708.755,1167176.8286 1841710.124,1167176.8408 1841710.136,1167176.8456 1841710.1246,1167189.9716 1841710.5666,1167316.7132 1841714.834,1167335.1849 1841715.3112,1167335.8813 1841694.2332,1167337.92 1841632.53,1167340.04 1841535.36,1167342.17 1841438.28,1167343.67 1841365.96,1167343.51 1841337.83,1167349.73 1841292.98,1167359.69 1841253.12,1167375.75 1841208.68,1167405.08 1841127.16,1167441.8161 1841030.6886,1167442.52 1841028.84,1167482.72 1840925.98,1167500 1840881.328,1167507.94 1840860.76,1167536.88 1840786.1,1167554.46 1840740.76,1167575.38 1840686.81,1167595.92 1840633.8401,1167626.56 1840555.07,1167650.2399 1840494.24,1167680.86 1840415.42,1167688.004 1840396.8826,1167706.6501 1840348.5,1167759.67 1840210.72,1167786.78 1840140.57,1167816.02 1840065.14,1167832.92 1840021.45,1167841.229 1839999.9999,1167886.92 1839881.96,1167932.4682 1839763.9484,1167960.67 1839690.88,1168011.42 1839559.81,1168045.96 1839470.78,1168067.7599 1839413.51,1168075.07 1839393.29,1168095.38 1839335.99,1168116.78 1839277.06,1168138.42 1839218.44,1168155.84 1839171.26,1168185.9579 1839094.9484,1168114.4 1839092.94,1168064.92 1839091.43,1168008.91 1839090.03,1167941.43 1839088.34,1167862.82 1839087.3901,1167828.5888 1839086.6137,1167724.81 1839084.26,1167653.4642 1839082.1315,1167596.43 1839080.4299,1167500 1839078.0186,1167449.48 1839076.49,1167414.1688 1839075.4747,1167413.7199 1839075.4619,1167348.27 1839073.58,1167263.52 1839071.12,1167180.0247 1839068.5626,1167111.38 1839066.46,1167038.98 1839064.05,1166966.9 1839061.89,1166956.3693 1839061.6327,1166862.52 1839059.34,1166775.4 1839056.58,1166708.24 1839054,1166627.1297 1839051.6925,1166554.98 1839049.64,1166497.71 1839047.36,1166430.38 1839045.18,1166411.0701 1839044.5198,1166345.56 1839042.28,1166256.18 1839039.44,1166171.59 1839037.0299,1166098.8747 1839036.2326,1166100.3282 1838951.1106,1166100.3265 1838904.3256,1166098.78 1838837.22,1166095.63 1838769.58,1166090.89 1838702.03,1166084.56 1838634.62,1166062.11 1838469.51,1166038.62 1838349.8099,1166020.85 1838271.45,1166014.82 1838246.86,1165998.3899 1838184.44,1165980.42 1838122.4499,1165960.94 1838060.91,1165910.48 1837907.01,1165909.16 1837903.27,1165887.42 1837839.23,1165867.21 1837774.69,1165848.5299 1837709.7,1165831.39 1837644.28,1165817.13 1837584.92,1165815.89 1837579.26,1165806.3399 1837531.7099,1165801.06 1837500,1165798.37 1837483.86,1165791.98 1837435.78,1165787.17 1837387.51,1165773.04 1837229.6501,1165761.21 1837091.76,1165753.04 1836991.3,1165744.98 1836894.33,1165736.42 1836776.53,1165724.06 1836629.84,1165710.49 1836472.09,1165703.43 1836388.7,1165694.02 1836275.31,1165682.13 1836130.72,1165667.7501 1835956.12,1165651.0401 1835757.23,1165634.83 1835556.22,1165619.45 1835370.43,1165592.98 1835063.77,1165589.912 1835028.7082,1165587.4 1835000,1165583.55 1834956.09,1165569.62 1834778.96,1165553.89 1834586.59,1165540.98 1834442.41,1165528.08 1834283.56,1165512.91 1834095.5,1165504.8637 1834003.9009,1165503.9072 1833993.0124,1165498.25 1833928.61,1165491.5587 1833845.7001,1165491.5387 1833845.4533,1165483.76 1833749.07,1165479.7915 1833701.6296,1165479.4372 1833696.5274,1165462.65 1833696,1165452.2 1833696.08,1165399.66 1833693.6293,1165325.28 1833690.16,1165275.29 1833689.13,1165220.4401 1833687.44,1165178.48 1833685.8,1165127.33 1833683.6899,1165072.1652 1833681.8793,1165000 1833679.5107,1164946.39 1833677.62,1164894.32 1833675.7,1164829.9901 1833673.34,1164773.25 1833671.28,1164733.78 1833669.99,1164699.02 1833668.86,1164635.79 1833667.3216,1164613.12 1833666.77,1164581.3098 1833665.555,1164525.94 1833663.44,1164466.45 1833661.1,1164416.95 1833659.16,1164372.67 1833657.42,1164328.21 1833655.68,1164264.6401 1833653.5765,1164208.9699 1833651.7344,1164140.84 1833649.48,1164091.42 1833648.52,1164042.01 1833647.56,1163987.62 1833646.26,1163936.53 1833644.7601,1163878.62 1833643.06,1163819.29 1833641.29,1163774.8 1833639.96,1163712.88 1833638.07,1163703 1833637.75,1163608.1399 1833634.7442,1163559.72 1833633.21,1163512.7 1833631.65,1163468.14 1833630.14,1163426.12 1833628.7,1163373.8 1833626.92,1163331.88 1833625.5,1163283.3797 1833623.9822,1163218.76 1833621.96,1163168.83 1833620.32,1163112.08 1833618.46,1163070.13 1833617.0801,1163025.68 1833615.58,1162954.25 1833613.1788,1162894.79 1833611.1799,1162852.78 1833609.8,1162820.56 1833608.73,1162758.64 1833606.8,1162706.93 1833605.4,1162679.71 1833605.2799,1162625.65 1833605.0999,1162553.65 1833604.86,1162516.56 1833604.48,1162500 1833604.9082,1162467.36 1833605.75,1162412.11 1833607.19,1162330 1833607.17,1162290.0182 1833609.9143,1162288.5809 1833653.9957,1162287.03 1833701.56,1162284.5072 1833783.44,1162283.7 1833809.64,1162280.79 1833904.24,1162277.5 1834010.34,1162274.74 1834091.7601,1162271.96 1834173.7201,1162270.18 1834226.5699,1162268.7294 1834275.6455,1162266.23 1834360.2,1162262.32 1834480.7699,1162258.54 1834597.66,1162255.6201 1834687.3401,1162252.56 1834816.32,1162251.19 1834869.4,1162248.4109 1834941.2681,1162246.14 1835000,1162245.86 1835003.66,1162241.6 1835136.42,1162234.98 1835346.64,1162228.52 1835538.56,1162226.6752 1835604.6503,1162223.7 1835711.24,1162218.62 1835865.26,1162212.23 1836088.51,1162210.39 1836149.76,1162206.3607 1836268.5024,1162204.23 1836331.3,1162200.7999 1836449.3,1162194.84 1836634.54,1162189.86 1836801.08,1162185.999 1836932.5369,1162182.61 1837047.92,1162178.64 1837180.42,1162174.3 1837321.72,1162171.5 1837414.34,1162168.9632 1837500,1162168.24 1837524.18,1162166.1011 1837596.5655,1162163.43 1837686.96,1162162.12 1837731.86,1162159.16 1837832.82,1162156.12 1837936.74,1162152.18 1838071.78,1162148.9 1838185.25,1162146.3679 1838269.7515,1162143.28 1838372.8,1162139.58 1838476.12,1162136.9341 1838550.2899,1162136.14 1838572.55,1162133.29 1838666.5,1162129.42 1838794.36,1162125.8437 1838922.7688,1162123.27 1839015.1801,1162121.38 1839091.28,1162118.63 1839184.92,1162115.27 1839281.15,1162111.56 1839394.51,1162108.2 1839507.76,1162105.6728 1839591.8101,1162101.94 1839715.96,1162098.3501 1839819.16,1162094.4201 1839932.2,1162092.2662 1839999.9999,1162092.22 1840001.93,1162087.9899 1840132.6199,1162084.7603 1840242.46,1162081.7 1840346.54,1162079.72 1840421.58,1162076.38 1840547.1,1162072.6 1840689.01,1162069.36 1840780.7,1162065.4985 1840908.12,1162060.74 1841065.14,1162056.96 1841190.58,1162053.14 1841315.75,1162049.26 1841442.2,1162045.5678 1841553.2358,1162044.8947 1841573.4769,1162044.0317 1841599.4303,1162040.5 1841705.64,1162036.84 1841826.3,1162034.7448 1841897.1001,1162030.34 1842045.95,1162027.28 1842148.42,1162024.1822 1842243.52,1162020.76 1842348.58,1162017.5199 1842450.9001,1162015.9892 1842500,1162012.16 1842623.96,1162006.8599 1842802.46,1162004.8546 1842870.7018,1162001.92 1842970.56,1161996.1788 1843152.1926,1161995.64 1843169.24,1161990.08 1843342.74,1161983.941 1843541.2233,1161983.38 1843559.36,1161980.14 1843669.01,1161972.28 1843941,1161967.86 1844095.26,1161967.0954 1844118.8082,1161963.4023 1844232.5454,1161960.02 1844336.71,1161957.68 1844418.84,1161954.13 1844539.18,1161950.28 1844665.03,1161945.86 1844804.98,1161943.0513 1844896.35,1161939.8547 1845000,1161937.22 1845092.55,1161933.1224 1845226.2965,1161979.3215 1845230.7359,1161979.36 1845229.48,1162099.54 1845232.76,1162115.52 1845233.2,1162235.68 1845236.48,1162301.66 1845238.28,1162425.6 1845241.66,1162441.58 1845242.1201,1162565.5 1845245.5,1162631.48 1845247.32,1162755.38 1845250.72,1162771.36 1845251.14,1162895.24 1845254.5201,1162961.22 1845256.32,1163085.56 1845259.72,1163101.54 1845260.16,1163225.86 1845263.56,1163258.84 1845264.46,1163258.6249 1845271.7468,1163234.5022 1846088.7868,1163234.02 1846105.12,1163267.04 1846106.0401,1163391.22 1846109.46,1163390.48 1846134.44,1163389.74 1846159.44,1163389 1846184.42,1163387.2001 1846245.8,1163403.08 1846249.9999,1163496.94 1846271.72,1163526.5 1846277.7,1163542.7 1846280.82,1163559.32 1846284.68,1163590.04 1846291.8,1163592.0999 1846292.36,1163593.26 1846253.02,1163595.78 1846167.74,1163647.74 1846181.96,1163657.78 1846185.52,1163685.7799 1846195.46,1163698.52 1846199.98,1163710.22 1846205.14,1163734.2 1846215.72,1163747.8 1846221.72,1163757.88 1846227.08,1163780.62 1846239.22,1163795.3399 1846247.06,1163803.2801 1846252.08,1163825.24 1846265.96,1163840.88 1846275.8601,1163846.94 1846280.36,1163866.86 1846295.12,1163884.16 1846307.96,1163887.12 1846310.5,1163905.7 1846326.56,1163924.66 1846342.94,1163924.92 1846343.16,1163942.34 1846360.6201,1163959.98 1846378.3,1163962.98 1846381.3,1163976.62 1846397,1163993 1846415.84,1164037.3676 1846428.5616,1164139.3201 1846323.0901,1164158.0399 1846304.02,1164178.5299 1846283.5,1164244 1846217.92,1164278.82 1846181.44,1164320.3711 1846137.0909,1164354.41 1846100.76,1164372.27 1846083.12,1164493.28 1845958.44,1164515.94 1845933.96,1164519.47 1845928.8101,1164523.1 1845921.54,1164525.31 1845914.6699,1164526.1 1845907.22,1164526.53 1845901.5,1164524.83 1845890.77,1164523.12 1845886.14,1164518.49 1845876.38,1164514.11 1845868.58,1164507.29 1845859.56,1164490.1199 1845844.4,1164476.82 1845832.62,1164446.64 1845802.62,1164430.73 1845784.24,1164403.68 1845745.88,1164395.72 1845730.77,1164384.08 1845706.02,1164373.4 1845681.94,1164364.18 1845659.88,1164352.16 1845626.76,1164343.76 1845596.06,1164338.6001 1845569.48,1164334.23 1845530.73,1164333.32 1845511.28,1164333.28 1845494.88,1164334.48 1845452.88,1164336.56 1845436.96,1164336.8601 1845425.1699,1164335.3501 1845409.1399,1164333.84 1845402.18,1164330.82 1845393.1099,1164327.49 1845384.64,1164322.4201 1845376.51,1164315.14 1845364.86,1164305.69 1845354.66,1164276.4778 1845326.5478,1164334.16 1845244.21,1164384.18 1845172.69,1164428.18 1845109.97,1164460.34 1845064.01,1164475.8 1845041.91,1164496 1845013.65,1164504.9882 1845000,1164519.7978 1844977.5091,1164544.22 1844940.42,1164779.92 1844649.56,1164811.96 1844579.84,1164819.89 1844564.14,1164839.5362 1844526.503,1164910.681 1844428.9108,1164916.37 1844422.06,1164923.9 1844407.79,1164927.66 1844397.66,1164933.56 1844375.69,1164935.35 1844365.23,1164939.267 1844310.9456,1164939.6 1844306.33,1164941.04 1844262.65,1164942.18 1844231.4399,1164943.82 1844186.18,1164945.88 1844129.5201,1164951.38 1843989.92,1164951.83 1843968.0899,1164995.05 1843967.66,1165000 1843968.624,1165010.3 1843970.63,1165025.9 1843977.61,1165034.7 1843982.56,1165049.6 1843993.38,1165061.1 1844004.35,1165071.3 1844015.48,1165079.4999 1844026,1165087.34 1844037,1165095.95 1844048.98,1165100.28 1844054.32,1165106.56 1844061.4,1165117.02 1844070.38,1165129.01 1844078.57,1165138.02 1844083.52,1165153.24 1844089.6,1165166.02 1844093.61,1165181.81 1844095.62,1165193.84 1844094.61,1165205.6201 1844091.35,1165236.5418 1844057.6365,1165309.97 1844108.2,1165316.5401 1844112.38,1165339.36 1844130.95,1165382.43 1844164.63,1165383.7495 1844165.5507,1165445.04 1844208.32,1165505.4 1844242.74,1165542.7884 1844258.6126,1165613.66 1844288.7,1165643.3999 1844298.44,1165669.6401 1844306.18,1165702.73 1844314.47,1165734.02 1844320.94,1165780.9 1844327.99,1165813.8 1844331.18,1165841.15 1844333.84,1165859.0627 1844333.5264,1165876.56 1844333.22,1165893.24 1844327.86,1165937.43 1844321.32,1165948.87 1844317.51,1165963.48 1844315.6,1165971.74 1844316.24,1165985.72 1844322.6,1166007.67 1844334.58,1166017.4183 1844341.7355,1166022.57 1844348.04,1166030.83 1844361.4,1166042.9 1844395.75,1166047.57 1844413.8,1166060.29 1844456.69,1166067.4825 1844486.5996,1166097.9701 1844437.85))',0`


how to use gdal command inside php exec() function

I need to develop a webportal which will display the images generated by a GIS software package. I my development I need to run gdal command inside php `exec()` function. but I don't know how to do this.


Error Importing dbf File Into GRASS

I am working on an assignment which requires me to connect to a database, then import a dbf file into the database using the command `db.in.ogr` (as can be seen below). However, GRASS simply won't import the dbf file. Is there something wrong with the file perhaps? I know for a fact that the file is there, so the problem must be another. > (Sun May 27 09:40:58 2012)   >  db.in.ogr --verbose dsn=C:\datasource\clc2000\CLC2000LEGEND.DBF > output=landcover_legend GRASS_INFO_ERROR(4804,1): Unable to open data source > ERROR: Input table not found or not readable (Sun May 27 09:41:00 2012) > Command finished (1 sec)


Trying to use gdal2xyz in QGIS: "Error:Wrong command"

I am using the following command               gdal2xyz.dy -csv /Users/me/Downloads/esp_gpwv3_pcount_ascii_25/espp00ag.bil    /Users/documents/tttest.csv      in the commander, but I get the following error message and nothing happens "Error:Wrong command". I have installed GdalTools plugin. Any idea why? Thanks a lot in advance!


Closest Point within a Polygon

I have two point feature classes (PointsA and PointsB) and one completely contiguous polygon feature class that cover all the points. For each point in PointsA I need to find the closest point from PointsB that is within the same polygon. I feel like I need to use an iterator in model builder to iterate through each feature in PointsA - select the polygon the point is in, then select the points from PointsB within that selected polygon, and then some how add the value of the closest point from that selected group of points to the feature from PointsA, and then iterate to the next. However, I am using 10.2 standard edition and do not have the near tool. A Spatial Join using "closest" seems like it would work, but I don't believe I can apply that feature by feature in an iterator, can I? Any suggestions are welcome.


Using Scanaerial in JOSM?

I am trying to use **Scanaerial** in JOSM to locate water sources in my county. I was able to install all of the required Python modules and ExtTools and load the scanaerial plugin, but now when I run it, it just scans the WMS layer endlessly and never gives me any output, at least for the hour I have let it run on an acre sized area.. All the documentation is on the OSM Wiki and the files are at this GitHub repo. I am not sure what I am missing to make this plugin produce some output.


rasterize a geography polygon using postgis 2.1

I am still bit new to Postgis 2.1. I am trying to rasterize a polygon, meaning that I have a polygon of Syria and I want to create an empty raster that contains the shape and geography reference of syria. I have been looking at the ST_AsRaster() function, but I can't seem to figure out the settings for this. Any suggestions.


Calculating Lat/Lng X miles from point

I am wanting to find a latitude and longitude point given a bearing, a distance, and a starting latitude and longitude. This appears to be the opposite of this question (Distance between lat/long points). I have already looked into the haversine formula and think it's approximation of the world is probably close enough. I am assuming that I need to solve the haversine formula for my unknown lat/long, is this correct? Are there any good websites that talk about this sort of thing? It seems like it would be common, but my googling has only turned up questions similar to the one above. What I am really looking for is just a formula for this. I'd like to give it a starting lat/lng, a bearing, and a distance (miles or kilometers) and I would like to get out of it a lat/lng pair that represent where one would have ended up had they traveled along that route.


Caculating Longitude and Latitude for Moving Object

> **Possible Duplicate:**   >  Calculating Lat/Lng X miles from point I don't know how to ask the question, so I'll explain my requirments -- I hope I'm in the right site :)   * Let's assume that a person is standing somewhere on Earth and his coordinates are: x long, y lat.   * Let's assume that if the person is facing north he is on 0°, south is 180°, north-west is 315° ... etc. (unless there is some standard that I'm not aware of)   * Let's assume that the person can walk in a straight line from his position on the direction he's facing until he completes a full round around the Globe; i.e. return to his starting position. My question is, what is the equation/set of equations to be used to calculate the person's coordinates (longitude and latitude) every 50, 100, 300 ... etc. kilometers until a full round is done? Thanks in advance.


How to calculate GPS coordinates of one location relative another location?

In location “A” I know longitude (lonA) and latitude (latA) (Altitude is 50m). Relative to location A I know the horizontal (p) and vertical (q) distances to location “B” (B’s Altitude is 0m). I want to calculate the GPS location of location B (lonB and latB). How can I do this? (Note : I want to use this in a program implemented in C++)


Translate geographical coordinate

> **Possible Duplicate:**   >  Calculating Lat/Lng X miles from point I would like to know how could I translate a geographical coordinate to an specific distance. So for example let's suppose I'm facing North at (-78.4437,-0.31399). I need to know the coordinate that's 100m farther and has +30 degrees offset from North. Thanks a lot.


How to know what value use to convert meter in degree using Google Maps info

I am trying to create a mathematical formula to convert meters to decimal degrees. Reading this article Decimal Degrees, I thought this generic formula: x = (Value_in_meter * 0.00001)/1.1132 But I know it is not 100% correct, I should use the other values according where is my point. I am using Google Maps Api, so, how to discover if my point is at 23N/S, 45N/S or 67N/S? **Complementing** I did this function:               public static double convertMeterToDegrees(double meter, double latitude){              double quotient;         double degree = Math.floor(latitude);         double modDegree = Math.abs(degree);              if (modDegree == 0){             quotient = 1.1132;         } else if (modDegree <= 23){             quotient = 1.0247;         } else if (modDegree <= 45){             quotient = 0.7871;         } else {             quotient = 0.43496;         }              return (meter * 0.00001)/quotient;     }      Is it correct?


Calculate Point C using distance and bearing from points A and B?

> **Possible Duplicate:**   >  Calculating Lat/Lng X miles from point I'm from old school so have not done math for ages. So I need some help to solve this problem, please :) I have two points such as A(Lat1, Long1) and B(Lat2, Long2) on the globe. Therefore we can find the bearing and distance etc. Now I want to find the latitude and longitude of a point C which is 100 meters away from point B (on the same protraction). Any clear help is appreciated. thanks


What is the Quickest method for determining which postcode is 2 miles north of original postcode? For instant L17. I know how to determine the distance between 2 points as below, but the above formulae eludes me. Code:                   public static final double PI = 3.14159265;         public static final double deg2radians = PI/180.0;              double lat1 = latitude1  * deg2radians;         double lat2 = latitude2  * deg2radians;         double lon1 = longitude1 * deg2radians;         double lon2 = longitude2 * deg2radians;              radd=2*Math.asin(Math.sqrt(Math.pow(Math.sin((lat1-lat2)/2),2.0) +                       Math.cos(lat1)*Math.cos(lat2)*Math.pow(Math.sin((lon1-lon2)/2)     ,2.0)));


Find square with latitude and longitude for given lat and lng and distance

I have the coordinates of some point, lets say `lat` and `lng`, I want to find the latitude and longitude of top left and bottom right corners of the square, whose sides are located `k` kilometers from the initial point. ![enter image description here](http://i.stack.imgur.com/cpIrR.png)


How to convert distance into latitude + longitude

I have start point (latitude) I know direction, lets say strictly north, and I want to calculate latitude which is 100 meters above the start point. The same for longitude. I believe there should be a simple way to do that, but I couldn't find any relevant to this, only how to calculate distance knowing start and end points. Thank you.


How can I disperse points within polygons using ArcGIS?

I have huge number of points. These points are within polygons. I want to disperse the points in the polygons randomly. I tried to use the disperse point extension in Arcview, but it was not useful for me. Disperse Markers tool in ArcGIS toolbox was also not useful and can’t create permanent disperse points, it just creates a view of point disperse. Are there any tools or scripts to disperse points in polygons? ![enter image description here](http://i.stack.imgur.com/WAD7s.png)


A nice display of hillshade and my geologic map

i want to create a nice hillshade map covered by a grid or RGB map, with similar colour results in ArcMap like this: ![enter image description here](http://i.stack.imgur.com/RaOuv.png) Is there a way to achieve this in ArcGis without transparency settings which fades colours, and not QGIS, or GlobalMapper? More like a blend in, described in various threads but with ArcGIS Desktop 10.


InfoWindow.move() causes InfoWindow to disappear

I use the EditToolbar to enable users to click a point and drag it to a new location. When users click, the InfoWindow showing an AttributeInspector also comes up. As the users drag the point to a new location, I'd like the InfoWindow to follow. I'm trying to accomplish this by:               editToolbar.on("graphic-move", function(evt){         map.infoWindow.move(evt.graphic.geometry)     });      When I click a point, the InfoWindow does appear, but it disappears as soon as I start dragging the point. No error message comes up in the Chrome console. I've verified that evt.graphic.geometry is indeed returning a "point" object. and that map.infoWindow.move is not undefined. Here's how the InfoWindow gets defined:               var infoWindow = new InfoWindow({}, dojo.create("div"));     infoWindow.startup();     map = new Map("map", {         infoWindow: infoWindow,         basemap: "gray",         showAttribution: false,         logo: false,         center: [-121.246172, 38.746659],         zoom: 13,         sliderOrientation: "horizontal",         sliderPosition: "bottom-left",         sliderStyle: "large"     });


How to convert OSM relation xml data to shape file

I would like to transform the xml data here : http://wiki.openstreetmap.org/wiki/Berlin/Transportation into shape files or load into postGIS. I think the thing I am missing is how these xmls files, which contains relations, can be used to get the data they represent. I have tried opening the JOSM link, opening the GPX files in QGIS, and directing to the xml file to osm2shp.jar - none of these routes has given me what I need. The GPX files can be used to generate a shapefile, but when I 'Open Attributes Table' in QGIS all of the column values are NULL for all points. I would appreciate a step by step description of how to work with this data in postGIS or as a shape file.


Why does QGIS 1.8.0 crash when I try to set up CRS on Win XP?

I have a problem with my qgis 1.8.0. When I click on any button that set CRS or try to set the coordinates on the fly, qgis crash. I try to uninstall the program and re-install it again using standalone.exe and the osgeo4w-setup installer but the problem persist. My OS is windows XP ice. Thank you, I hope to not have to format PC!


How to save image to disk with with gdal_translate?

I do:               import os     from gdal import *          filename = 'c:/rast.jpg'     outputTif = 'c:/rastOut.tif'     os.system('gdal_translate filename outputTif')      but it returns "1". gdal_translate doesn't save the image to disk. Is any additional parameter needed?


I have detached the layer panel -- how do I get it back to the side bar?

I accidentally clicked on the detach icon on the layer side panel and now it floats and I can not get it back to the side bar where I want it. There has to be a simple answer but I can't find it :(


Postgresql Query Plugins Not Returning Results in QGIS

I'm using the Fishnet function as described here to create a grid. If I use the following SQL to call the function to position a grid where I want it (I'm using NZGD2000 SRID = 2193) the query returns from postgresql as expected:               create sequence temp;          select         nextval('temp')::int as id,        st_setsrid(geom,2193)      from         st_createfishnet(100,100,1000,1000,1645375,5349447);      If I try to create a layer in qgis using the select portion of the above SQL statement (i.e. not the create sequence command), using either 'Fast SQL Layer' or 'RT SQL Layer' plugins, the query returns zero results. If I execute the following SQL statement in postgresql to create the temporary table and then add a PostGIS layer to qgis, the grid shows fine with all records returned as expected.               select       nextval('temp')::int as id,        st_setsrid(geom,2193) as geom     into         temptable      from         st_createfishnet(100,100,1000,1000,1645375,5349447);      I've used both of these plugins before for doing on-the-fly calculations in postgis and displaying in qgis - usefully eliminating the need for temporary tables. Is there a bug in them that is being triggered by this specific query? Or am I doing something wrong that I just can't see? Using Quantum GIS 1.8.0 ; Postgresql 9.1 ; PostGIS 2.0 EDIT: clarified that I'm only running one statement in the plugin, without the create sequence command


How do I get Geoserver to run on my Webserver?

Thanks to iant, dariapra, RK, & rangvald, as the combination of setting up the Geoserver Proxy in the interface, and making changes to the Apache & Tomcat worked. I can now click on the Open Layers and a new window pops up with a blank image within the map surrounding box, all within out IP Address. So, Solving one issue raised another. I now need more assitance to fix the new pop up window (after I click the OpenLayers from the Layer Preview pane) in order to show the map that is to be displayed. Within the window, there is the bounding box, text in the bottom left hand corner "Click on the map to get feature info" as well as the bottom righ hand corner "location", and in the IE window, the bottom left identifies a yield sign with paper behind it saying "errors occured". Is there a way to set this up so the map shows wihtin the new pane after clicking the OpenLayers? Again, thank you to those who have assited me. My initial question was: How do I configure Geoserver to show my shapefiles/maps on my Webserver(a specific location as http://www.name.net/geoserver) at work, and not on the localhost:8080? The web server is running Apache and also tried the Tomcat install. Any help is greatly appreciated.


How to split two interscting polygons by the average linestring of the shared area (QGIS / python shapely)

I have two polygons, > POLYGON((-5 -5,-5 5,5 5,5 -5,-5 -5)) POLYGON((1 1, 1 7, 7 7, 7 1, 1 1)) and wish to split them evenly. The result should be a split along the red marked line. I'm using qgis/ python shapely and wish to do it using python. ![LINESTRING\(1 5,5 1\)](http://i.stack.imgur.com/QdWWu.jpg)


OpenLayers zoom to Boundingbox depends on lat/lon positions

I'll try to explain my application and the problem. My application gets a position for a zip code and receives a Lat/Long position, then I'm looking for all points around this position and show them.(This works fine) Now I want to try to show a user his zipcode position at the center of the map, but I also want to specify the correct zoom level, so that the user can see all points around this point. (it's not limited by the distance) Is this possible? My minLat,maxLat,minLng,maxLng looks like this :               Array ( [minLng] => 8.381 [maxLng] => 9.15259 [minLat] => 49.5103735 [maxLat] => 50.06762 )      Edit: -HTML:               map.setCenter(new OpenLayers.LonLat(center.lon,center.lat) // Center of the map                 .transform(                     new OpenLayers.Projection("EPSG:4326"), // transform from WGS 1984                     new OpenLayers.Projection("EPSG:900913") // to Spherical Mercator Projection                     ), config.zoom // Zoom level                 );         map.zoomToExtent(new OpenLayers.Bounds(config.bounds.minLng,config.bounds.minLat,config.bounds.maxLng,config.bounds.maxLat).transform(epsg4326));      I have added the html of the function.


Couldn't load SIP Module

After reinstalling QGIS, the desktop program runs but generates the python error "Couldn't load SIP Module Pythin support will be disabled" Because of this error, no plug-ins will load. I found a couple of descriptions of a similar problem on-line, which recommended: sudo apt-get install python-sip4 sudo apt-get install python-qt4 Neither of these worked, and in fact neither even returned an installation candidate. Note that the error reports that recommended these were at least 1 year old, or older. I installed SIP from this source http://www.riverbankcomputing.com/software/sip/download and confirmed its installation, but QGIS continues to generate the same error. System details: OS: Xubuntu 12.04 with Xcfe desktop QGIS: 1.8 Python: 2.7.3 SIP: 4.13.3 Any help would be greatly appreciated.