texts: Style OpenLayers 3 cursor when drawing shapes

texts:
I have a feature that allows a user to draw a square or rectangle on an OpenLayers map. I would like to change the style of the cursor. The cursor is, by default, a blue circle. I would like to change it to a square so the symbology matches the shape that the user may create.

The solution involves adding a style attribute. I need the specifics of how to implement the style attribute for a non-image cursor that is like the default blue circle but instead, a square.

$scope.drawBoundingBox = () => {
    const bbVector = new ol.source.Vector({ wrapX: false });
    const vector = new ol.layer.Vector({
      source: bbVector
    });
    bbVector.on("addfeature", evt => {
      $scope.coords = evt.feature.getGeometry().getCoordinates();
    });
    const style = new ol.style.Style({
      stroke: new ol.style.Stroke({
        color: "#FFF",
        width: 3
      }),
      fill: new ol.style.Fill({
        color: [255, 255, 255, 0]
      })
    });
    const geometryFunction = ol.interaction.Draw.createRegularPolygon(4);
    draw = new ol.interaction.Draw({
      source: bbVector,
      type: "Circle",
      geometryFunction
    });
    vector.set("name", "boundingBox");
    vector.setStyle(style);
    map.addLayer(vector);
    map.addInteraction(draw);
  };


texts: Tool to save own color table with CMYK, GRB and HSL

texts:
Im looking for a tool to save my colors with CMYK, RGB and HSL. So that I can print and compare, write some notes to every color and easy extract.  Any idea?

Im mainly using Inkscape, Gimp and QGIS on xUbuntu. Its for maping purpose.


texts:
I'm an absolute QGIS beginner (only used it once before for a class) but I am trying to make a cluster map with data coming from a witch trial in Switzerland. Effectively, each time a location is mentioned in the trial, I recorded the location. I want my map to have different icons based on the number of mentions of each space across the length of the trials.
This question shows what the end result for me would look like: Point Cluster in QGIS and Legend
However, I cannot seem to get the data on the number of mentions to appear on the map.
I have uploaded the location data as a .kml file from Google Earth. The map looks like this:

I then open the attributes table and add a "weight" field, and input the number of mentions made of each location

However, once I do this, the following error message appears, and the value I have inputted has disappeared:

Could anyone direct me to a solution here?
I am a true beginner with the software and really have no experience with troubleshooting these issues.


texts: about token based authentication security

texts:
I am reading the authenticated services with token. I understand that a user have to get a token to using arcgis services.
Example: https://domain.com/arcgis/rest/services/myMap/MapServer is my service.
My server administrator give me a token like this. Token = AJSJK876548sjjs7

And I used this service in my javascript api like this
https://domain.com/arcgis/rest/services/myMap/MapServer?token=AJSJK876548sjjs7

A user can view my application source from browser and can get my token. And He/She can access my service.
Is this a security problem?


texts: Nowadays i'm using Mapscript and C# to generate and display a Mapfile, but in this way i need to create manualy the interface, is there any way to use Mapscript + Openlayers?


texts:
I used QGIS 3.2 Bonn and suddenly, and I don´t know why, the mouse pointer never stops rotating as the project is in work. It is still possible to click and select things like it is possible with the arrow pointer.
I installed the new version 3.6 now but the pointer remains busy. I deleted the folders c:/user/computer/.qgis but the pointer is still busy.
Any ideas how to solve this problem?


texts: Changing Map Coordinate System Changes in ArcGIS Pro Changes Azimuth

texts:
I am trying to create a label that will overlay a line in ArcGIS Pro, the layer is coming from a PostGIS database. The underlying materialized view for the label/symbol overlay is something like this:

SELECT
   label,
   degrees(public.ST_Azimuth(public.ST_StartPoint(public.ST_UNION(geom)), public.ST_EndPoint(public.ST_UNION(geom)))) AS Azimuth,
   geom
FROM
   TABLE

In ArcGIS Pro the label overlays perfectly initially:

Then I go to the Table of Contents and under map properties change the map's coordinate system from lat/long to Web Mercator Auxiliary Sphere:

Then ArcGIS Pro puts the label at the wrong angle and at an odd offset:

This phenomenon is localized to certain areas of the globe. It seems to me that the offset makes no sense. I have tried projecting the line geometry into Web Mercator (srid: 3857) using ST_transform and getting the azimuth using ST_Azimuth and the azimuth angle changes but still isn't right.

Shouldn't ArcGIS Pro at the very least reproject the the point on the line and shouldnt it match the azimuth if I calculate it in Web Mercator in PostGIS?


texts: How to detect traffic incidents in set of GPS traces?

texts:
I have a large database of gps traces (long, lat, timestamp) and would like to see if I can detect when congestion occurs on roads from that data.

Any ideas or pointers on good algorithms to use?

I've seen loads of stuff using fixed point collectors (ANPR systems, video cameras, infra-red detectors, etc) but not from GPS traces.


texts: Qgis 2.8.9-Wien Attribute table Update Fields Error

texts:
I can't update fields in the Attribute table. I get an error when I select Update All and Update Selected:

An error occurred while evaluating the calculation string:
No root node! Parsing failed?

Instead I have to open Field Calculator/Select the field/re-enter the function/and hit OK for the field to be updated in the Attribute table. I can work with this but it's frustrating!


texts: Unable to connect to Azure SQL from ArcMap 10.6

texts:
I am trying to connect to Azure SQL MI from ArcMap 10.6,
But I am getting this error while trying to connect

I have tried to installing the newest ODBC driver (version 17) but still doesn't work.
What might be wrong ?
P.S : The connection succeeded when using ArcGIS Pro version 2.5


texts: Problem with CRS metadata for UK Environment Agency LiDAR DSM tiles?

texts:
I have downloaded some LIDAR DSM composite tiles from
https://environment.data.gov.uk/DefraDataDownload/?Mode=survey
and opened them in QGIS 3.6 with project CRS set to OSGB 1936 (EPSG:27700).

However, the tiles are floating off the coast of West Africa, when I check the metadata for 'extent' there is none. Does anybody know how to fix this?


texts: Verticies Error Using pgr_pointsaspolygon

texts:
I am doing the service areas analysis of hospitals.
With the creation of areas I bumped into a problem with the pgr_pointsaspolygon function.

it returns the error:

ERROR:  Less than 3 vertices. Alpha shape calculation needs at least 3 vertices.

CONTEXT:  PL/pgSQL function pgr_pointsaspolygon(character varying,double precision)
line 17 at FOR over EXECUTE statement

11 service areas of 60x60 (1hr) only contain 2 vertices, this is cause for the whole function not to work.

How can I solve this? Can the function be edited? are there alternatives?


texts: Getting Null value error with Python Parser in field calculator?

texts:
I'm trying to calculate the angle between two line segments in ArcMap 10.0. I have a point shapefile, so I'm using the xy coordinates of 3 successive points to calculate the angle. I'm trying to use Python in the Field Calculator, because I'm not good with Python and I'm not sure how to use the Python window. I finally got my code to work, but encountered an error when two successive points have the exact same coordinates. This creates a null value, and I get the error "The field is not nullable". I tried to put in an if statement to change nulls to 0s, but I still get the same error. I'm not sure if I'm identifying null values correctly, though, because I've found conflicting ways to represent them, and have tried "None" and ' ' and "Null" to no avail. It seems like there should be some way to just replace the angle value with 0 if the calculation returns a null value.

Does anyone have any ideas on how to get past the null values?

My code is below.

Record = 0
def turnangle(X3, Y3):
  import math
  global X1, Y1, X2, Y2, Record
  if Record == 0:  #first two rows aren't calculated
    angle = 0
    X1 = X3
    Y1 = Y3
  elif Record == 1:
    angle = 0
    X2 = X3
    Y2 = Y3
  else:               #calculating angle
    BAx = X1 - X2
    BAy = Y1 - Y2
    BCx = X3 - X2
    BCy = Y3 - Y2
    dotprod = BAx * BCx + BAy * BCy
    lenA = math.sqrt((X1-X2)**2+(Y1-Y2)**2)
    lenB = math.sqrt((X2-X3)**2+(Y2-Y3)**2)
    angle = math.acos((dotprod)/(lenA*lenB))*180/math.pi
    X1 = X2       #advancing to next coordinates
    Y1 = Y2
    X2 = X3
    Y2 = Y3
  Record = Record + 1
  if angle is not None:  #Here is where I'm trying to substitute 0 for null values
    return angle
  else:
    return 0


texts: Creating heatmaps with small radius in QGIS?

texts:
I am trying to visualize a set of pois on a map with the qgis heatmap plugin.

It works great with a big radius but the layer is invisible for a small one (around 100 meters). I really need a small radius as I want to be able too zoom and see local results.

How can I do?


texts: In SLD, how do I add a string to a label describing a property?

texts:
Using Geoserver, is there any way that I can add a predefined string: "No. "
to a property: postalnumber?

<sld:Label>
<ogc:PropertyName>postalnumber</ogc:PropertyName>
</sld:Label>


texts: Creating custom maps for Garmin Oregon 600

texts:
I have a Garmin Oregon 600 GPS receiver and a map I made in QGIS. Where can I find a step-by-step guide to getting this map onto my GPS unit? A static JPEG or PNG map is fine since I'm not interested in keeping connections to the map / feature services from the field; no cellular service or wi-fi anyway.

I could create the map in ArcMap 10.3 or ArcGIS Pro if that makes life easier but my preference is to leave it in QGIS.


texts: ArcGIS Flex API: Loop thru map graphics and make them visible

texts:
Using the flex viewer 2.4 and Flex 4.5 SDK.
I have a bunch of map graphics stored in a map layer. Initially, each graphic is set to visible = false. At the click of a button, I want to loop over each graphic, set it to visible = true, wait three seconds, then onto the next graphic and do the same.

Problem:  the graphics don't become visible in the loop - they become visible all at once after the button click event handler has returned.

I've tried doing a refresh() on the graphics and the graphic layer in the loop, but that does not help.

Any ideas?

Thanks.


texts: I am currently having a problem importing SegY files into QGIS. Following the 2.14 update, SegY compatibility should be available to bring in the navigation stored within the file as a vector layer. Has anyone else had problems importing these files? It never seems to work despite being a support GDAL layer. Any ideas as to why this might occur?


texts: Batch mode results in offset/incorrectly aligned raster

texts:
I've got a vector grid with a cell size of 4129,24 m x 4129,24. Every cell has an integer value called numpoint. I want to create a raster and continue working with it since the grid is very big and it makes no sense storing these data as vector data. I need the raster to align exactly with my vector grid.

Now I used gdal Rasterize (with the QGIS Processing Toolbox Interface) to rasterize the data. This works fine. Here is my input:

gdal_rasterize -a NUMPOINTS -ot Float32 -of GTiff -te 5834437.693
3586821.37347 7225991.573 4557192.77347 -tr 4129.24 4129.24 -co
COMPRESS=DEFLATE -co PREDICTOR=1 -co ZLEVEL=6 -l UCDP_total_vectorgrid_4129m
"D:\\MyPath\\UCDP_total_vectorgrid_4129m.shp" "[temporary file]"

-te corresponds to the extent I want, -tr defines my resolution, and everything works just fine:

Since I've got a lot of vector grids, I wanted to do the same thing using the batch mode of gdals Rasterize (right click, execute as batch process in the processing toolbox):
Here are the settings:

The extent is not fully readable, but it is:
    5834437.693,7225991.573,3586821.37347,4557192.77347. (The same values as used above, entered by QGIS according to the raster extent)

Now the result does not align with my vector grid:

So as far as I can see, I did the same thing, once as a batch process and once using the QGIS GUI, and got different results.
Any ideas?

ah, yes, the CRS was the same for all layers.


texts:
I have been trying to access WorldClim data for several days now, without success. Neither browser-based download nor getData() works in my case.

I have tried various end devices, on various networks, even the phone. Seems the server is not accessible. A post in their Contact form keeps unresponded since days.

Does anybody experience the same?

Specifically, to download current data you would visit http://worldclim.org/current
Trying to download the, say, 10 min resolved tmin data should result in saving http://biogeo.ucdavis.edu/data/climate/worldclim/1_4/grid/cur/tmin_10m_bil.zip to your computer. However, each attempt with any file results in a request timeout error.


texts:
I am creating a GUI for input of PLSS data (Township, Range, Section).
There will be 5 pull down or spinner components:
Township, North/South, Range, East/West, Section
The North/South component will have 2 selections: North, South
The East/West component will have 2 selections: East, West
The Section component will have numbers 1-36
What are the range of numbers for Township and Range?
This is the meridian of concern
https://en.m.wikipedia.org/wiki/New_Mexico_meridian


texts:
Is there a way in QGIS to figure out the direction of a polygon, if there are no values given? What I need to know is if a polygon is directed to the south.

I want to know the direction of a house because of a solar research. I want to say if the longer side of a house is directed to the street and this direction is south or north or west or east.


texts: extract raster value interactively in QGIS

texts: How to extract (interpolated) raster values interactively ? i.e. using the mouse to click on a specific map location (lat/long) and get the value from the selected raster.


texts:
Is it possible to set map extent to be displayed on mapbox ?
If so could you please send me an example ?


texts:
I have a data table mapped and the table also contains further information of interest, beyond the lat/long of the specific data points.

I want to be able to draw a polygon and then simply have a count of records included in the area and also the sum of one of the other columns.  This is likely a trivial task, but I'm very new with little time for this project.
if get the above figure out, what is the best way to save a 'scenario' (the polygon area drawn and the results) so that I can experiment with differ scenarios?


texts: Zooming MapControl (Arcgis) doesn't effect?

texts:
I am trying to use the Zoom commands (Zoom In, zoom out) for a MapControl. But it doesn't make "Text elements" bigger (larger) or smaller. Please see my image.

I used the below function to add a text into MapControl:

public void AddTextElement(AxESRI.ArcGIS.Controls.AxMapControl map, IPoint point, string strText, string fontName, int size, double degree, short weight)
        {
            IGraphicsContainer pGraphicsContainer = map.ActiveView.GraphicsContainer;
            ITextElement pTextElement = new TextElementClass();
            IElement pElement;
            IRgbColor pColor;

            IFontDisp pFont = new StdFontClass() as IFontDisp;
            pColor = new RgbColorClass();
            pColor.Red = 0;
            pColor.Green = 0;
            pColor .Blue = 0;
            pFont.Name = fontName;
            pFont.Weight = weight;
            pFont.Size = size;

            IFormattedTextSymbol formatTextSyl = new TextSymbolClass();
            formatTextSyl.Font = pFont;
            formatTextSyl.HorizontalAlignment = esriTextHorizontalAlignment.esriTHALeft;
            formatTextSyl.Angle = degree;

            pTextElement.Text = strText;
            pTextElement.Symbol = (ITextSymbol)formatTextSyl;

            pElement = (IElement)pTextElement;
            pElement.Geometry = (IGeometry)point;

            pGraphicsContainer.AddElement(pElement, 0);
            IActiveView activeView = map.ActiveView;
            activeView.PartialRefresh(esriViewDrawPhase.esriViewGraphics, null, null);
}

Are there something wrong ?


texts: What is an appropriate scale and numPixels for unsupervised classification in google earth engine

texts:
I am trying to do an unsupervised classification based on a sentinel-2 composite. However, I am running quickly into time out and maximum memory problems. I am sure that it has to do with the scale and the numPixels. Looks like I don't really understand the combination of the two and what the sample function really does, since to me a sample of 500 pixels and a scale of 15 should be fine?

var roi = ee.Geometry.Point([126.49, 72.38]).buffer(55000);
Map.setCenter(126.49, 72.38, 8);

var sent2 = ee.ImageCollection("COPERNICUS/S2")
    .filterDate('2018-07-01', '2018-09-15')
    .filterBounds(roi)

var gsw = ee.Image('JRC/GSW1_0/GlobalSurfaceWater');

var extentGSW = gsw.select('occurrence')
  .clip(roi)
  .unmask(0);

var addNDVI = function(image) {
  var ndvi = image.expression(
  "(NIR - RED) / (NIR + RED)",
  {
    RED: image.select("B4"),
    NIR: image.select("B5"),
    BLUE: image.select("B2")
  }).rename('ndvi');
  return image.addBands(ndvi);
};

var withNDVI = sent2.map(addNDVI);

// Mask water
var masked = withNDVI.map(function(img) {
 var mask = extentGSW.lt(50)
 var maskNDVI = img.select('ndvi').gt(0.025);
 var QA60     = img.select('QA60');
 var clouds   = QA60.bitwiseAnd(1<<10).or(QA60.bitwiseAnd(1<<11));
 return img.updateMask(mask).updateMask(maskNDVI).updateMask(clouds.not());
});

var greenest = masked.qualityMosaic('ndvi');

Map.addLayer(greenest.select('ndvi').clip(roi), {min:  0, max: 0.3, palette: ['#8bc4f9', '#c9995c','#c7d270', '#8add60', '#097210']}, "ndvi");

// unsupervised classification

var training = greenest.select("B2", "B3", "B4", "B8", "B11", "B12", "ndvi").sample({
  region: roi,
  scale: 15,
  numPixels: 500
 });

var clusterer = ee.Clusterer.wekaKMeans(10).train(training);
var result = greenest.cluster(clusterer);

Map.addLayer(result.randomVisualizer(), {}, 'clusters');


texts: How to export thousands of features from PostGIS to a single GeoJSON file?

texts:
I know how to export one feature from a PostGIS database using ogr2ogr:

$ogr2ogr -f GeoJSON out.json "PG:host=localhost dbname=xxx user=xxx password=xxx"
 -sql 'select id, county, wkb_geometry from cities where id=47927526'

This produces a nice GeoJSON file with one feature. But how can I run this query for thousands of IDs and produce a single file?

Currently my approach is to produce many GeoJSON files and glue them all together, but I'm wondering if there's a better way?


texts: Combining two SpatialPolygonsDataFrame objects in R

texts:
I am an ArcGIS user trying to get to grips with R and the way it handles spatial data.

I've got two spatial data objects:

class       : SpatialPolygonsDataFrame
features    : 1
extent      : 0.1353, 0.1376, 51.5668, 51.5678  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0
variables   : 2
names       : X_leaflet_id, feature_type
value       :           81,      polygon

and

class       : SpatialPolygonsDataFrame
features    : 1
extent      : 0.1386686, 0.1392818, 51.56686, 51.56768  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0
variables   : 6
names       :            NAME,   CODE, Shape_Length,  Shape_Area,            Attrib1, Attrib2
value       : Example polygon, CodeP1,  0.002631075, 3.91693e-07, My first attribute,     999

Note that the attributes of these objects are different. In my final analysis I will add attributes to the first object to align with the second.

How can I append or bind the first polygon as a record to the second, as an individual row? Note I'm not trying to do anything clever here, like a spatial analysis such as point in polygon. I just want to append the first polygon to the dataset that the second is held in, and I can't find out how.


texts: Error when executing maxent algorithm with categorical variable

texts:
I tried to use maxent algorithm where I have categorical variable as follow :
mod <- dismo::maxent(x=env, ## env conditions ( rasterstack)
                     p=Pre_final,   ##(SpatialpointsDataFrame)
                     a=bg_ALL, #(SpatialpointsDataFrame)
                     args = c('outputformat=cloglog',
                         'autofeature=true',
                         # 'linear=false',
                         # 'quadratic=false',
                         # 'product=false',
                         'threshold=false',
                         # 'hinge=false',
                         'betamultiplier=1',
                         'responsecurves=true',
                         'jackknife=true',
                         'writeplotdata=true',
                         'askoverwrite=false',
                         'writebackgroundpredictions=true',
                         'writemess=false'),
                       factors='Cartes_distances_Routes'
  )

but I keep getting this error:
Error in [.data.frame(x, , f) : undefined columns selected
When I remove the argument "factors" I turn it without errors but I have to declare the categorical variable.


texts: Displaying single band from multi-band raster using QGIS

texts:
How can I extract a single band from multi-band raster in QGIS?

I have an remote sensed image which has 6 bands (including NDVI band), I want to display each band separately, but have no idea how to do. I have seen some questions similar here but none worked for me.

The original image (has 6 bands) is:

I want to display the band 6 which should be like this:

But I tried gdal_translate, and couldn't get the correct result.

What I have got is:


texts:
I have a shapefile with only one polygon. There is something that I'd like to remove, some "almost line polygons" that are there, as you can see in the picture below:

How can I do that? I can move it to a PostGIS db or use Python if necessary.


texts: Measure distance between nearest points in the sea along the coast automatically in ArcGIS

texts: I have global point data of marine species along the coast. I would like to measure the distance between the two closest points but this distance needs to be measured in the sea and not on the land mass. Attach is an image that may explain my point. I am using ArcGIS 10.6.


texts: How to Get my Custom Toolbar to popup when my Custom Extension is Enabled?

texts:
I am developing a custom extension for ArcMAP in Arcgis 10, and would like to display my Custom Toolbar automatically instead of having the user to select it from the customize window. Is this possible?

Further more is it possible to hide the toolbar, when the extension is switched off from the Extensions window?


texts: convert vector with multiple attributes to multiple rasters

texts:
I have a vector polygon feature with multiple attributes/fields. Ultimately, I want to convert it to a raster 'stack,' whereby each of the attributes/fields will be a different band of the raster feature. What is the best way to do this in as few steps as possible?
platforms: QGIS 1.8 lisboa.


texts:
I published a layer as a WFS on 10.3 server, but when I bring the service into ArcMap via the Data Interoperabiloty Extension, the symbology is lost and the set scale range when to display the data is lost.

How can I preserve these parameters (I did set these parameters prior to publishing)?


texts: Creating polygons of specific slope percentage from a slope raster in QGIS

texts:
I am trying to extract all areas where the slope is greater than 20% and then turn those areas into a polygon.

I'm using QGIS 3.0.2.


texts: ArcGIS Javascript API - Limit Map extent to a 100 mile radius

texts: I'm using ArcGIS JavaScript API 3.24 and im displaying the location of a lat/long and displaying features of a feature layer with 50 miles of that lat/long. Is there way to limit the extent to a 100 mile radius of the lat/long. I have seen ways of limiting the extent for US but how to limit the extent dynamically based on location. I'm now sure how to calculate the extent on the fly for a 100 mile radius and then use those values to limit the navigation.


texts: Error in CMAKE while building QGIS 2.8 (32 bit) from source in Windows 8 (64 bit)

texts:
I am following this tutorial to build QGIS from source.
The CMAKE dump is as below.

-- QGIS version: 2.8.3 Wien (20803)
-- Found GRASS: c:/OSGeo4W/apps/grass/grass-6.4.4 (6.4.4)
-- Found Proj: C:/OSGeo4W/lib/proj_i.lib
-- Found GEOS: C:/OSGeo4W/lib/geos_c.lib (3.4.2)
-- Found GDAL: C:/OSGeo4W/lib/gdal_i.lib (1.11.2)
-- Found Expat: C:/OSGeo4W/lib/libexpat.lib
-- Found Spatialindex: C:/OSGeo4W/lib/spatialindex_i.lib
-- Found Qwt: C:/OSGeo4W/lib/qwt.lib (5.2.1)
-- Found Sqlite3: C:/OSGeo4W/lib/sqlite3_i.lib
-- Found PostgreSQL: C:/OSGeo4W/lib/libpq.lib
-- Found SpatiaLite: C:/OSGeo4W/lib/spatialite_i.lib
-- Found Qt version: 4.8.6
-- Touch support disabled
-- Found QScintilla2: C:/OSGeo4W/lib/qscintilla2.lib (2.8.4)
-- Pedantic compiler settings enabled
-- Found Python executable: C:/OSGeo4W/bin/python.exe
-- Found Python version: 2.7.4
-- Found Python library: C:/OSGeo4W/apps/Python27/libs/python27.lib
-- Found SIP version: 4.16.5
-- Found PyQt4 version: 4.11.3
-- Found QScintilla2 PyQt4 module: 2.8.4
-- Found QwtPolar: C:/OSGeo4W/lib/qwt.lib
-- Found GSL: C:/OSGeo4W/lib/gsl.lib;C:/OSGeo4W/lib/cblas.lib
-- txt2tags not found - disabled
CMake Warning (dev) at cmake/SIPMacros.cmake:131 (GET_TARGET_PROPERTY):
  Policy CMP0026 is not set: Disallow use of the LOCATION target property.
  Run "cmake --help-policy CMP0026" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  The LOCATION property should not be read from target
  "python_module_qgis__core".  Use the target name directly with
  add_custom_command, or use the generator expression $<TARGET_FILE>, as
  appropriate.

Call Stack (most recent call first):
  python/CMakeLists.txt:141 (ADD_SIP_PYTHON_MODULE)
This warning is for project developers.  Use -Wno-dev to suppress it.


texts: How to split kml file or extract Placemarks?

texts:
I have a file of state 2001 assembly districts outlines, from http://goo.gl/dJPyx in Mapinfo MIF format.  I've created a kml file from that using ogr2ogr.  These are the outlines of each assembly district.  In the kml file each assembly district outline is inside a Placemark tag.  I want to put the kml outlines in Google Fusion Tables but I need them split up so that each assembly district outline (Placemark) is in a separate kml file.

It looks like I might be able to do it with xslt but I was wondering if there is a more direct way to do it.  Or perhaps split the mif file first.

I'm also worried about splitting the xml file using xslt because there are a bazillion coordinates, as one very very long line, between the coordinates tag down inside the Polygon tag.


texts:
I have a project with several shapefiles. The files overlapping however. I have to go to unusable extents to even see the file on the same screen. I have tried using to project to as suggested here to now avail.

Any ideas?

I have created a public github repo here with the project


texts: How to do a union and specify that polygons must be greater than a certain area (e.g. 0.1 acres or greater)

texts:
I am doing a Union (or possibly an identity) of several polygon layers.   I want to the result to contain only polygons .05 acres or greater,  but do not want to eliminate any area.

How do I proceed?

I've tried Unioning and increasing the tolerance,   but it's iterative and time-consuming.


texts: Service Area Default Breaks: Single vs Multiple Breaks

texts:
I have created a road network dataset, loading my facilities, and am running network analyst to identify services areas.

Polygon Generation for all versions is set to Detailed,Trim, 100 meters, Merge by Break Value, Disks.

For some reason, if I ask for one specific break, I get a different polygon generation than if I had done multiple breaks.

Both lines showing are the 7 minute break, so it's not a matter of choosing the wrong break.

Any idea as to why the service area would change if I specify a single break versus multiple breaks and only showing one break from that group?


texts: Converting from an x-y coordinate system to latitude/longitude

texts:
I'm building an indoor wifi-based tracking system that can calculate the position of a device in meters relative to the sensors distributed throughout the building. So far I've gotten to the point where I have the ability to sense the device and trilaterate its position on an arbitrary x-y grid (in meters) where the sensor locations are known, but now I need to output that to Google Maps for display. I'm stuck trying to figure out how to convert this system to latitude and longitude, and be accurate to within a meter. I've seen some estimations people have used for such applications, but they're plotting on a much larger scale so an error of 10m or so is acceptable. In my case, 10m would make the data completely unusable.

Is there an easy way to make this conversion? I can find the lat/lon of the sensors, but I don't know where to go from there. My equations are based on a point-coordinate system, so I can't use a vector system or other method without redesigning everything.


texts: Leaflet - How to show feature properties in a box that is not a popup?

texts:
Popup giving features properties are interesting but I would like to make a side bar where properties of a clicked feature would show.

I've got the traditional code for displaying geojson features using jquery :

 $.getJSON("${resourcesFolderName}/VergueParis.geojson",function(data){
        //Def icons
        var siteIcon = L.icon({
            iconUrl: '${resourcesFolderName}/eye.svg',
            iconSize: [30,30]
        });
        var siteIcon2 = L.icon({
            iconUrl: '${resourcesFolderName}/eye2.svg',
            iconSize: [30,30]
        });
        var siteIcon3 = L.icon({
            iconUrl: '${resourcesFolderName}/eye3.svg',
            iconSize: [30,30]
        });

        L.geoJson(data  ,{
            pointToLayer: function(feature,latlng){
             var marker = L.marker(latlng,{icon: siteIcon});
            marker.bindPopup(''+ '
' +'' + '
' + feature.properties.Titre + '
' + feature.properties.Annee);
            return marker;
            return L.marker(latlng,{icon: siteIcon});
            },
            //Change icon on Rollover
            onEachFeature: function(feature,layer)
            {
            layer.on("mouseover",function(e){
                layer.setIcon(siteIcon2)
            });
            layer.on("mouseout",function(e){
                layer.setIcon(siteIcon)
            });
            //End change on rollover
            }
        }).addTo(hypeDocument.map).on('click', markerOnClick);
    });

And the associated markerOnClick function :

function markerOnClick(e) {
        alert("hi. you clicked the marker at " + e.latlng);
        var newinnerContent = 'Title of the feature :';
        hypeDocument.getElementById("Rectangle").innerHTML = newinnerContent;
        hypeDocument.continueTimelineNamed('Rectangle', hypeDocument.kDirectionForward)
    };

Note : the 'Hype' reference relates to a software i'm using to create my map.

Alert function works and I'd like to display the feature property "Titre" just after the above phrase "Title of the feature :"

I tried different approaches but nothing works.

Any idea would be welcome.


texts: Is it possible to project an ArcGISDynamicMapServiceLayer using the JS API?

texts: I need to project some dynamic layers to Web Mercator. The geometry service only projects geometries. Is there a geo-processing tool in ArcMap for this? Or any suggestions how i could do this without altering the map services.


texts: ModelBuilder for listing and exporting GDB contents

texts:
I currently generate a list of the feature classes in a gdb using a submodel with a feature class iterator and use Collect Values to make a multivalue list of the fc names.

My problem comes with trying to send the list to Conversion Tools-->To Shapefile-->Feature Class To Shapefile (multiple) as it only accepts Feature Layers as input.  I am unable to figure out how to manufacture multiple feature layers from the Collect Values output parameter from the submodel.


texts: Batch export ImageCollection Error on Earth Engine editor

texts:
Here is my script on Earth Engine editor below
exports.export_imgCollection_raw = function(imgCol, region, Name){
  var indexList = imgCol.reduceColumns(ee.Reducer.toList(), ["system:index"])
                        .get("list");
 indexList.evaluate(function(indexs) {
    for (var i=0; i<indexs.length; i++) {
      var image = imgCol.filter(ee.Filter.eq("system:index", indexs[i])).first();
      // image = ee.Image(image).toFloat();
      var id_slashIndex = ee.List(indexs).getString(i).index('L');
      var id = ee.String('delta_').cat(Name).cat('_').cat(ee.List(indexs).getString(i).slice(id_slashIndex)).getInfo();
      Export.image.toDrive({
        image: image,//.clip(region),
        folder: 'delta',
        description: id,//indexs[i],
        fileNamePrefix: id,//indexs[i],
        region: region,
        scale: 30,
        // crs: "EPSG:4326",
        maxPixels: 1e13,
        fileFormat: 'GeoTiff',
      });
    }
  });
}

Some images of a ImageCollection can be exported when the other meet the same Error: Error:image.setdefaultprojection: parameter 'image' is required.
Then comment the arg (crs: "EPSG:4326"), but another error occurs in some of images again: Error:image.clipToCoundsAndScale: Parameter'input' is required.
It seems that all hints link to these images, but they actually have non-null pixel value after Map.addLayer().
This batch script works well before, I try to export an imageCollection of 206 images to Drive this time.


texts: Getting Leaflet.Control.Layer.Tree 'children's' to collapse by default?

texts:
I am using the Leaflet layer.control.tree plugin from here : https://github.com/jjimenezshaw/Leaflet.Control.Layers.Tree

But I can't figure out how to collapse the branch by default. Now it looks like this:

does anybody know how to close the branch by default?

I do not mean the whole layer control that collapses by default I mean the tap where it says '' Warrior ''


texts: Unsupported Data Source: ...Tennessee.tif.xml is not a supported raster data source

texts:
I am new to QGIS, and when trying to load a raster file I get this error:

Unsupported Data Source: C:\Users\JAML\Desktop\TN_NLCD\NLCD2011_LC_Tennessee.tif.xml is not a supported raster data source

The raster is NLCD land cover data for the US, which I have used in ArcMap10 just fine.


texts: Retreiving Map from MapDocument is Slow (ArcObjects 10.3)

texts:
I am designing a small ArcObjects (10.3.1) .Net Desktop Application that analyzes an .mxd for sde layers with broken connections and if possible fixes them. Everything works fine, however when retrieving the first Map from the MapDocument class via  _pMapDocument.get_Map(i) it can be incredibly slow (where _pMapDocument is my MapDocumentClass object).

In trying to problem solve this I used the advice on the ArcObjects documentation page here, for initializing the ActiveView before working the the Map object.

  When opening or creating a map document with the IMapDocument Open()
  or New() methods, you should always make subsequent calls to
  IActiveView::Activate() in order to properly initialize the display of
  the PageLayout and Map objects.

I found that if I call _pMapDocument.ActiveView.Activate(0) before retrieving the Map this call also can be incredibly slow but the subsequent call _pMapDocument.get_Map(i) is very fast.

Is it possible to retrieve the Map object in a faster way? And/or is there a way to identify a MapDocument that may take a long time to access its Map so that I can avoid hanging up my program? I have also tried circumventing the Map object as I just want to get the layers with _pMapDocument.Layer[i, j] but this also takes quite sometime on the first call. Many of the .mxds I am trying to fix are quite old, e.g. created from previous ArcMap versions 10.1, 10.2, etc., and I am wondering if this is an issue. Additionally I am a bit worried that the thing I am trying to fix, broken sde layers, is what is slowing down the retrieving of the map as perhaps when the map is opening it is continually looking for sde connections that no longer exist.

A more complete code snippet is listed below:

using ESRI.ArcGIS.Carto;

_pMapDocument.Open(sFilePath);
for (int i = 0; i < _pMapDocument.MapCount; i++)
{
    var pMap = _pMapDocument.get_Map(i);
    ILayer pLayer;
    for (int j = 0; j < pMap.LayerCount; j++)
    {
        pLayer = GetLayers(pMap.Layer[j], _dtLayers,  ref j);
    }
}


texts: If-then expression in Mapinfo label expressions

texts:
Firstly this is similar to If-Then Label Expression BUT I need this for Mapinfo.

So I want to do the following in Mapinfo in the label expression box in ver 12.

if RuralAdd='R':
 address=St_No + " ; " + LotPlan
else
 address=St_No

Is this possible? without creating a new column with this info using SQL.

===== @T_Bacon suggested I get the following but the lots with 0 St_No_1 still get a O in it. My code is

St_No_1+Left$(Chr$(13)+LOTPLAN, Len(LOTPLAN)*Int(Suf_No_1="R")*Int(St_No_1<>0))

output is


texts:
I have a fishnet that defines my zones for my analysis, and am interested in the area of different hydrologic soil groups (A, B, C, D) within these zones. Each soil group has a corresponding score (1, 0.65, 0.3, 0.05). I want to calculate a weighted average of the soil group scores for each zone. How do I go about doing this?

Soil groups within zones in watershed.


texts: GeoDataFrame to shapefile and open in ArcMap

texts:
I have a large csv with approximately 5 million records that have latitude and longitude coordinates that I tried converting to a shapefile with geopandas so I didn't have to hit my desktop ArcMap with that much information. My code is:
import pandas as pd
import geopandas as gpd
from shapely.geometry import Point

df = pd.read_csv('leases.csv')
geometry = [Point(xy) for xy in zip(df.longitude,df.latitude)]
df = df.drop(['longitude','latitude'], axis=1)
crs = {'init':'epsg4326'}
gdf = gpd.GeoDataFrame(df, crs=crs, geometry=geometry)
gdf.to_file(driver='ESRI Shapefile',filename="leases.shp")

This code runs fine and I get a point shapefile that I can load in ArcMap, but when I look at the attribute table, the records are getting messed up. One issue there are duplicate records showing up in the attribute table that don't exist, but the number of records is still correct. Another issue is in the picture below where records are just showing up incorrectly.
I have checked the csv and and none of these issues are in there. I'm trying to figure out if this is an ArcMap issue loading this, or a geopandas issue. I have tried running the code with just Arkansas by itself (about 165,000 records) and when I load that in ArcMap it is just fine and these issues don't occur.


texts: Right click editing menu disabled ArcGIS 10.0

texts:
Editing Polygon feature in FGDB, Create Features, Click Rectangle (in Construction tools), right click, unable to select any options (Absolute X, Y / Direction / Length) from popup menu.

Help? Haven't seen this one before.


texts: Arcpy reclassify all values to same number

texts:
Using ArcGIS 10.1 and arcpy, is there a way to reclassify all values of a raster file to the same value (leaving NoData Values as "NoData")? Lets assume that I have no way of knowing what the actual (i.e original) values are, so defining a RemapRange from a very small to a very large number would be rather inelegant.

Basically, i'm missing a third option in the arcpy.Reclassify() tool. "missing values" can left alone (= "DATA") or turned into NoData (= "NODATA"), but not reclassified to a certain value.


texts: Why do I get a gdal_translate error when creating ecw from tif

texts:
I have python 2.7 and the latest gdal 32bit core with also GDAL-1.10.1.win32-py2.7.msi and the ecw plugin on windows xp. I have checked that the ecw plugin works by checking the installed formats with gdalinfo --formats. When I try a simple tif to ecw translation I get this error:

Input file size is 157, 157
0ERROR 6: GDALDriver::Create() ... no create method implemented for this
format

Can anyone tell me why?


texts: Appending annotations changes the scale of the new annotation?

texts:
I am trying to append an annotation feature 1 (green)to another annotation feature 2(red). While these features are separate, I have the scale set to 1:4000, and the font size is correct.

However, once I append, or merge the annotations together, the annotation feature 1 suddenly changes in scale and the words appear to increase. When viewing the properties of the merged feature class, the scale still says it is 1:4000.

I have tried appending and merging the features and both have the same result. Is there any why of correcting this issue?


texts: How to get the type of the largest polygon inside a grid cell?

texts:
(1) I have a vector grid layer.

(2) I have a multipolygon layer. Each polygon has a specific type (in this case a vegatation type)

Now I want to get as an output the grid layer where each cell contains the type whose polygon (out of the vegetation - multipolygon layer) occupies the largest area.

Following figure shows the grid layer overlaping the multipolygon layer:


texts: QGIS: create layout with one map its attribute table per feature

texts: In QGIS I am trying to create a survey report with a map atlas so that they are both on single A4 page showing the attribute table per feature (with field headings) with a corresponding map of said one point feature. I have 800 features in the survey. The goal is to create 800 individual PDFs that have a map and attribute table of the individual feature. I can produce the maps but not with the table entry showing the one feature.


texts: QGIS - How to display item info on popup with a click

texts:
I have many items on different shapefile (parks, railways, buses...). Every shape as a join with an attribute table and each table contains data by line.

How can I generate a pop-up by clicking on the item with the related info?

I believe I do not use actions because all data are loaded in the QGIS project (but I can also link data from external sources). I am not able how to set query to show only the info related to the click.

I use QGIS 2.8 on windows


texts: OpenGeo Suite Dashboard not Showing Up on Windows 7 64-bit

texts:
I have installed OpenGeo Suite 3.1 on my machine (windows 7 64-bit) and I am encountering the following strange behaviour:
When I try to run the Dashboard, nothing appears! HOWEVER, the relative Process at the Task Manager, appears normally and is taking about 30MB of Memory!
Do you have any idea, what causes this strange behaviour?
Thanx in advance,
Petros Apotsos


texts: How to drill down through multiple polygons/points in QGIS?

texts: I have a layer that has multiple polygons sitting on top of each other, is there a way to easily scroll through those polygons that overlap each other?


texts: Load table with GEOMETRY column to Pandas DataFrame

texts:
I am trying to load table (from Postgres DB) with GEOMETRY column to Pandas DataFrame using pd.read_sql_table method. I am getting error becuase GEOMETRY type seem to be not supported:

C:\Anaconda3\lib\site-packages\sqlalchemy\dialects\postgresql\base.py:3010: SAWarning: Did not recognize type 'geometry' of column 'geometry'
  "Did not recognize type '%s' of column '%s'" % (attype, name)

Does anyone knows how to load such data to Pandas df? On Pandas Doc page for "read_sql_table" I don't see options to define data type.


texts: Problem adding Delimited Text Layer in QGIS 2

texts:
I have a tab delimited text layer (text file created by excel for Mac) that I have used in QGIS 1.8 without problem.

When I try to add the same layer, from the same text file, in QGIS 2.0 the Add Delimited Text Layer process sees the source file as one huge record.  Although field delimitation is correctly recognized,  it does not recognize record delimitation.

I have also tried saving the text file from excel in CSV format (rather than tab-delimited) and get exactly the same result.

I am using "Add delimited text layer" from the layer menu, and not trying to use a plugin.

Grateful for any suggestions...


texts:
I am using a DXFwrite library to create a DXF File using a plugin in QGIS. I tried to search in the official documentation of this library about adding or insert an image file into the DXF.

Manually is possible in autocad, but using pyqgis and Dxfwrite library, i didn’t find it


texts: Joining two different data sets using space and time (date and time) using ArcGIS Desktop?

texts:
I have two sets of incident data from different sources but I would like to aggregate them together to provide one version of the truth.

These two sets of data will often contain the same incidents (based on date and time as well as location). But they come from two different organisations.

Does anyone please know of a good way in ArcGIS Desktop of using spatial coordinates as well as the date and time of the events to intelligently identify when the incidents match (say within 30min and 200m of each other)?


texts:
I received some geospatial data (on rainfall) in a "cdf" format.

I have worked with "nc" files and uses the 'Make NetCDF Raster Layer' tool in ArcMap to read NetCDF files.

However, I wasn't able to use it to read the file with .cdf extension.

Is there an alternative way to read such files?

I have access to ArcMap, QGIS and Python so if there's a solution using any of these tools please let me know.


texts: Merge line shapefiles into a single shapefile while maintaining integrity of lines that overlap?

texts: I have over 300 line shapefiles and I want to merge these files into a single shapefile. I have used merge tool in QGIS, but this tool merges overlapping features into a single feature. I, however, want these features to remain unique even if they do overlap.


texts: Is there a straightforward way to get the source/target point geometry of an edge?

texts:
I was wondering if there is a straightforward way to get the source or target point geometry of an edge?

It is still not clear to me how the source-target works. For example, if I use ST_StartPoint() to my edge, will it get the source or the target of the edge? Does it matter which direction I used when I digitised the line?

Also, I have set False on both 'directed' and 'reverse_cost' fields; does this mean that pgrouting will check an edge both ways? source/target and vice versa?

I hope I am making sense here!

Thanks in advance.
A


texts: QGIS 2.16.0 - issues with styles and rearranging attribute table columns

texts:
I'm finding QGIS 2.16.0 is not honouring attribute table column order once saved styles are applied to tables edited using Table Manager/Refactor field. E.g a new column will shift to the far right in the attribute table view once a style has been applied, despite the order shown under Layer Properties -> Fields still being correct. The order will also still be shown as correct in the Table Manager/Refactor field menus. It appears to just be an issue in the actual attribute table view, and only in 2.16.0.

Is there a work around other than going back to an older version of QGIS?


texts: QGIS - Custom Icon to Show my Tool is Running?

texts: I am running QGIS 2.6.1 (Brighton) I've some developers that have made some custom plug-ins, but our testers are complaining that they cannot tell when, if or what tool / plug-in is running. Is there a way I can have QGIS w/ python swap out the active icon to a different, alt. colored icon while the tool is active, and toggle it back to the default icon when the tool is turned off?


texts: How do I black out all polygons except one using Geoserver SLD_BODY= parameter in GetMap URL?

texts:
I am trying to use the SLD_BODY= parameter to set a style that will black out all polygons except one; the remaining polygon should be transparent. However, the image comes back with all the polygons blacked out, and the transparent polygon isn't visible because of the black polygons behind it.

This SLD will work if I create the geoserver SLD config file to draw from, but does not work when I pass the SLD through the URL itself. The non-URL encoded version of the SLD is here:

<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor xmlns="http://www.opengis.net/sld"     xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"     version="1.1.0" xmlns:xlink="http://www.w3.org/1999/xlink"     xsi:schemaLocation="http://www.opengis.net/sld     http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd"     xmlns:se="http://www.opengis.net/se">
  <NamedLayer>
    <se:Name>blackout_transparent</se:Name>
    <UserStyle>
      <se:Name>blackout_transparent</se:Name>
      <se:FeatureTypeStyle>
        <se:Rule>
          <se:Name></se:Name>
      <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
        <ogc:PropertyIsNotEqualTo>
          <ogc:PropertyName>state_abbr</ogc:PropertyName>
          <ogc:Literal>KS</ogc:Literal>
        </ogc:PropertyIsNotEqualTo>
      </ogc:Filter>
      <se:PolygonSymbolizer>
        <se:Fill>
          <se:SvgParameter name="fill">#333333</se:SvgParameter>
        </se:Fill>
      </se:PolygonSymbolizer>
    </se:Rule>
    <se:Rule>
      <se:Name></se:Name>
      <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
        <ogc:PropertyIsEqualTo>
          <ogc:PropertyName>state_abbr</ogc:PropertyName>
          <ogc:Literal>KS</ogc:Literal>
        </ogc:PropertyIsEqualTo>
      </ogc:Filter>
      <se:PolygonSymbolizer>
        <se:Fill>
          <se:SvgParameter name="fill">#ff2b2f</se:SvgParameter>
          <se:SvgParameter name="fill-opacity">0.0</se:SvgParameter>
        </se:Fill>
      </se:PolygonSymbolizer>
    </se:Rule>
  </se:FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>

Is there something wrong with the logic of this SLD or is this possibly a bug with Geoserver?


texts:
I find the QGIS html annotation tool is very useful for quickly accessing a combination of key data attributes and photos. I am having trouble using relative paths for images.

This doesn't work:

a.k.a.

I'm wondering if it's possible to employ a QgsProject.instance() in the QGIS Macro option under project properties. I don't know html very well, so I'm wondering how I could link the relative pathname to the project path using something like this:

proj = QgsProject.instance()
UriFile = str(proj.fileName())
pathname = str(os.path.dirname(UriFile))

How can I concatenate this in the html display option?


texts: How to run WhiteboxGis under linux system only with command lines or terminals?

texts:
I have to run the Whitebox on Linux system, but I am new to use Linux. Therefore, I do not know how to run the whitebox software on Linux. The followings are what I tried to run the software:

~/Desktop/rhessys/Whitebox_3_2_1$ java -version
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)
~/Desktop/rhessys/Whitebox_3_2_1$ ls
lib  logs  README.TXT  ReleaseNotes.txt  resources  WhiteboxGIS.jar
~/Desktop/rhessys/Whitebox_3_2_1$ java -jar  WhiteboxGIS.jar
~/Desktop/rhessys/Whitebox_3_2_1$

After typing "java -jar WhiteboxGIS.jar", the software was no response. Or it was running? If it is running how can put data into the whitebox to calculate?


texts: Why are my combo boxes not filled with a list of layers?

texts:
I am developing a Qgis plugin (layer_gui) and I am having a problem with populating the list of layers.  When I first run the plugin my combo boxes are not filled with a list of layers, I have to reload the plugin to get them to fill in.  I am sure I do not have the correct sequence of events.

Source Code from layer_gui.py:
class layer_gui:

def __init__(self, iface):
    # Typical stuff from plugin builder

def initGui(self):
    # Typical stuff from plugin builder

def unload(self):
    # Typical stuff from plugin builder

# run method that performs all the real work
def run(self):
    # show the dialog
    self.dlg.show()
    # Run the dialog event loop
    result = self.dlg.exec_()
    # See if OK was pressed
    if result == 1:
        input_source_layer = unicode( self.dlg.ui.source_layer_cb.currentText() )
        input_dest_layer = unicode( self.dlg.ui.dest_layer_cb.currentText() )
        QMessageBox.information(None, "Dangling Nodes:", str(input_source_layer) + " -- " + str(input_dest_layer))

Source Code from layer_guidialog.py

def __init__(self):
    QtGui.QDialog.__init__(self)
    # Set up the user interface from Designer.
    self.ui = Ui_layer_gui()
    self.ui.setupUi(self)
    QObject.connect(self.ui.source_layer_cb, SIGNAL("currentIndexChanged(QString)"), self.update)
    QObject.connect(self.ui.dest_layer_cb, SIGNAL("currentIndexChanged(QString)"), self.update)
    self.success = False
    self.manageGui()

def manageGui(self):
    myList = []
    self.ui.source_layer_cb.clear()
    self.ui.dest_layer_cb.clear()
    myList = self.getLayerNames( "all" )
    self.ui.source_layer_cb.addItems( myList )
    self.ui.dest_layer_cb.addItems( myList )
    self.accept()

def getLayerNames(self, vTypes ):
    layermap = QgsMapLayerRegistry.instance().mapLayers()
    layerlist = []
    if vTypes == "all":
        for name, layer in layermap.iteritems():
            layerlist.append( unicode( layer.name() ) )
    else:
        for name, layer in layermap.iteritems():
            if layer.type() == QgsMapLayer.VectorLayer:
                if layer.geometryType() in vTypes:
                    layerlist.append( unicode( layer.name() ) )
    return layerlist


texts: How to configure Time Manager with Raster Data?

texts:
I have a number of separate raster layers, which I would like to view with the Time Manager plug-in. I choose each layer, let TimeManager know the date and dateformat from the filename as you can see here:

But as you can see from the screenshot as well, the date on the time slider only shows 1970-08-21 and nothing really happens -- changing "time frame start" to 2013 does not help either.
I am obviously doing something wrong here ... any advice?


texts: Open raster and vector files with PyQGIS

texts:
I'm making a plugin for QGIS and I'm trying to open the layers I've created on QGIS, but I only get to open the one called 'sinkhole raster' which is the input of the tool. I don't know what order should I write to open my output files. I need to open both Raster and Vector layers, the one called 'Hillshade' is a raster and the one called 'SSP' is a vector.
Any idea?

Here is the script:

def select_input_file(self):
    self.input=QFileDialog.getOpenFileName(self.dlg,"Input Layer ","",'*.*')
    self.dlg.select_input.setText(self.input)

def select_output_dir(self):
    self.output_dir=QFileDialog.getExistingDirectory(self.dlg,"Output layer ","")
    if os.path.exists(self.output_dir) and os.path.isdir(self.output_dir):
        self.dlg.select_output.setText(self.output_dir)
        self.Hillshade_path = os.path.join(self.output_dir, "Hillshade")
        self.SSP_path = os.path.join(self.output_dir, "SSP")
        self.Fill_path = os.path.join(self.output_dir, "Fill")
        self.Dolines_path = os.path.join(self.output_dir, "Dolines")
    else:
        self.output_dir = None
        self.dlg.select_output.clear()

def run(self):
    """Run method that performs all the real work"""

    # show the dialog
    self.dlg.show()
    # Run the dialog event loop
    result = self.dlg.exec_()
    # See if OK was pressed
    if result:
        # Do something useful here - delete the line containing pass and
        # substitute with your code.
        pass

def find_sinkholes(self):
    settings = QSettings()
    systemEncoding = settings.value('/UI/encoding', 'System')

    Input_DEM = self.iface.addRasterLayer(self.input, "sinkhole raster")
    Hillshade = self.Hillshade_path
    SSP = self.SSP_path
    Fill = self.Fill_path
    Dolines = self.Dolines_path

    ##Find Sinkholes_0.1=name
    ##Input_DEM=raster
    ##Hillshade=output raster
    ##SSP=output vector
    ##Fill=output vector
    ##Dolines=output vector

    #carreguem el DEM
    pas1=processing.getObject(self.input)
    #creem un mapa d'ombres
    pas2=processing.runalg('gdalogr:hillshade',self.input,1.0,False,True,1.0,1.0,315.0,45.0,Hillshade)
    #creem la capa de punts especifics
    pas3=processing.runalg('saga:surfacespecificpoints',self.input,2,2.0,None)
    pas45=processing.getObject(Hillshade)
    #fem una reclassificacio dels ssp
    pas4=processing.runalg('saga:reclassifygridvalues',pas3['RESULT'],0,8.0,8.0,0,0.0,0.0,0.0,0,'0,0,0,0,0,0,0,0,0',0,True,0.0,True,0.0,None)
    #passem a poligons els punts reclassificats
    pas5=processing.runalg('gdalogr:polygonize',pas4['RESULT'],'valor',None)
    #fem una seleccio per atributs per escollir els punts baixos
    pas6=processing.runalg('qgis:selectbyattribute',pas5['OUTPUT'],'valor',0,8.0)
    #guardem els punts seleccionats
    pas7=processing.runalg('qgis:saveselectedfeatures',pas5['OUTPUT'],None)
    #busquem el centroids dels poligons per fer una capa de punts amb els minims locals
    pas8=processing.runalg('qgis:polygoncentroids',pas7['OUTPUT_LAYER'],SSP)


texts:
Trying to bulk update versioned Feature Classes containing in excess of 30,000 records is causing issue due to the Reconcile/Post process taking too long and ending up with the notice saying that the target version has changed and user must Reconcile and Post again (and whole process repeats).

I have attempted to write a little script that will create Subsets (containing about 5000 records) of my original selection and run the Calculate Field, Reconcile, and Post functions on each subset rather than the entire selection.

I can get the list of ObjectIDs of the entire original selection using desc.FIDSet, however all the documentation points towards FIDSet being Read Only.  In the script I have generated a selection query to use in the SelectLayerByAttribute but I'd like to know if there is a way to just recreate the FIDSet (or alternative term if not FIDSet) rather than passing through the Select query.

Or is there a better way to achieve what I'm attempting?

desc = arcpy.Describe(FeatureLayer) # Enables listing selected records by ObjectID through FIDSet

if desc.FIDSet != '': # Check if there are selected records
    FullSel = desc.FIDSet.split(";") # Create list of ObjectIDs of selected records
    print "Number of selected features: {}".format(len(desc.FIDSet.split(";")))

    while FullSel: # Keep going while there are still records to process
        SubsetSel = [] # Create SubsetSel list for groups of selected features
        for Sel in FullSel:
            if len(SubsetSel) < MaxLoopFeatures: # SubsetSel list will only have maximum number of features from MaxLoopFeatures
                SubsetSel.append(Sel)

        ##======================================
        ## Is there a better way to do this??
        ##======================================
        query = 'OBJECTID IN (' + ','.join(map(str, SubsetSel)) + ')' # Create query for SelectlayerByAttribute to reselect features using SubsetSel
        ##print query
        arcpy.SelectLayerByAttribute_management(FeatureLayer, "NEW_SELECTION", query) # Reselect features
        ##======================================
        ##======================================

        desc2 = arcpy.Describe(FeatureLayer)
        print "Selection Set: {}".format(desc2.FIDSet)
        print "Number of selected features: {}".format(len(desc2.FIDSet.split(";")))

        # Run intended process here
        #arcpy.CalculateField_management()
        #arcpy.ReconcileVersion_management()

        FullSel = [x for x in FullSel if x not in SubsetSel] # Remove processed features from FullSel and repeat on remaining features
else:
    print "Nothing Selected"


texts: Updating multiple vector points at once with vertex editor in QGIS?

texts:
I have a series of points in .shp format arranged in lines over an area, which I've used the 'regular points' tool to generate.
In some of the lines, I want to decrease the spacing of the points so have added extras (selected points in image below)

I've added the extra points using the 'add point feature tool' and just clicked them approximately where they need to be.

Now I want to 'tidy up' the lines, and make all the new points on the same northing as the original ones, which they are slightly off because I added them by hand. I'm using a UTM CRS.

My question: Is there a way of selecting all the features in a row, and assigning a shared northing to all of them at once?

I realise at the moment I could either use the 'edit node' tool and change them one by one, or use the field calculator tool to make east and north columns, filled with the $x command, export this as a CSV or similar, edit in excel and re-import. I'm hoping for something more streamlined than this though!

Other software I've used has a very handy way of doing this, where selected points can be edited using the properties panel by simply clicking and changing the east or north for multiple points (image below)


texts: How to import raster (.asc) data to PostGIS?

texts:
I am using Postgres 10.3 / Postgis 2.4.2, and I have thousands of ".asc" files (LiDAR DTM/DSM files) to import to the db. However, the format is something like:

ncols 1000
nrows 1000
xllcorner    297000
yllcorner    519000
cellsize     1
NODATA_value -9999
-3.616 -3.617 -3.618 etc

What is an easy way to import this data into PostgreSQL/PostGis?


texts: What type/model of pointing device do you use for GIS?

texts:
I've been using basic mice for a long time but have been thinking of moving either to an ergonomic mouse or trackball. Trackballs seem like they may be better for me, but it seems like manufacturers have neglected the trackball market for a long time and there aren't that many good options available. Something like the Evoluent vertical mouse looks interesting as well. So what exotic pointing device do you use, and why do you like it or not like it?

I ended up going the trackball route and chose the Logitech Cordless Optical Trackman:

It was the closest thing I could find to the physical form factor of the Microsoft Intellimouse Trackball Explorer, which was the best reviewed trackball I found in my search, but is no longer manufactured (though for a few hundred bucks you can get old ones on Ebay):

I would have preferred a USB wired version but the only one Logitech makes in this form is cordless, with a huge wireless USB dongle. Actually, this trackball doesn't even show up on Logitech's site anymore, I wonder if they are discontinuing it. It's available at Office Depot and Staples as I write this, I've had mine for several months now.

The reasons I chose the trackball, and this one in particular, were:

Similar physical layout to the Microsoft model I mentioned. That MS trackball has legions of rabid fans online and they will spend hundreds of dollars to replace their dead Intellimouse Trackball with a new one. I didn't find any currently-available trackball with as dedicated a fan base.
It requires no more desk space than the unit itself occupies, unlike a mouse which needs a mousepad. This also means that if I'm digitizing something big, I never run out of mousepad and have to pick up a mouse, move it, and put it back down again, which can be a pain and cause errors.
Very little force is required to get the ball/pointer moving, much less than getting a mouse to move on a mousepad. It makes fine pointer movements a lot easier.
This particular one has the ball mounted on the top, unlike the Logitech jvangeld has, or the M570, another Logitech trackball. Both of those require you to use your thumb to move the ball, which seemed to me like it would get more tiring over time and also that finer movements would be harder than with the ball on top (where I can use 3 fingers to move it).
It has 5 extra buttons beyond Left/Middle/Right mouse buttons, those can be programmed to do whatever using the included software (or AutoHotKey).

A few Cons I've noticed:

The small pegs that keep the ball centered in its socket need to be cleaned regularly. I've been doing it only when I noticed the wheel not rolling as freely but it should probably be done once a week at least. It seems like those pegs are going to wear out long before anything else does.
The mouse wheel's scrolling action is a bit stiff, so is the left mouse button.
It's apparently an old model and the USB wireless dongle is very big: several feet of cord with a dongle about 3" square on the end of it. It's not travel-friendly.


texts: Importing vector files regardless of having point, line and polygon information using a geopackage in QGIS

texts:
How do I import vector files regardless of having point, line and polygon information using a geopackage in QGIS?
I am used to using a geodatabase in ESRI's ArcGIS, but since my mac is not compatible I am using the alternative QGIS and their "geopackage" option. Unfortunately, I see that I have to specify one type of geometry for the whole package, even though the package consists of points, lines and polygons. Is there a way to create a geopackage and simply choose a vector-based option? I don't see that kind of option anywhere


texts:
I am using a map application (ArcGIS Engine). I am trying to start an edit session and i want to use IWorkSpace interface in the WorkSpaceClass. but i am getting "The type 'ESRI.ArcGIS.Geodatabase.WorkspaceClass' has no constructors defined." I read the post No constructor defined? but it did not help. can anyone help?

IWorkspaceEdit edit = new WorkspaceClass();


texts: Storing NDVI values from MODIS datasets in variables in R

texts:
There is a MODIS dataset called MCD14ML (collection 5), which contains some information about observed hotspots. In particular, I'm working with a subset of the dataset that is concerned with hotspots in 2003 and in the Australian region. I have downloaded a csv file, and I've attached a screenshot below.

I've imported this csv file into R, and have it as a dataframe. Now, there's another MODIS dataset called MYD13A3 which contains NDVI information for regions.
I would like to construct a model (e.g. GAM) with "type" in the picture above as a response variable, and NDVI as an explanatory variable, with the "type" and NDVI corresponding to each other in the sense that they're both attributes of the same location (in terms of latitude and longitude).
I know how to construct linear models (including GAMs) in general in R, using the mgcv package. Normally, you would have a dataframe with your response variable as one column and your explanatory variables in other columns. The issue is that I don't know how to construct such a dataframe containing the NDVI values for each location. I have downloaded a small subset of the MYD13A3 dataset (as hdf files) using getHdf, but I don't know to extract the NDVI values from them and store them into say a dataframe or variable.
How can I do this?
If there's another, more conventional way of setting NDVI values (from MODIS datasets) as explanatory variables, let me know.


texts: PostGIS Union Between Two Tables, Preserving Attributes

texts:
I'm trying to union US State level upper- and lower-level government boundaries in such a way that generates one PostGIS table with both the upper and lower level names for each shape.

In my example below, U is a dataset and has a column with rows UA and UB. L is another dataset and has LA, LB, and LC. When I union the shapes together I should get the same shapes as L but the new, unioned dataset has both data columns.

Edit: My example image above is pretty crummy. The answers so far have been related to querying the data assuming the geometry is available. This is important but is skipping the more confusing part of my question. A better example:

The yellow shape is from U, the orange shape is from L. Notice that they overlap but some pieces of the polygons aren't contained completely inside another shape (like in my example where LB and LC are completely within UB).

The question I was trying to ask is about correctly chopping the two layers so the resulting data set has no overlaps. See for example this mailing list post that gets close but doesn't quite work.


texts: Extract into a dataframe the number of points in each buffer, in a set of concentric equi-distance buffers around a single point

texts:
I have the locations of the patients using an healthcare facility, and wants to extract the number of patients living at given distances from the hospital.
I generated buffers at 500m increments around the hospital, but not able to extract the number of patients in each buffer.
I was able to generate and plot the desired buffers, was also able to intersect with the patient locations, but was not able to get out the desired output.
suppressMessages(library(sf))
suppressMessages(library(tmap))
suppressMessages(library(maptools))
suppressMessages(library(rgeos))
suppressMessages(library(dplyr))

setwd("C:/SpatTemp/gwr_lg_data")
Lagos <- readShapePoly("Lagos_State_LGAs")
Lagos<- st_as_sf(Lagos, coords = c("Longitude", "Latitude"),
                 crs = "+proj=longlat +datum=WGS84")

setwd("C:/SpatTemp")
pract<- read.csv("First.csv")
pract_sf <- st_as_sf(pract,
                     coords = c("Longitude", "Latitude"),
                     crs = "+proj=longlat +datum=WGS84")

hospt<-read.csv("Hospital.csv")
hospt_sf<- st_as_sf(hospt,
                    coords = c("Longitude", "Latitude"),
                    crs = "+proj=longlat +datum=WGS84")

hospt_BNG<- st_transform(hospt_sf, 27700)
rad<- seq(25000,500, by=-500)

for (x in rad) {
 plot(st_geometry(st_transform(st_buffer(hospt_BNG, x), 4326)))
              }

for (x in rad)  {
        pract_sf %>% st_join(st_transform(st_buffer(hospt_BNG, x), 4326), ., left = FALSE) %>%
              count(Address)
          }


texts:
I'm trying to cutting a raster object (from a PostGIS table) using a shapefile with reference, extracting raster data from a polygon area. My objective  to work with the  clipping raster into R.

I'm cutting in this way:

CREATE TABLE clippingtable as (SELECT (ST_Union(ST_Clip(raster.rast, ST_Transform(polygon.geom, ST_SRID(raster.rast) ) ) ) )
  FROM originalraster as raster, originalshape as polygon
  WHERE ST_Intersects(raster.rast, polygon.geom))

The gdalinfo output is:

$gdalinfo "PG:host=localhost port=5432 dbname='testdb' schema='public' table=clippingtable"
ERROR 1: Error retrieving raster metadata
gdalinfo failed - unable to open 'PG:host=localhost port=5432 dbname='testdb' schema='public' table=clippingtable'.

In R I'm using these functions:

dsn="PG:dbname=testdb host=localhost port=5432 table=clippingtable"
rgdal::GDALinfo(dsn)
readGDAL(dsn)

The output is:
"Error in .local(.Object, ...) : Error retrieving raster metadata"

In original table (before cutting) I can work normally with my raster.

Any idea what I'm doing wrong?


texts:
I am using QGIS 2.18 and I am wondering how to find the NW corner of a polygon and create an attribute of that point number. See the attached image.

For example, please node 8 is the NW corner for Grid #1, 13 is the NW corner for Grid 5 and so on.  any help with this would be wonderful. The two files I am working with is

Grid = 'grid'

and

Vertex = 'nodes'


texts: How can I calculate elevation from relief?

texts: I have an SDE Raster that displays relief, but I want to display elevation. How would I go about doing this?


texts: Export spatial data from SQL Server to ESRI shapefile using OSGeo

texts:
i did a join between 2 tables departements2 which has all department with their id and geometry with BM_REGIONFR with id of department and region ( i have 5 region in each region many departement )

 select b.[Region],geometry::UnionAggregate(geom.MakeValid()) AS Geo
 into dbo.DRShape from [dbo].[departements2] a
 join [dbo].[BM_REGIONFR] b on a.[code_insee] = b.[dep_2] group by b.Region

After that i wanted to export the shapefile with OSGeo4w in order to have the map with the right decomposition and thats the query i used

ogr2ogr -f "ESRI Shapefile" "C:\Users\sqlexport.shp" "MSSQL:server=PORT_7FMW8H2;database=testdbspatial;trusted_connection=yes;" -sql "select * from DRShape" -overwrite

And i got these ERRORS

  ERROR 1: Attempt to write non-polygon (LINESTRING) geometry to POLYGON
  type shapefile. ERROR 1: Unable to write feature 1 from layer
  dbo.DRShape. ERROR 1: Terminating translation prematurely after failed


texts: Create a spatially restricted sub layer in GeoServer 2.14.1

texts:
I have a vector layer with points across a whole state served by WMS. I would like to limit access to particular areas within the state (e.g. spatially via bounding box). Each bounding box would be available to different authenticated users via WMS. The end goal is to maintain a single dataset with multiple users having different spatial access to it.

It appears that GeoServer's Layer Groups is designed for this. I tried creating one in 'Container Tree' mode and setting it with a small bounding box. While it does appear as a distinct layer in ArcMap, it is not restricted spatially (e.g. the whole state's data still shows rather than only in the defined bounds).

I wondered if anyone had any experience with this particular use case?


texts:
I am calculating angle of incidence by the following formula!

cos(aoi) =  cos(slp) cos(zn) + sin(slp) sin(zn) cos(azm_s - azm )

  aoi: angle of incidence slp: slope zn: zenith angle azm_s: solar
  azimuth angle (N = 0, clockwise) azm: surface azimuth (N = 0,
  clockwise)

For surface azimuth and slope angle I run 'r.slope.aspect' using Grass framework (https://grass.osgeo.org/grass70/manuals/r.slope.aspect.html). I convert the aspect values from  E=0 anti-clockwise to N=0 clockwise.
is the calculated aspect and surface azimuth similar?


texts: What tools exist for web-mapping line or polygon chloropleths over time?

texts:
In my survey of timeslider web-mapping plugins I've mostly seen a focus on mapping different geometries over time, in particular points (e.g. Torque.js).

I want to create a choropleth map with 1000-2000 shapes and show the colors change over time. My concern with the tools I've seen is that, for example displaying 12 months over 1000 shapes would require loading 12,000 shapes into memory for mapping.

Is there a library that could take the shapes and then join timeseries choropleth values to them and enable a timeslider?


texts: Fixing data source of same layer in multiple MXDs?

texts:
I have this one specific layer in a bunch of mxd files with a broken data source. I am working on a script to automate fixing the data source. I am having trouble getting it to loop through a folder and fix the layer on all mxd files in that same folder.

This is the script I have so far:

#Import modules
import arcpy
from arcpy import env

#Put file path for the folder containing mxds, where I have my sample file path
env.workspace = r"G:\Geomatics\Map Requests\2017-07-24_TrailClosures"

#Looping through all mxd documents, list layers and replace those layers MRGTrails layer with proper data source
for file in arcpy.ListFiles("*.mxd"):
    mxd = arcpy.mapping.MapDocument(file)
    df = arcpy.mapping.ListDataFrames("*.mxd", "Layers")[0]
    for lyr in arcpy.mapping.ListLayers(mxd, "*", df):
      if lyr.name == "Trails":
        lyr.replaceDataSource(r'G:\Geomatics\Data\Regional\MRG.gdb', "FILEGDB_WORKSPACE", "Trails_Sentiers", validate=False)

    mxd.save()


texts: Hydrology toolbox versus Arc Hydro toolbox?

texts:
I would like to do some watershed delineation research/development (at the County level) with our LIDAR generated DEM, after it is corrected, but am wondering what, if any, differences might result from using the hydrology toolbox to generate watersheds or the ArcHydro suite of tools? I will probably try both toolboxs but am curious if anyone has done anything similar? The tools and workflow between both seem similar, at first blush, so I am wondering what the differences would be between the tools...algorithms?
Am using ArcInfo 10.0.


texts: ArcGIS Runtime or ArcObjects - which should I learn to become a GIS Developer?

texts:
I'm a GIS analyst hoping to upgrade to GIS Developer some day. I hope to make this switch for a few reasons:

I think I can earn more money as a developer (generally true?).
I'm tired of scrubbing data and other mundane aspects of analysis.
I love programming. Currently I do as much work as possible with
Python.

The direction of development that interests me is for Windows/desktop applications, since this is what I know and work with the most. I'd like input into which direction to pursue to be as marketable as possible. So should I focus on ArcObjects or ArcGIS Runtime? ArcObjects seems very popular, and between ArcObjects and Runtime there are far more questions for ArcObjects here on this site. But is Runtime going to eventually be a replacement for ArcObjects? Is it generally superior and just needs to catch on? In the job market for GIS development currently, which will be best? Or should I focus on a something completely different to become a developer that I'm not even aware of?


texts: QGIS: copying a value from one row to another one in the attribute table?

texts:
I'm trying to replace the values of the column A and B by the value of the row 1 and row 2 of column C. (15B70C should be replaced by 63F200 and 94JH5 by 35V145)
How can I automate that in the simplest way possible?


texts:
I want to create a labeling for a polygon layer. The labeling should constists two columns from my file, "X" on top, "Y" among "X"and they should be separated through a break underline. Every column contains numbers but not all fields of column "Y" are filled with values. The break underline should only be visible if "X" and "Y" contains a value.

The screenshot shows how the labeling should look like.

Maybe there is a possibility to create a line over the values of the column "Y", like an underline, but only the opposite position?


texts:
In ArcCatalog one has the option to save locations of folders via the "Connect To Folder" button. I have the problem, that ArcGIS don`t save each folder connection which I would like to have in Catalog.

Everytime I fail when I want to save the path U:\GROUPS\GIS\Geo_Data or U:\GROUPS\GIS. Whereas U:\GROUPS or C:\home\data is no problem.

Anyone encountered the same problem?


texts: ogr2ogr append to PostGIS table with PRIMARY KEY -fieldmap: Invalid destination field index 0


texts:
I am using PostGIS (PostGIS 2.2.0 with SFCGAL extension) and I have data in postgres which is loaded using citygml2psql tool and it contains polyhedralSurface geometry.

But when i run query :

SELECT "gid",ST_AsGeoJSON(ST_Transform("geom"::geometry,3946),0, 1) AS "geom"  FROM "public"."citygml"

in pgadmin3 it gives an error  :

ERROR:  lwgeom_to_geojson: 'PolyhedralSurface' geometry type not supported
********** Error **********
ERROR: lwgeom_to_geojson: 'PolyhedralSurface' geometry type not supported
SQL state: XX000

I found one question related to this here : GeoJSON: PolyhedralSurface geometry type not supported

But i want some fix for postgis as I can't change my query and need data in GeoJSON.


texts: Adjust sequence of attribute table of two shapefiles in ArcGIS

texts: I have two shapefiles (A and B). Each contain 200 polygons. I want to compare the area of each corresponding polygon. But the sequence of the polygons in each shapefile (A and B) is different. How can I arrange these polygons in order? For example the FID of a polygon in shapefile (A) is 1 but the FID of same polygon in shapefile (B) is 36.


texts: How can you create a depth raster from a DTM and a polygon in QGIS?

texts: I have a DTM raster and a flood outline in polygon format - how do I create a depth raster for the flood outline (i.e. flood level minus DTM level)?


texts: ogr2ogr WFS data source really slow when upgrading from GDAL 1.11.3 to 2.1.2

texts:
I'm using ogr2ogr to download features from a WFS service and save it to a sqlite database. Here's the full command:

ogr2ogr -f SQLite -gt 65536 -nln my_table_name --config OGR_WFS_USE_STREAMING NO --config OGR_SQLITE_CACHE 4096 -nlt POINT -skipfailures -append my_sqlite_file.sqlite "http://url/to/my/service"

When I run this on GDAL  2.1.2, downloading the features is extremely slow.

By the look of it, the my_sqlite_file.sqlite_journal file never grows to more than 10K and the table is constantly updated. In comparison, when using GDAL 1.11.3, my_sqlite_file.sqlite_journal grows to the excess of 400K and there are maybe 2-3 writes tops to the table.

I was able to pinpoint this problem down to the --config OGR_WFS_USE_STREAMING NO part: when I remove it from the command, I achieve similar behaviour and speeds with GDAL 1.11.3.

With the dataset I'm using, the download time grows from 30 seconds to 8 minutes.

Did something change between the two versions of the ogr2ogr?

Should I pass the --config OGR_WFS_USE_STREAMING NO part of the command somehow differently?

Would love to find a solution to this.

I experimented a bit more, still to no avail but at least I know more.

I removed all the -skipfailures, -gt and all the config options but still ogr2ogr supplied with GDAL 1.11.3 is much faster than the 2.1.x (tried 2.1.2 and 2.1.3). Looking at the memory and processor usage on windows here's what's going on.

GDAL 1.11.x:

data download starts, ogr2ogr never exceeds 25MB of memory, CPU usage stays around 10%
ogr2ogr performs the writes to the sqlite database, more writes when -gt 65536 eliminated, but still fairly quickly

GDAL 2.1.X

data download starts, ogr2ogr downloads all the data at once and takes around 350MB of memory, CPU usage goes all the way to 50%
then it hangs there performing really slow writes. If limit set to -gt 65536, then will perform first write after around 10 mins from the start

Really quite clueless to what to do here. I think the only thing I can do is file a bug report.

Using user30184's pointer on the debug I can see some differences in the process.

First of all the older version of ogr2ogr clearly states that it is doing a WFS request, but the newer version claims it's doing an HTTP request with both reporting respectively that they OGROpen succeeded in in a WFS request and an HTTP request.

Secondly, when starting the download the new version of ogr2ogr displays the following lines

SQLITE: dropping trigger ggi_mylayername_GEOMETRY

SQLITE: dropping trigger tmi_mylayername_GEOMETRY

and when I control-c the process it prints out the lines

SQLITE: restoring trigger ggi_mylayername_GEOMETRY

SQLITE: restoring trigger tmi_mylayername_GEOMETRY

all of these trigger lines were absent from the older version of ogr2ogr.

Would any of these have an effect on the sluggishness I'm experiencing with the new version?

I wonder if it loads the data in the wrong format (not WFS) and then the conversion is what is taking time and CPU power?


texts:
Is it possible to translate tile requests from a mapping engine wanting Google Map style tiles into tile requests from a geopackage file? If not, where can I find information about how to create a mapping engine that handles the dizzying array of options provided by geopackage (as in, something that would help with understanding how to use srid, min_x, pixel_x_size, tile_width, matrix_width, zoom_level, and screen coords to determine which tiles at which rotation displayed where)

I have used MBTiles in the past to supply tiles to a mapping engine that requested tiles in Google Map style. This worked well as MBTiles uses the same projection and uses TMS for the tiling scheme. This meant I only needed to modify the y value of each request to translate from TMS to Google Maps style.

Two of the problems that I am having trouble figuring out how to overcome in regards to translating google maps tile requests to a specific tile in geopackage is how to handle the potential difference in projection, and how to handle the difference in origin. (By difference in origin I mean Google maps starts 0,0 at the top left corner of the world (because it assumes the whole world has data), whereas geopackage starts at the top left of the data (which might be the whole world but likely will not be))

If it makes any difference I am trying to do this in C++ using Qt and QtLocation.


texts: Iterating over features in Google Earth Engine

texts:
I am using the Zonal Time Series plotter from the LandTrendr scripts to plot an NDVI time series for a geometry.  I would like to modify the script to be able to loop through objects in a table, because I ultimately have 1000+ areas that I would like to create a time series plot for.  I have seen the GEE documentation for iterating over a feature collection, but I'm having a hard time applying it to my script.
This is the script that successfully plots a time series for a single geometry.  How can I modify this script to loop through objects in a table to generate time series for many geometries?


texts: Forcing route in ArcGIS Network Analyst?

texts:
I'm fairly new into the public transportation universe and now I have to create route analysis.

I have thousands of routes to create, so that leave out the manual option. I obviously have origins and destinations, but transportation means as well (car, subway, bus and bus route and subway lines number for public transit. I even have in-station and out-station for the subway). In short, anything to follow, step-by-sted, a person moving from its origin to its destination.

Is there a way, with Network Analyst, to force a route to take a certain highway, or a bus route if I have it's number in attribute? I thought of creating stops, but a bus route can be very long so using the centroid of the line isn't an option, same as using a stop for a highway which can be hundreds of km long...

I could at least solve my routes separately for car and public transit, but again, how to force the later to use public transit when solving my network?

The goal is to create a map of all routes taken, coming from and going to a city.

I have ArcView 10.0 (soon ArcEditor) and Netork Analyst (I could take the pgrouting avenue as well, but it's not officially supported by my organization).

The problem is when I create my routes with NA, it always takes the highways when sometime I know the user took the train. It's king of doing like Google when asking directions and choosing public transit.

I have interview data describing everything (from home, took his car to this station to take the train, then got out at that station to take the subway until its destination, ...). I have everything as attribute. home_x, home_y, first mean of transportation = 'car', in_train_station, out_train_station, in_subway, out_subway, dest_x, dest_y, etc. Of course, as attribute in my table.

I'd like the system to take the info contains in the table to create its route, for example, forcing the route highway 15, to take the train line #2 and subway #3 until the destination, which is at [dest_X, dest_Y].

My current thought is using ArcPy. I'd select all the elements (highways, train, subway lines, ...) using the attributes, create a network using only those lines, create the route with Network Analyst, export the route into a shp and doing it in loop for all the line in my input table.

I think doing a couple hundreds could be fine, but for the for city I had to do this analysis, I have 8000+ routes to create. Next year, we'll do a regional campaign and we'll have 160,000+ routes.


texts: Creating a shapefile with accumulated discharges in ArcMap 10.2

texts:
I have a shapefile which represents a waterbody (first picture) and I have a point shapefile which shows the location of discharges  (second picture). Is it possible to create from these datas a shapefile which accmululates the discharge values in flow direction (like the third picture)?

waterbody

discharge Points

accumulated discharge


texts: Geoserver-WMS-problem when zooming point layer

texts:
I need help. I would like to have no blank(white) space between points when zooming in WMS geoserver.

Any idea?


texts: How display many layers from Geoserver in one map?

texts:
1) I publish 4 layers in Geoserver (planet_osm_line, planet_osm_point, planet_osm_polygon, planet_osm_roads).

2) Then I add styles (from sld styles) to the Geoserver.

3) Then I set this styles in my layers.

4) Now I want to see this 4 layers in browser. But i can't. Please, help me.

Also do I need to create workspace before this 4 steps?


texts: PostGIS Nearest Neighbour outside buffer

texts:
I am trying to find the 6 nearest neighbours to a point which are outside a defined buffer.

Basically I am comparing points of the same table and working with Mike Gleason's examples.

WITH subq AS (
SELECT p.id, p.name, unnest(ARRAY(SELECT q.name
  FROM w_point q
  where p.id != q.id
  ORDER BY ST_Buffer(p.geom, 0.1) <#> q.geom LIMIT 5)) as name
FROM w_point p)
SELECT * FROM subq;

The problem is, that the resulting points are still inside the buffer:

Desired points are outside the yellow buffer, the table reflects the result

How can I add the buffer to my query? Am I thinking the wrong way and is there a better one?


texts: Using PostGIS to generate a polygon representing the area shared by some (but not all) of a set of polygons

texts:
I have an application where several users submit polygons, and I am looking to create an aggregate polygon that represents a kind of average of their submissions. We use PostGIS for our spatial analysis needs.

Let's say we received polygons from 10 users. If we used ST_Intersection on those polygons, the remaining polygon would only represent the points included in all 10 polygons. If we used ST_Union, the output would repesent the points included in at least 1 polygon.

Can anyone recommend a way to output a polygon that represents the points that are in n polygons, where n is greater than 1 and less than the total number of polygons (10 in this case)?


texts: arcgis javascript api, cmv, incorporating custom search widget

texts:
I would like to add a custom search/geocoder widget to a cmv page, in addition to the geocoding widget that is already included with the source code. I have thought about modifying the existing geocoding widget to include my service, but am unsure of how to do that. I thought adding an additional search may be easier. i have a custom geocode service and have it working in a simple map, but I'm not sure how to incorporate this into my cmv page.

Where should the code go?

I'm also wondering what map I reference for my custom search.

Here's what I have that works in a simple map:

<!DOCTYPE html>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
    <title>Geocoder Widget</title>
    <link rel="stylesheet" href="http://js.arcgis.com/3.11/esri/css/esri.css">


texts: Get Values from GetFeatureInfo in Openlayers 3?

texts:
I have a problem with my GetFeatureInfo, because I can not get the values back at me as if they were variables. Anyone know any way?

I researched and what I have seen is Geoserver modify the template (Content.ftl etc ...) But I would like to eliminate this as it has very little customization.

Or if someone could help to customize these by javascript or another language with more options.

I use the example from OpenLayers3 :

map.on('singleclick', function(evt) {
  document.getElementById('info').innerHTML = '';
  var viewResolution = /** @type {number} */ (view.getResolution());
  var url = Rustica.getGetFeatureInfoUrl(
      evt.coordinate, viewResolution, 'EPSG:3857',
      {'INFO_FORMAT': 'application/json'});
  if (url) {
    document.getElementById('info').innerHTML =
        '<iframe seamless src="' + url + '"></iframe>';
  }
});

map.on('pointermove', function(evt) {
  if (evt.dragging) {
    return;
  }
  var pixel = map.getEventPixel(evt.originalEvent);
  var hit = map.forEachLayerAtPixel(pixel, function(layer) {
    return true;
  });
  map.getTargetElement().style.cursor = hit ? 'pointer' : '';
});

And I recibe this JSON:

{"type":"FeatureCollection","totalFeatures":"unknown","features":[{"type":"Feature","id":"rustica.22","geometry":{"type":"Polygon","coordinates":[[[-37155.372408933064,4804269.421434741],[-37085.144868682895,4804399.503897646],[-37046.8949331874,4804372.239200349],[-37111.13156967358,4804251.317020955],[-37155.372408933064,4804269.421434741]]]},"geometry_name":"the_geom","properties":{"PCAT1":"46166A0","PCAT2":"0500051","EJERCICIO":null,"NUM_EXP":null,"CONTROL":null,"MAPA":294,"DELEGACIO":46,"MUNICIPIO":166,"MASA":"005","HOJA":"A","PARCELA":"00051","SUBPARCE":"0","TIPO":"R","COORX":729052.43,"COORY":4383946.44,"NUMSYMBOL":8,"FECHAALTA":20120524,"FECHABAJA":99999999,"AREA":4042,"NINTERNO":2.10991406E8,"refcat":"46166A00500051"}}],"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG::3857"}}}

My aim would be to get each of these values separately to put them in an HTML form.


texts: QGIS Saving selected features with wrong data attribute column names

texts:
Following the thread here:
Creating new layer from selection in QGIS?
I did a great job, extracting my items from the layer by type and saving them as the separate layer.
Unfortunately the problem is in data attribute table, which results wrong column naming. I though, that since every column is copied it will come in a good naming too.
See below what is the problem:

The first three columns have a proper name, whereas the rest one is wrong. It's assigned some weird name derivative from one of the columns and then copied across the entire table. Is there any way to fix it? I want to have all the columns copied/exported correctly.


texts:
I am trying to understand how to use the symbology options for raster layers in QGIS, particularly the Resampling options, but the official documentation only mentions the setting very briefly and doesn't go into detail about how they work.

I am interested in how to use the settings to best view raster images such as topographic maps or nautical charts, either via tileset map services or offline static formats like GeoTIFF. Most videos and tutorials I can find seem to deal with resampling for data manipulation purposes rather than display purposes.

EDIT: The existing answers about Lanczos resampling are quite informative and will be useful as I go a bit further. However, my question isn't really about different interpolation methods, which I understand fairly well, but rather about what effect the specific settings in QGIS have on rendering the raster layer.

Normally, I would investigate this by changing the settings and visually comparing the result, but I don't see any difference when I apply them (other than the image not rendering at all under certain settings at certain zoom levels). In short, I don't understand from the setting names how I should expect them to affect the image. Specifically:

What are the "zoomed in" and "zoomed out" settings, and what steps should I take to compare them visually? Are these related to upsampling and downsampling, as described in the Lanczos article?
What is "oversampling", and how does it affect an image visually?
Are any of the other symbology settings relevant to the visual appearance of something like a topographic map?