texts: Point pattern fill with randomly roatetd symbol in QGIS

texts:
I'm looking for a way to fill polygon(s) in QGIS with randomly rotated symbols, to reproduce this effect:

This was generated with Illustrator, and as such it is actually a periodic pattern, reproduced many times, but the wavelenght is large enough compared to the polygons and you do not notice unless you pay attention.

I tried to reproduce this effect with QGIS. My approach was to use a point pattern fill, with a short line segment as the base symbol and appropriate offset, and each line being rotated by a random amount -- this is controlled by an expression, rand(-180,180) (notice the yellow expression next to "rotation").

Although the preview looks reasonable, the final rendered effect is not:

Here, we see that the pattern is built of rather small tiles (the size of the preview, more or less, i.e. approx. the distance between two symbols in this case). We see the tiles repeating themselves way too quiclky for aesthetics, and we also notive that some symbols happen to be truncated on tiles edges -- QGIS is apparently blissfuly ignorant of this fact, and we end up with "wedges" corresponding to corners of the pattern.

And so, I would suggest that a possibility to solve my problem is to force QGIS to calculate a larger tile. But how? More generally, how to generate a random (or pseudo-random) pattern?


texts: How to move points to another polygon based on attribute?

texts:
I have a point layer and a grid cell/fishnet layer. Each point falls within a grid cell. Now I want to move some of the points to another (the nearest) grid cell based on an attribute that exists in the attribute tables of both layers.

The attribute contains information on the neighbourhood. Some points fall within a grid cell where the value of this attribute is not equal for both layers. So, I want to move these points to the nearest grid cell that has the same value regarding this attribute.

Does anyone have an idea?
I use ArcGis 10.2 Advanced.


texts: Change NODATA pixel value in raster to arbitrary value

texts:
I want to change the value in all pixels that are currently 0 to 800 in QGIS 2.6.1. 0 is listed as the no-data value in Properties > Transparency. I have unchecked the No Data Value box there. Then I have tried the following.

1) Set Settings > Option > Data Sources > Representation for NULL Values = 800. Save as... to make a new .tif raster layer, WITH and WITHOUT specifying a range for No Data Values in the Save As... dialog. I thought that maybe a range from -1 to 1 would handle real-representation zeroes better. Either way, the raster returned is just like the original, with no change to the no-data (value=0) pixels.

2) Processing Toolbox > Geoalgorithms > Raster > General Tools > Raster Calculator, with expression: ifelse(lt(a,1), (800), a). Still no dice, the no-data value is now -99999.

3) Raster menu > Raster Calculator, with expression: ("my layer here@1" >= 0) * "my layer here@1". Interestingly, now the no-data value is -3.40282...E+38.

4) Processing Toolbox > Geoalgorithms > Raster > Edition > Reclassify Grid Values. This tool didn't work at all. Tried [0] Single, [1] Range, and [2] Simple Table options, with and without saving to a file. Log gave a bunch of errors about being unable to load modules. The path to the .dlls is correct.

5) Processing Toolbox > Geoalgorithms > Raster > Edition > Reclassify (Simple), with range option -1 to 1. Returned a raster with the no-data value = -99999.

For the record, all tests were done with the Null Representation = 800, but I also tried several of the methods with the default representation of NULL. Results were the same. I have also exported the raster as XYZ format and looked at it in CloudCompare; the null values are being expressed as the value reported in Properties > Transparency.


texts: Prevent deletes in a versioned FC at the application level

texts:
In Prevent deletes in a versioned FC at the database level (a related question), we determined that it's not possible to prevent deletes from a versioned FC via functionality in the database.
As an alternative, is it possible to prevent features from being deleted from a versioned FC—via logic in the application (ArcGIS Desktop 10.7.1)?


texts: Seeking downloadable Village layers for India with census 2011 information?

texts: Does anyone know where I could download a layer of all villages in India together with their populations (hopefully from the 2011 census)?


texts: PostGIS - Add Column of Lines that Intersect Point

texts:
New to PostGIS. I have a road network which I have self-intersected/inner joined to generate nodes at each intersection.

I would like to add a column to the junctions table which lists all of the lines that intersect the generated node. I'm removing duplicate geometries, so at currently pulling the road_id's from the input data ends up with two identifiers, even when junctions have 3+ roads.

Is it best to not remove duplicates upon initial creation, and then alter table to remove duplicates and concatenate the road_ids into a single column? Or can the code be adjusted to do this on creation?

Have searched but can't find anything.

EDIT: Code used to create point geomteries below.

CREATE TABLE junctions as
SELECT
    ROW_NUMBER() OVER () AS junction_id,
    ST_Intersection(a.geom, b.geom) AS geom
FROM roads a
INNER JOIN roads b
  ON a.geom && b.geom
  AND ST_Intersects(a.geom, b.geom)
  AND a.road_id != b.road_id
GROUP BY
    ST_Intersection(a.geom, b.geom);
;


texts: How to Find if set of Polylines are Connected?

texts: I am using ArcGIS 9.3. I have a Polyline Feature class with attribute field as Street_Name. I want to Check if for say Street_Name='My Street' (say around 10 Features from the layer) all the polylines are Connected to each other. Edges in the Layer can be complex edge with multiple vertices. Any idea ?


texts: How to make SVG Stabius-Werner projection

texts:
I'd like to create a SVG file of a Stabius-Werner projection of the Earth.

The image in the linked page is nice in that it's very high resolution (2,058 x 2,065 pixels), but I'd like to see if I can get at least the line information (if not all the land detail which I know probably needs to be raster-based rather than vector-based) like the latitude and longitude lines to be vector-based.

The description of the image mentions that it was "...created with the Geocart map projection software" and reading the user manual it looks like Geocart could export vector files, but the application is very pricey.

What are some other ways to do this?


texts: Default output file type when exporting to CAD

texts:
The default format for export format for ArcGIS 10.1 is DWG_2010. Is there any way to change it to another format? In my case I need it to DXF_2000.
The only known way to export to cad for me is right click on the geodatabase -> data -> export to cad.


texts: parse error - invalid geometry even though ST_ISVALID returns true

texts:
I have a function to return a reduced size version of the geometries in our database.

CREATE OR REPLACE FUNCTION fog.small_kml(
    shape geometry,
    max_length integer)
    RETURNS text
    LANGUAGE 'plpgsql'
AS $BODY$
 DECLARE kml text;
 DECLARE tolerance float;
BEGIN
    tolerance:=0.001;
    SELECT ST_ASKML(shape) INTO kml;

    WHILE LENGTH(kml) > max_length LOOP
        SELECT ST_ASKML(ST_SIMPLIFY(shape, tolerance)) INTO kml;
        tolerance = tolerance + 0.001;
    END LOOP;

    return kml;
END
 $BODY$;

when I run this on certain geometries I get get the result

ERROR:  parse error - invalid geometry
HINT:  "<M" <-- parse error at position 2 within geometry
SQL state: XX000

occurring due to the statement SELECT ST_ASKML(ST_SIMPLIFY(shape, tolerance)) INTO kml;. However, ST_ISVALID says that the geometries are all valid.

Is there anything I can do to force the geometries into a state where I can simplify them? The length of the KML is around 12 million characters for the largest, which is why I want to simplify (and why I can't paste the whole thing here).

Each one starts <MultiGeometry><Polygon><outerBoundaryIs><LinearRing><coordinates> and I've had no issues with them before other than being slow. It seems to be ST_SIMPLIFY only that has an issue.


texts: How to instantiate a new map with proj4leaflet projections from a Bootstrap dropdown menu

texts:
I'm currently working on a Leaflet website that will be able to display GPS-Tracks with different projections. Now I'm trying to implement a dropdown menu based on Bootstrap, where I can set different coordinate reference systems (CRS), see code below:

              Projections

Switzerland

LV95

RT90

Sweden

SWEREF99TM

SWEREF99

ST74

For example, I have the Swiss LV95 CRS, among others, in a separate .js file from which I would like to call it. This is an example of how to call a proj4leaflet CRS when instantiating a new map:

var map = new L.Map('map', {
crs: LV95
});

L.tileLayer('http://api.geosition.com/tile/osm-bright-3006/{z}/{x}/{y}.png', {
  maxZoom: crs.options.resolutions.length,
  minZoom: 0,
  continuousWorld: true,
  attribution: 'Map data © OpenStreetMap contributors, Imagery © 2013 Kartena'
}).addTo(map);

So when I click on the "LV95" Dropdown element, it instantiates a new map with the respective CRS overwriting the old var map = L.map.

Are there any efficient implementation ideas or critique for my approach?


texts: ArcGIS REST export map features as geoJSON

texts: Is it possible to export the features from a map as geoJSON using an ArcGIS REST service?  I'm trying to make a vector layer in OpenLayers based on the output from the map's present view based on a layer.


texts: How to add data to attribute table in ArcGIS 10.4?

texts:
I have a question about how to add data manually to the attribute table of a shapefile. Whenever I add data to the file or need to change data in the file, I right-click on the layer and select "Edit features". Then I open the attribute table of the file and begin adding/changing data. I save my edits, save the entire file, and then stop editing. The data is saved in the attribute table.
The problem I am having is that the data I add to the attribute table never shows up on my map (I have chosen to add the data to my map as a point -- the points are labeled by the values in a selected column)
What am I doing incorrectly?


texts: Accessing downloaded shapefiles/attribute data?

texts:
Using 3.8, I am attempting to create a simple map of the UK showing the county boundaries, with a couple of specific locations shown for reference. My approach for attempting this has been to attempt to download shapefiles from here plus a few other sources. The download appears to work well and I extract the data to a new folder.

Using Add Vector, I select the .shp file of relevance and a layer duly appears in the panel. However, nothing appears in the viewer. Similarly, when selecting the layer and clicking View Attribute Table, nothing appears in this table. Using the editing tools also does not highlight anything.

There are two possible explanations, 1) I am missing a vital (and probably simple) step in the download and import process, involving the specification of attributes, or 2) there is no visible attribute table within the downloaded packet.

This is not a projection nor viewing error as far as I can ascertain.

How do I incorporate attributes when importing such downloaded data?

I attach an image of the files in the folder as it was extracted from the sip file. I was aware that the shape files are made up of several types of file, but was under the impression there was additional information needed other than what is in this image. I also attach an image from the same download of a larger folder. I am happy to make these data available but would need further instruction regarding how to do this on the forum without breaking rules.

larger dataset

I downloaded additional data using the link in the comments, as well as downloading the original data a second time. I attach a screenshot. Still nothing is visible, irrespective of whether the projection is present or not. I will attempt a reinstall otherwise.


texts:
I'd like to hook up keyboard shortcuts to my map controls e.g. holding down 'z' will activate the zoombox tool etc. I can't seen anything relevent in the API for doing this. Is it easily done? My controls are sat beneath dojo toggle buttons and menu items like so:

// zoom tool
zoomBoxTool = new OpenLayers.Control.ZoomBox();
map.addControl(zoomBoxTool);

// zoom button
var zoomBoxButton = new dijit.form.ToggleButton({
    label : "Zoom",
    iconClass: "zoomIcon",
    showLabel : false,
    onChange : function(val) {
        toggleTool(val, zoomBoxTool, this)
    }
});


texts: Write raster: Error in .rasterObjectFromFile

texts:
I am working on a hydrological model written in R. When I run the following line

DEM <- raster("\\D:\\Working\\Research work\\DDD\\Input_ParamFile\\DEM_Gil.tif")

I get the following error:

Error in .rasterObjectFromFile(x, band = band, objecttype = "RasterLayer",  : Cannot create a RasterLayer object from this file. (file does not exist)"


texts: Aggregating image information over two features in Google Earth Engine?

texts:
As per Iterating over years for features in feature collection using Google Earth Engine?, I am currently working with the Hansen data (Global Forest Change) in Earth Engine. I have imported two feature collections representing districts in a specific country, as well as oil concessions for that country.

I figured out how to aggregate information for each district in its respective feature collection, as follows:

//Load and filter the Hansen data
var gfc2014 = ee.Image('UMD/hansen/global_forest_change_2015').select(['treecover2000','loss','gain','lossyear']);

//add country districts as a feature collection
var distr = ee.FeatureCollection('ft:1U7sXFHXtxQ--g7XMeXlvPhNXPBcDtPg8Yzr2pvsg', 'geometry');

//load oil palm concessions
var oilPalm = ee.FeatureCollection('ft:1Q-5XgXQpAeRhILPoPTx8gnGTzUpSJx-EtKu_BCw', 'geometry');
//get oil palm in country
var oilPalmCont = oilPalm.filterBounds(country);

//look at tree cover, find the area
var treeCover = gfc2014.select(['treecover2000']);
var areaCover = treeCover.multiply(ee.Image.pixelArea());

var lossIn2001 = gfc2014.select(['lossyear']).eq(1);
var areaLoss = lossIn2001.multiply(ee.Image.pixelArea());

var districtSums = areaCover.reduceRegions({
  collection: distr,
  reducer: ee.Reducer.sum(),
  scale: 100,
});

//This function computes pixels lost for each district
 var addLoss = function(feature) {
  var loss = areaLoss.reduceRegion({
  reducer: ee.Reducer.sum(),
  geometry: feature.geometry(),
  scale: 100
});
return feature.set({loss2001: loss.get('lossyear')});
};

// Map the area getting function over the FeatureCollection.
var areaLosses = districtSums.map(addLoss);

What I would like to do, is to reduce deforestation information over each concession, so that each concession has an associated loss area, and then to aggregate this information over district. In the end, the district feature collection should have a variables indicating number of concessions in the district, and area deforested in the concessions area.

I feel like this should be straight forward, but I can't figure out how to aggregate information over two features.


texts: Re-running ArcGIS Desktop geoprocessing tool from Toolbox history?

texts:
According to the ArcGIS Desktop documentation on Viewing tool execution history:

  This historical information is very useful for determining how data
  was created and can be used to rerun a process.

If I restart ArcMap 10.6 I have lost all previous geoprocessing tasks in the results window.

How can I re-run a logged geoprocessing task using the information stored in the log file other than doing it manually?


texts: Scratch file used for Merge step in ArcGIS (10.3.1) Model does not keep all fields of input files

texts: I am using a nested model to merge a large number of Shapefiles, then dissolving them based on a specific attribute. The solution to this was outlined in another question (Dissolving shapefile but retain attribute fields using ArcGIS Desktop?). But if I use the option to store the Merge result as a scratch file, all my fields but one are not in that file, so my end result when I try to spatially join the Merge result to get my fields back is that - of course - they aren't there. But, if I specify a permanent Shapefile for the Merge step, and use that as my input to the Dissolve step, all my original fields are there in my final result. Is there some step I am missing or is there a bug in the use of a scratch file for my Merge step?


texts: Using line of sight or something similar to identify where lines go through hills

texts: When QCing power infrastructure I am having to zoom into every gap and check to make sure the line makes sense (not going through the mountain).   I typically check for odd spacing between the pylons and zoom into the imagery.  What I want to accomplish is have some tool identify where the 'line of sight' would intersect with the DTED_Level_2.  Is there a tool in ArcMap 10.1 that can accomplish this?  I have 3D Analyst installed.


texts: Cannot get color plot of single band TIFF image with rasterio

texts:
I want to work with TIFF files of aeronautical charts supplied by the FAA here.
The Python module rasterio seems to be the right tool for my purposes and I’ve been through several tutorials and reference docs.  They all work for me, but not with the the data I want to use.  I cannot seem to get it to display properly in color.
The main difference seems to be that my data is single band (as reported by dataset.count) whereas all the tutorials have three or more bands.
For example, the following code should display the chart:
import rasterio
from rasterio.plot import show
dataset = rasterio.open ('Green_Bay_101/Green Bay SEC 101.tif')
show(dataset)

The resulting plot has the colors all wrong.
Screen shot of image produced by above code
But it should look like this:
Screen shot of image shown with macOS Finder
I’m sure that I’m missing something basic, but I cannot find it.  Would someone point it out?
I first posted this on StackOverflow but I think that's the wrong place.


texts: Attribute Assistant choose GenerateID Sequence Name based on Location

texts: I am trying to set up Attribute Assistant to populate the UNITID field in my Manhole feature class. The problem i am facing is that the county is split up into four regions; NW, NE, SE, SW. and the UNITID field is set up to have the region first and then that regions unique number.  Example NE003 or SW046.  Each of these regions has their own Sequence Counters and are independent from each other.  So is there a way to say: IF manhole is placed in NW Region then use the NW Sequence Name in the GenerateID table? It is not as simple as the Generate ID By Intersect Method because the name of the sequence is based on the Manholes location.  Hope all that makes sense.


texts: GAUL: Genetic Algorithm Utility Library has anyone use it in a C# solution?

texts:
The GAUL library is the library used for Pgrouting to do some of its functions. Has anyone use this library in a C# solution?

If you do, do you have the wrappers needed for this or could you point me in the right direction to create those?


texts: Adding an automatically updating column in a point layer with information from another point layer in QGIS

texts: I have 2 point data layers.  Point A layer is for capturing features in the field and point B layer contains postcode data.  What I am trying to achieve is when a point feature is created in point A layer it automatically updates a column in point A layer with the nearest postcode from point B layer. Anyone have any ideas on how I can achieve this?


texts:
I download .shp and .dbf files for roads, extract it and save to database. I display points with the same name as the street on my own Google Map.
This is how it looks like:

I found that not each point across the road have the same "osmId", so how to get all coordinates across all road. This is how it looks like when I put osmId on markers, there are different (the first row is "osmId"):

When I extract this data i had field called "name" - it means name of road. But this name is not unique, there are several roads with the same name. This is an example of data extracted from .shp and .dbf file:
{
"geometry" : {
    "coordinates" : [
        [
            20.0343585,
            50.0806794
        ],
        [
            20.0345215,
            50.0807741
        ],
        [
            20.0346159,
            50.0808264
        ]
    ],
    "type" : "LineString"
},
"type" : "Feature",
"properties" : {
    "osm_id" : "2954554",
    "code" : "5122",
    "fclass" : "residential",
    "name" : "Ignacego Mościckiego",
    "ref" : null,
    "oneway" : "B",
    "maxspeed" : 40,
    "layer" : 0,
    "bridge" : "F",
    "tunnel" : "F"
}
}

There is no some kind of unique id field that can tell me that this data is connected with also other parts of data and together they created a unique road.
So how to get all points across the specific road? Is it possible? I extract data from .shp and .dbf files.


texts: Converting date field to string using ArcGIS Online?

texts:
I want to create a unique ID field for each row of data based on the created_date and OBJECTID. For example, if a sample of data had a created_date on 4/28/17 and an OBJECTID of 1, than I would want the unique ID field to be 20170428-1.

I believe I first have to convert the created_date field to string, and then concatenate the date (string) field with OBJECTID. I am using ArcGIS Online's Expression Builder to do this.

In order to convert created_date to string, I have tried using the CAST function, but that does not work. I have also tried to use the EXTRACT function to extract the year, month, and day from the date in order to combine them, but I can only extract one portion of the date (ex: just the year).

Would the Convert Time Field tool be of use to me?


texts: smooth (Lon, Lat, Value) data over shapefile / smoothed data on shapefile

texts:
I am trying to plot a data with (Lat, Lon) and a value in each location. What I need to do is to plot the data over a shapefile, represent each value with a different color, and smooth the values, so no gaps occur in the map.

The data has the following structure: (Longitude, Latitude, Value), could you help me please.

I know how to plot the data over a shapefile with a different color, but the issue is in smoothing the values.

The data for the question is available in the following link:

https://drive.google.com/open?id=1bOpWjPoYc0Ix1cQqA73iFr-by0J1wU5l

where the:

1- (Lon, Lat, Value) data is in csv file "cluster__groups"

2- The shapefile files are in the folder "shapefile_question"

I need  to show them in regions. The output should be something similar to the following image:
[

I tried to solve and search for a solution but could not find a solution.


texts: Generating dummy variable if point lies inside polygon using QGIS

texts:
I have a set of polygons in JSON or GeoJSON format and a set of points in a CSV (both containing geographic coordinates). I am able to join these two datasets in QGIS and display them.
I want to generate a dummy variable equal to 1 if a point lies inside a polygon and to 0 if it does not.
The 'Points in polygon' function in QGIS does not help me with regard to this.


texts: Using R to convert British National Grid to/from WGS84 without creating spatial object

texts:
I have several million coordinates (which are either British National Grid or Long/Lat) and need to convert them. I know using R you can do this in a spatial operation (such as in my example below using sf). I was however wondering if it could be done without creating a spatial object first (and just be a mathematical function?). Is there a package that can do this, or has someone already written a function that does this that they are willing to share?
Pages 49 to 51 in this PDF detail a fairly long equation for the conversions - but before jumping into coding that I wondered if anyone had any alternative solutions.
library(data.table)
library(sf)

# Sample data
DT1 <- data.table(DT1_id = sprintf("%s%0*d", "UID_", 7, 1:3000000),DT1_x =sample(45000:55000, size = 3000000,replace = TRUE),DT1_y =sample(25000:35000, size = 3000000,replace = TRUE))

# BNG to WGS84
DT1_sf <- st_as_sf(DT1, coords = c("DT1_x","DT1_y"),crs=27700)

DT1_sf_4326 <- DT1_sf %>% st_transform(crs = 4326)

DT1[, LAT := data.frame(st_coordinates(DT1_sf_4326))[,2]]
DT1[, LONG := data.frame(st_coordinates(DT1_sf_4326))[,1]]

# WGS84 to BNG
DT1_sf <- st_as_sf(DT1, coords = c("LONG","LAT"),crs=4326)

DT1_sf_27700 <- DT1_sf %>% st_transform(crs = 27700)

DT1[, EASTING := data.frame(st_coordinates(DT1_sf_27700))[,1]]
DT1[, NORTHING := data.frame(st_coordinates(DT1_sf_27700))[,2]]


texts:
Garmin BaseCamp recognizes and receives data from my GPSmap 60CSx, but QGIS GPS Tools plugin does not.  Am I missing a step?  I want to be able to transfer data both directions.

MacOS 10.6.8
QGIS 1.7.2


texts: How to detect the edge of the the curve?

texts:
I'm using MATLAB edge function to find the edge of an item in a picture. It's easy to deal with some individual item, like:

I can use edge function to get the boundary

However, when the picture change to

the boundary will be

It's obvious that in figure 3, there are two thick curves that are crossed. Is it possible to get the boundary for any individual one, rather than to get the boundary in figure 4?


texts: Not able to authorize GeoServer with LDAP groups

texts:
I'm using GeoServer 2.8.5 and having problems authorizing using LDAP groups.
The authenticating works fine as I can logon with my LDAP users.
But if I try to Preview a layer which is only authorized for the according group I get the error:

  Cannot [Store name] with the current privileges, The server understood
  the request but refuses to authorize it. Http status 403 Forbidden.

If I try the above with the local admin or a local user with the correct rights it works fine.
My LDAP settings (it is a test) are:

Server URL: ldap://ldap.forumsys.com:389
TLS: [Not checked]
User lookup pattern: uid={0}, dc=example,dc=com
Filter used to lookup user: [empty]
Format used for user login name: [empty]
Use LDAP groups for authorization: [checked]

And the rest empty

In the role service section I have:

Server URL: ldap://ldap.forumsys.com:389
TLS: [Not checked]
Group search base : dc=example,dc=com
Group user membership search filter: (&(objectclass=groupOfUniqueNames)(uniquemember=*))
All groups search filter: (objectclass=groupOfUniqueNames)
Filter used to search users: (objectclass=person)
Authenticate to extract roles: [Checked]
Username: cn=read-only-admin,dc=example,dc=com

(it is een test server)

I am able to see the roles provide by LDAP.


texts:
I successfully created workspace in GeoServer using cURL in PHP following the GeoServer REST Guide. But I am having problems when trying to upload Shapefile. I followed the instructions on Uploading Shapefiles from GeoServer REST Guide but I can't seem to get it right. I keep getting Wrong Magic Number error. Also I want to upload shp file rather than zip.

I am a beginner in GIS.

Update

Everything works fine when I use CURL

curl -v -u admin:geoserver -XPUT -H "Content-type: application/zip" --data-binary @trash.zip localhost:8080/geoserver/rest/workspaces/mySpace/datastores/…

but fails with the following PHP code:

<?php $ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://localhost:9090/geoserver/rest/workspaces/mySpace/datastores/trash/file.shp");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$post = array( "file" => "@" .realpath("trash.zip") );
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($ch, CURLOPT_USERPWD, "admin" . ":" . "geoserver");
$headers = array();
$headers[] = "Content-Type: application/zip";
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
curl_close ($ch); ?>


texts: Atlas Composer - how to avoid tabledata from other objects?

texts:
I have a layer with multiple objects from where I want to list up the tables with a printoutput for each object. Some of the object are close to each other and therefore the tables of the objects collide on the output. Until now my solution is to split up the layer to several layers (by an unique ID I´ve given them). This I´ve been forced to do especially when handling conflicting objects that you can´t manage by setting the "Margin around feature". Look below.

Is my solution the best way doing it?


texts:
I would like to know how many WMTS tiles are loaded when I navigate.
I use a WMTS feed which has a yearly limit of 2M transactions and I have to monitor my use of it to prevent reaching this limit, so knowing how many tiles are loaded depending on the size of my QGIS window would help.


texts: Select #levels and tile size for making pyramid using gdal_retile for geoserver

texts:
I am looking at the tutorial for building tiles for use in geoserver. https://docs.geoserver.org/stable/en/user/tutorials/imagepyramid/imagepyramid.html
The example for building a pyramid is:
mkdir bmpyramid
gdal_retile.py -v -r bilinear -levels 4 -ps 2048 2048 -co "TILED=YES" -co "COMPRESS=JPEG" -targetDir bmpyramid bmreduced.tiff

I wonder how to decide/rule of thumb on how many levels to select and its implications and what to consider selecting tile size? In my case its an orthophoto with a total size of 250GB (split into 8000 files).
-levels 4: the number of levels in the pyramid
-ps 2048 2048: each tile in the pyramid will be a 2048x2048 GeoTIFF
Are there any general guidelines to make a good decisions?


texts: Align approximately colocated vector points for comparison

texts:
I have a more general, methodological question and do not have much knowledge about GIS techniques.

I have 6 topographic survey ([x,y,z] point clouds), each representing the same dune/beach system at different points in time. The surveys were conducted so as to have each point be as close as possible to the same point in the previous survey. Of course, the positions are not actually identical, but do represent the evolution of the beach at a given point through time due to storms, etc.

I would like to compare the change in elevation through time on a point-by-point basis. Should I just define a buffer around each point in a survey and clip the successive survey, in an attempt to capture the correct point in the buffer for comparison?

The data sets have 10000+ points and I can envision this become sloppy with overlapping buffers, etc. If you know of a more precise method or strategy to tackle this problem, let me know and I can read the documentation. Also, if I need to rephrase the question, let me know, my GIS lingo is also poor.


texts: Display a map bounds-based rectangle while dragging

texts:
I have an interface where, while the map is dragged, a rectangle is drawn on the map.

I've created a stripped down version of this functionality via this plunkr. The JS used for the plunkr is this:

var map = new L.Map('leaflet', {
    layers: [
        new L.TileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
            'attribution': 'Map data © OpenStreetMap contributors'
        })
    ],
    center: [36, -98],
    zoom: 6,
    renderer: L.svg({ padding: 100 })
});

var rectangle = L.rectangle(map.getBounds().pad(-0.1));

map.on("dragstart", function (e) {
  var b = map.getBounds().pad(-0.1);
  rectangle.setBounds(b);
  rectangle.addTo(map);
  map.on("drag", dragEvent);
});

map.on("dragend", function (e) {
  rectangle.removeFrom(map);
  map.off("drag", dragEvent);
});

map.on("mouseup", function(e){
  console.log("mouseup!");
});

var dragEvent = function(e) {
  rectangle.setBounds(map.getBounds().pad(-0.1));
}

This appears to work okay in Chrome and Internet Explorer. The problem I'm encountering is with Firefox (v59.0.2 64bit on Windows). In FF, if you click and drag the map, and release the mouse button while hovering over the rectangle, there seems to be a missing mouseup event. This means that if you hover over the toolbar on the right of the plunkr, you won't see the expected hover behavior until you click somewhere on the toolbar.

My questions, then:

Is there a better way to implement this functionality?
If not, anyone have an idea why this is occurring with FF?


texts: How to obtain rotation field name defined in the Labels "Data Defined" section in pyqgis?

texts:
I'm trying to find how to get with the QGIS Python API the layer field name that contain the rotation angle used by a layer to rotate its labels?

I know that I can obtain the field name containing the text used to label features this way:

palyr = QgsPalLayerSettings()
palyr.readFromLayer(layer)
f = palyr.fieldName

but I can't figure out how to obtain the rotation field name when setted in the "Data defined" section... The QgsPalLayerSettings classe contain a lot of methods related to the manipulation of "DataDefined" properties and a basic example would be very appreciated...

Thanks a lot

Etienne


texts:
Is there a way to convert a geodatabase (ArcGIS Geodatabase Version 9 according to their website) to other formats such as shapefiles / geopackage for feature layers and geotiff for rasters using a open source solution?

I am trying to convert:
http://www.cger.nies.go.jp/db/gdbd/data/Africa.zip

from website:
http://www.cger.nies.go.jp/db/gdbd/gdbd_index_e.html

I tried GDAL (2.1.1,) and OGR but the driver is not supported. Export using Arcmap works fine but I prefer a linux based solution that can easily be automated.

Database contents in ArcMap and ArcCatalog below


texts: Sending arguments to LAStools function from Python script not working

texts:
I`m trying to call the lasground module from a python script, using this method:

args=['lasground', '-i *.las', output_file, arg_step, arg_spike, arg_spikedown, arg_offset, arg_bulge, arg_cores]
proc=subprocess.Popen(args,stdout=subprocess.PIPE,stderr=subprocess.PIPE,shell=True)
output,error=proc.communicate()

The different variables starting with arg_ are strings representing arguments that should be passed to lasground (for example if I want the step size to be 10, arg_step would be equal to '-step 10' and so on. The problem is that instead of working correctly, lasground throws back the following error:

  ERROR: cannot understand argument '-i *.las'

I suppose this has to do with the '' around the string, but every other executable file I have called from python in this way worked as expected. Is there another way to do this so as to send the arguments to lasground in an understandable format from python?

I tried setting shell=False but nothing changed so I am out of ideas.

I am using python 3.5., but I am open to solutions applicable to python 2.x.


texts: Proper gdaltransform syntax to transform a list of coordinates?


texts: What causes OTB pansharpening ERROR Inputs do not occupy the same physical space?

texts:
When I try to use the OTB pansharpening tool an error comes up and I don not really know what the problem is.

I have a RGB and a Band8 map (both from Landsat8) which I want to use for the tool. All the maps have the same projection.

  2014 Dec 12 12:52:06 : Application.logger (FATAL) The following error occurred during application execution : c:\users\jmalik\dashboard\src\itkv4\modules\core\common\include\itkImageToImageFilter.hxx:248:
  itk::ERROR: BayesianFusionFilter(0000000001026680): Inputs do not occupy the same physical space!
  InputImage Origin: [5.1780000e+005, 6.1611000e+006], InputImage_2 Origin: [5.1780000e+005, 6.1611000e+006]
  Tolerance: 3.0000000e-005
  InputImage Spacing: [3.0000000e+001, -3.0000000e+001], InputImage_2 Spacing: [1.5000000e+001, -1.5000000e+001]
  Tolerance: 3.0000000e-005


texts: Georeferencing Mosaic in ArcGIS Desktop?

texts:
I have a problem in my thesis, i georeference a lot of photos and after that i create a mosaic. But now, i know the ortho is shifting 5 meters.

Is possible to shift the mosaic without creating everithing again? a kind of georeferencing of a mosaic?

The Software is ArcGIS 10.3.


texts: Why do RGB values seem very high for my multispectral orthomosaic imagery?

texts:
I am using ArcGIS Pro (2.4.2) to analyze a 5-band multispectral image captured with a Matrice 200 (UAV). All image processing has been done with Agisoft Metashape, which includes calibrating spectral reflectance with a calibration panel and stitching the imagery together into a final orthomosasic.

When I look at the imagery in ArcGIS, I notice that my RGB values are very, very high. Much higher than the typical 0-255 RGB values that is expected for imagery. An example of the values that I am receiving is included below:

What is the reason for this, and how could I convert them back to the 0-255 range?


texts: Google earth engine: count number of null values per region

texts:
Following a previous post I now have some code which sets null values in an image collection to zero.
I have used this code on several variables, however, I'd like to know which variables have null values in, opposed to the value just being zero.
Is there a way of flagging or highlighting an image collection that has null values in it, and maybe counting them per region? I've tried to set the value of the band to the metadata which I can then filter for, but it doesn't seem to work. My code is below
var currentSpeedNulls = currentSpeed.map(function(image) {
  var Nulls = image.unmask(-999);
  return image.set("current", Nulls.get("current"))});

var currentSpeedNulls1 = currentSpeedNulls
.filterMetadata("current", "equals", -999);

var currentSpeedNulls_mean = currentSpeedNulls1.mean();

//count nulls per region
 var currentSpeedNulls_region = currentSpeedNulls_mean.reduceRegions({
  reducer: ee.Reducer.count(),
  collection: reefs_500,
  scale: 30});


texts: Reduce level of detail for vector contour lines

texts:
Possible Duplicate:
  Simplify Raster Contours ArcGIS 10

I have quite a huge shapefile storing vector contour lines: 1GB. I want to create a detailed heightmap for further 3D usage but the level of detail is so high that it crashes all generators. I tried to use:

ArcGis Desktop 10.1 - TopoToRaster (calculated 7 hours and still not finished)
Grass - r.surf.contour (created only low quality when converting vector map to raster map)
Quantum Gis 1.8.0 - Vector->Interpolate->Interpolate (crashed with a bad allocation exception)

I came to the result: I need to simplify my contour lines. Is there a way how I can reduce the level of detail of my contour lines? Basically the process should remove or merge lines to reduce the density.

http://img705.imageshack.us/img705/2809/simplified.gif
(quick version made by hand)

It's okay if the algorithm also simplifies the vectors like MapSharper.


texts: FME 2017 transformer AreaOnAreaOverlayer does not have Remnants port

texts: Remnant port of the AreaOnAreaOverlayer FME transformer does only exists on the 2018 (or newer) version of FME. However, I only have access the 2017 version for now. Do you know a way to round it by using others transformers or method which would returns the same output ?


texts:
I am using QGIS 3.02. I opened a GDB file in QGIS and saved it as a shapefile in EPSG: 4326. Now I want to save it in EPSG: 2264 but I am running into an issue. Every time I save it as EPSG: 2264 the features disappear - QGIS produces a layer with zero features, and nothing is visible on the map.

What could be the issue?


texts: Inspecting lat long of shapefile using QGIS?

texts:
I have a shapefile that shows up in QGIS and ArcGIS correctly.

But when I inspect the attributes of the layer it does not have latitude or longitude.

I need to extract the coordinate system so I'm looking for the lat/longs using QGIS.


texts: SOLVED: geoserver.catalog.FailedRequestError: Failed to load coverage information:Failed to create reader from file

texts:
I have the error

geoserver.catalog.FailedRequestError: Failed to load coverage information:Failed to create reader from file:/home/tomcat/data/GaiaGisDataDir/MOSAIC_DATA_DIR/id1626s011002r000-europe/ and hints null

from this piece of code.

from geoserver.catalog import Catalog, FailedRequestError
from sys import argv

GEOSERVER_SERVER = argv[1]
GEOSERVER_USERNAME = argv[2]
GEOSERVER_PASSWORD = argv[3]

cat = Catalog(GEOSERVER_SERVER, username=GEOSERVER_USERNAME, password=GEOSERVER_PASSWORD)
all_stores = cat.get_stores()
for s in all_stores:
       coverages = cat.mosaic_coverages(s)
       print coverages
       all_granules = cat.list_granules(coverages['coverages']['coverage'][0]['name'],s)
       print all_granules

What I wrong?

The directory /home/tomcat/data/GaiaGisDataDir/MOSAIC_DATA_DIR/id1626s011002r000-europe is

drwxrwxr-x   3 tomcat    tomcat  16384 Jul 31  2017 ./
drwxr-xr-x 614 tomcat    tomcat  45056 Jan 12 09:07 ../
-rw-rw-r--   1 tomcat    tomcat    345 May 27  2016 datastore.properties
-rw-rw-r--   1 tomcat    tomcat    231 May 27  2016 indexer.properties
drwxrwxr-x   6 tomcat    tomcat   4096 Nov  3  2016 .svn/
-rw-rw-r--   1 tomcat    tomcat     23 May 27  2016 timeregex.properties
-rw-rw-rw-   1 eumetflow tomcat 113094 Jan 10 17:43 wind_p011002_BL_4326_id1626s011002r000-europe_20190110T144300.gaiag.tif
-rw-rw-rw-   1 eumetflow tomcat 113666 Jan 10 17:43 wind_p011002_BL_4326_id1626s011002r000-europe_20190110T144600.gaiag.tif
-rw-rw-rw-   1 eumetflow tomcat 115606 Jan 10 19:23 wind_p011002_BL_4326_id1626s011002r000-europe_20190110T162200.gaiag.tif


texts:
I want to run atmospheric correction on my Landsat TM5 picture using FLAASH (ENVI 4.8) but when I input radiance image (BIL format) into it, then this message is shown: "Enter ASCII filename containing wavelengths and FWHM" and when I enter metadata text file, it is not accepted.

I dont have wavelengths and FWHM in my metadata files which I have downloaded through USGS site.


texts: Some geometries don't work with ST_Union and gives a non-noded intersection

texts:
I'm getting a lot of errors like this:

GEOSUnaryUnion: TopologyException: found non-noded intersection between LINESTRING (147.254 -42.8705, 147.254 -42.8705) and LINESTRING (147.254 -42.8705, 147.254 -42.8705) at 147.25355728849621 -42.870521684000678

I am calling ST_MakeValid(ST_Union(ST_SnapToGrid(mpoly))) on an aggregate of all rows that match my filter.


texts: Postgis 2.0 - public.geometry_columns view does not contain correct info for views

texts:
We have recently updated our database to Postgis 2.0.

In our system we used to create views for tables containing a geometry column. After creating the view we also manually updated the geometry_columns table with necessary info. The views are used to create Geoserver layers and also to feed data for ogr2ogr.

The problem in Postgis 2.0 is that geometry_columns table was replaced with a view that retrieves data from system catalogs. In our case, for the created views, we don't retrieve correct info in 'coord_dimension', 'srid' and 'type' columns.
Info: after some research i've found out that geometry_columns view is using pg_constraint table to fill those columns, but for that view there are no constraints defined.

Does anyone have any idea how can we fix this problem? How can we force gemetry_columns view to retrieve necessary info? Is there a workaround or other way in doing this?


texts: ArcGIS for Server, find publisher of a service?

texts: Is there a way to find out who published an ArcGIS Server service? In ArcGIS Server manager there seems to be no way to get this information, something like 'published by...' or something?


texts:
From time to time, the services on our ArcGIS server will not be available, and when requesting tiles, I will get a 'invalid url'. This is okay, sometimes it is scheduled downtime, maintenance or just some of our server scripts not bringing the services up again.

We also have a cache server in front of the ArcGIS server, that can serve often requested tiles really fast, w/o sending the request to the server.

The cache server is set up to store the successful requests for a period of time. The thing that bothers me, is that the page 'invalid url' is served with the http code OK 200, and thus making our cache server store it.

Of course, I could make exceptions, probably based on mime-type or something, but that's not the optimal solution.

I would actually like to know if it is possible to alter the 'invalid url' error page, with another http code, such as Bad request 400 or Not implemented 501, both which would make Varnish behave.

EDIT:
I should mention that the ArcGIS server runs in a .NET environment.


texts: Conditional statement in raster calculator - ArcMap

texts:
I'm Just wondering how to incorporate a conditional statement basically to say:
if value in raster >= 128, then put in new raster, otherwise make the values null.

Basically the purpose of this is that I only want to show rivers and waterbodies within the raster, and I don't know of any other way to do this.


texts:
I have some data that is in NAD27, but I am having a hard time displaying it in QGIS.  I think that the problem is with the CRS.  I cannot seem to find the correct NAD27 option.  The closest one seems to be EPSG:2027 (NAD27(76)/UTM zone 15N), but my data points are still about 25 meters off.

This data plots up just fine in ArcGIS, and I have transformed it to NAD83, which I can use with no problem in QGIS, but this is an awkward workaround, and I would like to migrate this project into QGIS entirely.  Does anyone have an idea on this?


texts:
I'm tring to update the attributes of a field based on the attributes of another field as follows:

def vulProcessing(layer):
    layerV=QgsVectorLayer(layer,'','ogr')
    layerV.startEditing()
    for feature in layerV.getFeatures():
        if feature['Old'] == "H":
            feature['New'] = 'ddw'
    layerV.updateFeature(feature)
    layerV.commitChanges()

The code runs without error but the attribute table does not update.


texts:
I started the openGeo Suite 3.0.1 in Windows 8 and after a while I get this error:

Giving up on starting the Suite as it is taking longer than expected

Any idea?


texts:
I am new to QGIS.
I need to create both interior and exterior buffers around a country border, however MMQGIS does not allow me to create a buffer that is, for example, -10 km from the border. Now I'm forced to use the Vector, Geo Processing tool to create buffers with degrees but would rather use km or mi to stay consistent as I create buffers around the globe.
Could anyone advise with either method?


texts: Some time back, I came across a site that was offering sets of US state outlines that were intended to be attractive/artistic rather than geographically accurate. I only have this copy of the outline of Georgia from one of the sets, and I've lost track of the original site. Can anyone identify it?


texts: Collecting polygon features from many people with simple online form?

texts:
I work at a transportation consulting firm that works over a large geographic area with dispersed offices. We'd like to develop a database of the locations of our projects, so that we can easily find relevant past projects when starting new work. I'm trying to figure out if this is something we can do using arcgis online.

What I'd like would be a feature service that includes polygons for each project, with attributes for an identifying number and some other information. It would need to be collaborative, so that anyone in the company can contribute features. Ideally, I'd like to create a simple form that others in the company could access through a webpage to submit project info.  This page would use a "draw on the map" input to create shapes, and have some fields for the attributes.

Separately, I'd like to have a map with all features on it that could be queried by users.

I'm familiar enough with collecting features into a feature service using ArcGIS Collector on mobile, and displaying the results on a map or using the service layer in ArcMap. However, there are a few items I'm unsure about:

Is there a web-based method for collecting features? (something simpler and more error-resilient than editing a map through the arcgis online interface)
Could it be used without logging into arcgis online?
Could it be embedded in another webpage, possibly on an intranet?

I'm not sure if this functionality is something that's currently available in arcgis online, or if it would require arcgis server, or if I should be looking outside the esri universe.


texts: Build spatialite db from scratch within build process

texts:
Having a scripted build process on Windows 10 (CMD or Powershell, both is possible) I want to build a spatialite database with the ready to use but empty schema created from a couple of sql files.

I already found out, that it is possible to call

spatialite.exe -init <SqlFile>.sql <OutputSpatialiteDatabase>.sqlite

which creates an empty sqlite database with the given name, executes all commands in the sql script on it and then provides the interactive command shell on it (it does NOT exit).

Thats already pretty close to what I want, but I want to execute multiple Sql Files as these represent multiple (optional) parts of the schema that I want to create just on purpose (like use case specific modules).

Also the script should exit correctly afterwards and dont be stuck in a spatialite interactive shell.


texts: Getting/Passing Polyline object to geoprocessor as parameter

texts:
I want to know how can I get or pass a polyline to a gp tool using ArcObjects. Basically the tool just returns a line created in the gp.

Below is the code which I am using

JSONObject obj =  new JSONObject();
    try
    {

        GeoProcessor gp = new GeoProcessor();

        gp.addToolbox("D:\\gptools\\Toolbox.tbx");

        VarArray arr = new VarArray();

        IGeoProcessorResult res =  gp.execute("LineObject", arr, null);

        if(res.getStatus() == esriJobStatus.esriJobSucceeded)
        {
            GPLine v = (GPLine) res.getOutput(0);

            IPolyline poly = null ;

            v.setPolylineByRef(poly);

            obj.put("line", ServerUtilities.getJSONFromPolyline((Polyline) poly));
        }
        else
        {
            obj.put("error", "error");
        }

        return obj.toString().getBytes("utf-8");

    } catch (Exception e) {
        return ServerUtilities.sendError(500, "Error", null).getBytes();
    }

No such interface exception is thrown by below line

v.setPolylineByRef(poly)

Same happens if I try to pass a line to another gptool. Any idea how can I fix this issue?


texts: Markers not displayed in xhtml in OpenLayers

texts:
I just started working with OpenLayers because I want to include a map on my JSF page (.xhtml files). I want to use the same feature that is demonstrated in this example: http://openlayers.org/dev/examples/styles-context.html

I played with the code a little bit in the html example files that come with the .zip download.

When I copied the code into my JSF .xhtml page, the map appears but the markers are not displayed. Here is the example code:

<script type="text/javascript">
//<![CDATA[
var map;
function init(){
 map = new OpenLayers.Map('map', {maxResolution:'auto'});
var wms = new OpenLayers.Layer.WMS.InlineXhtml( "OpenLayers WMS",
 "http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic', format: 'image/svg+xml'} );
 map.addLayer(wms);

// create 50 random features in the northern hemisphere
 // give them a "type" attribute that will be used to style
// them by size
var features = new Array(50);
            for (var i=0; i<features.length; i++) {
 features[i] = new OpenLayers.Feature.Vector(
new OpenLayers.Geometry.Point(
                        (360 * Math.random()) - 180, 90 * Math.random()
), {
 type: 5 + parseInt(5 * Math.random())
}
);
 }

 // allow testing of specific renderers via "?renderer=Canvas", etc
 var renderer = OpenLayers.Util.getParameters(window.location.href).renderer;
 renderer = (renderer) ? [renderer] : OpenLayers.Layer.Vector.prototype.renderers;

            // create the layer styleMap with a simple symbolizer template
yer1 = new OpenLayers.Layer.Vector('Points', {
styleMap: new OpenLayers.StyleMap({
pointRadius: "${type}", // based on feature.attributes.type
 fillColor: "#000000"
 }),
 renderers: renderer
});
layer1.addFeatures(features);

 map.addLayers([layer1]);
map.zoomToExtent(layer1.getDataExtent());
 }
//]]>
 </script>

I added:

map.zoomToExtent(layer1.getDataExtent());

and changed the markers from 50 random to 2 markers of the coordinates of London and Berlin. And the map was centered exactly to show them, but the markers are still not displayed. But that proves that the markers are read and loaded to the map correctly, just not displayed. If I do the same back in the example .html page the map is again centered properly and the markers are displayed.

I have uploaded the example .html file to my webapp and it works perfectly. So this seems to be the .xhtml issue...

Is it the problem of xhtml? How to fix this?

EDIT:

Using the google console tool I analysed the code that was generated and it turnes out that in the .xhtml page the radious is zero:

<circle id="OpenLayers.Geometry.Point_41" cx="483.55555555555566" cy="150.7555555555556" r="" fill="#000000" fill-opacity="1" stroke="#000000" stroke-opacity="1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></circle>

Please notice that it's always r="" but why is that? The script code is IDENTICAL in both cases - one (.html) produces the right radios, the other(.xhtml) one doesn't...


texts: Money Amounts on ArcGIS Web AppBuilder Infograhics

texts:
I am using Web App Builder in ArcGIS Enterprise and I have found Infographics to be quite useful in building dashboards.

Currently I am trying to use Infographics to display the money amount for a long integer. Does anyone know how I can get the money sign "$" or the 'K' in the denomination? As they have done in the example below.

Do I need to go back to the data-set and change the data type? Or do I need to use another widget to display the field? Could be something that's coded too but I don't know the answer.


texts:
We have a lot of polygons (some of them contain holes) and there are also a lot of points inside different polygon, these data are processed as ESRI geodatabase format.

Now we have to do some spatial and property search in our JavaEE application which use the Oracle 11g as the database, for example, there is one kind of search, once use click in the map, we should return the points within the polygon where the mouse inside, and also we should filter the points by some additional properties.

And there maybe other spatial search in the future.

So I am not sure if I should use the Oracle Spatial in the application or we should use file geodatabase(*.gdb) directly?

1) Use oracle Spatial

Because we are not familiar with Oracle Spatial, so we do not know if there are any challenge?

2) Use file geodatabase

Use geodatabase or shapefile directly, since they support spatial and property query. But we wonder the performance?


texts:
I'm trying to load an ESRI FileGDB of USDA gSSURGO data into QGIS, but I'm having some trouble. I followed the instructions at KyngChaos.com to compile GDAL 1.11 and add the FileGDB plugin (running QGIS on OS 10.11). So I'm able to go to "Add Vector Layer - Directory - ESRI FileGDB," but when I load the GDB I don't get individual layers. I just get a layer that appears to have an attribute table and no feature types (see image). Not sure what's happening. I've seen a few similar questions that made me think there are just too many fields, perhaps. There are 56.

Very new to QGIS and very rusty on my GIS skills.


texts:
I am trying to set up a folder called 'November' on NEXTGIS such that I can add multiple web maps into subfolders called 1,2,3,etc over time. I want to give a web address to a coworker for the folder 'November' which will include links to all subfolders. They can monitor this page to see updated maps throughout November.
The resultant web page looks like this:

Is there a cleaner way of setting up a process such as this?


texts: Setting ProductCode for python script (Citrix environment)

texts:
I have set up a python script in ArcToolbox for our users.

However when running it with ArcView 10.0 licensing the script fails with:

  ERROR 000824:  The tool is not licensed

I think it's an Identity_analysis command triggering this error.

I've googled the topic and it seems there was a SetProduct(code) command, but I can't seem to get it to work.

Can someone provide the syntax to get this running, or is it a limitation running ArcGIS in a Citrix environment?


texts: I am using the Buffer tool in QGIS to put a 30 Meter buffer around a number of points. When I do this the buffer ends up taking over the entire map. enter image description here


texts: Convert shapefile to tiles for WMS requests

texts:
I have a shapefile (world countries) and this file is fix (I don’t want to edit it). I create a Vector layer with this file in GeoServer and I get this file with WMS layer from GeoServer.

In this pattern, GeoServer create tiles every time I request it the tiles, but I want to create all zoom tiles and save this tiles to disk and then add a pyramid layer to GeoServer.

How can I do it?


texts: Creating Hexagon from centroids of polygons using ArcMap

texts:
How do I create a hexagon from its centroids using ArcMap?
I will show the image below. It is H3 resolution 9.

This picture illustrate the centroid of the hexagon so I would like to know how to generate it.


texts: Can adding entropy to a copyrighted spatial data make it a new dataset?

texts:
I have a dataset of building polygons that is copyrighted. Say I applied some random noise to every point in each polygon, is there a theoretical measure at which the initial dataset is no longer identifiable, and the dataset becomes a completely different dataset?

I'm not certain that the dataset would still be useful at this point, but I'm curious if there is a legal or ethical argument justifying this approach.

The data is originally from the Ordinance Survey of Ireland with the following statement "The actual polygons are extracted from OS Maps which are under licence".


texts: I have removed the IR block filter from a Sony digital compact camera so it has become multispectral (in a way). In addition to that I placed a IR pass filter, so it only captures photos in the Near-Infrared spectrum. I was wondering if there is a way to create 4 different bands (R-G-B-NIR) -instead of the standard 3 RGB bands- by handling the raw files.


texts: Reprojection issue in Image collection after Filtering using Google Earth Engine

texts:
I am trying to reproject an image collection, but it fails after I apply filtering by (space, time, and cloudy cover percentage)!?
Here is the code:
Map.centerObject(geometry);

var S2_f = S2.filterDate('2018-07-03', '2018-07-24')
             .filterBounds(geometry)
             .filter(ee.Filter.lt('CLOUDY_PIXEL_PERCENTAGE', 5));

Map.addLayer(S2_f, {min: 0,  max:3000, bands: ['B4', 'B3', 'B8A']},'Before Reprojection');

print('projection original', S2_f.projection());

var proj = ee.Projection('EPSG:2062');

print('nominal scale', proj.nominalScale());

var S2_r = S2_f.reproject(proj, null, 10);

Map.addLayer(S2_r, {min: 0,  max:3000, bands: ['B4', 'B3', 'B8A']}, 'After Reprojection');

The error message is:
S2_f.projection is not a function
https://code.earthengine.google.com/20877d4ab79887bbbb663ffe89367b2e


texts: How to change color of a layer in openlayers?

texts:
http://www.cv.nctu.edu.tw/shapefile-js-openlayers/ol_simple.html

this is my website for test.

I add two layers in openlayers.

And I want to change color in one of two layers.

var myStyle = new OpenLayers.Style({fill: true,fillColor: "#ff0000"});
var BounderyshpLayer = new OpenLayers.Layer.Vector({projection: new OpenLayers.Projection('EPSG:3826'),style: myStyle});

why is it not work!?


texts:
I have a set of features (a few hundreds, can grow to a couple of thousands), which have a latitude and longitude. They are not stored in a database because they change frequently (another system is keeping track of them and feeding them to systems including the one in question).

I want to just keep them in memory because the information is very volatile (the objects will be moving on the map).

What is the best Java API I can use to query the closest N features of a certain type to a specific point?

I was looking at either JTS or GeoTools (which uses JTS under the hood), but couldn't find any examples of "find the nearest N features" (maybe I was looking at the wrong thing or searched with the wrong keywords).

JTS seems to have a KDTree that I gather is an efficient data structure for what I need? But no idea how to go from there.

The answer to Finding N nearest points to point using JTS? seems to indicate that more work is needed to do it, but there surely must be a way to do it from the APIs available that I am just missing, because this is such a common requirement (closest restaurants, closest ATMs etc.).


texts: How to remove group filter applied via Python-console (setSubsetString) of QGIS?

texts:
I need to quickly applie (and then change/remove) the same filter for about 100 layers in my QGis project (all put together in one group). Since there is no implemented solution right now (a feature request already exists for this issue), I searched the internet and found a good working workaround using the python-console and the function setSubsetSring. The syntax (in my case) is as follows:

layers = iface.mapCanvas().layers()
for layer in layers:
layer.setSubsetString('"Art" = \'Ki\'')

I can now applie the filter to any visible layers at once, and also change it by repeating the code and changing the value '\Ki\' to something else like '\Fl\' or anything else.
Waht I now want to do is to remove the applied filter, so all features will be visible again.
Since I'm absolutely new to Python, I just cant't figure out the right syntax for this job. Already tried things like

layer.setSubsetString('"Art" != \'xyz\'')

and something else, but I always get something like

File "<input>", line 2
layer.setSubsetString('"Art" != \'xyz\")
IndentationError: expected an indented block


texts: Trying to get the files in my folder to reproject if the SR doesn't match the input SR

texts:
Trying to get my local var's to pull the description from my Dataset_Folder which holds many datasets. It won't pull anything. I have tried "" and "*" to get something but nothing.

# Name: Re-Projection.py
# Description: Target Projection Dataset whose spatial reference will be used as specified projection in the re-projection
# Created by: Leah Cummins
import arcpy
import os
from arcpy import env

class NoExist(Exception):#Create error class
    print "Error, script not working"
    pass

#Set the parameters
Dataset_Folder = arcpy.GetParameterAsText(0)  #Get input folder dataset
Target_Projection_Dataset = arcpy.GetParameterAsText(1)  # Get projection input folder
Projected_Dataset_Folder = ""  #target folder output re-projected dataset

#Set workspace
env.workspace = r"C:/Data"
arcpy.env.overwriteOutput = True
outWorkspace = Projected_Dataset_Folder

for infc in arcpy.ListFeatureClasses("*"):

    #Local Variables
    desc = arcpy.Describe(infc)
    sr = desc.spatialReference
    projectedsr = arcpy.Describe(Target_Projection_Dataset)
    psr = projectedsr.spatialReference

    try:
        if sr.Name == psr.Name:  #SR are the same remain the same and copy to output folder
            arcpy.CopyFeatures_management(Dataset_Folder,Projected_Dataset_Folder)
            print "added"

        else:
            arcpy.Project_management(Dataset_Folder, Projected_Dataset_Folder, psr.Name)

    except NoExist:
        print "error please try again"

    #Output Messages
    arcpy.AddMessage (outputfc +  ' with old projection: ' + fcsrName) #shape files and old spatial reference names
    arcpy.AddMessage (outfile) #add message of input that show that was copied and had the same spatial reference
    arcpy.AddMessage ("Completed Successfully")# Report a sucsess message


texts: Openlayers 3 - Equivalent of OpenLayers.Class

texts:
I've been playing around with the OpenLayers 3 library, I've previously used OpenLayers 2 and created custom classes like so:

OpenLayers.CustomClass = OpenLayers.Class({

    property: value,

    function: function() {
        ...
    },

    CLASS_NAME: 'OpenLayers.CustomClass'

});

Then I can instantiate it like so:

var customClass = new OpenLayers.CustomClass();

However so far I can't see how to recreate this functionality in OpenLayers 3. Is this because it doesn't exist? I can see that there is an ol.Object class but I haven't been able to extend this abstract class with one of my own in a similar fashion.

It's quite likely what I'm trying to do is not necessary in OpenLayers 3 and that a different approach is required.

****UPDATE:****

I followed the link in ymirsson's comment and think I may have an approach that works. Essentially I wanted to create my own class that extended the ol.Object class. The following appears to do this:

function CustomClass() {

    ol.Object.call(this)
}

CustomClass.protoype = Object.create(ol.Object.prototype);

Now I can set and register listeners for properties on the CustomClass like so:

var customClass = new CustomClass();
CustomClass.on('change:property', function(event) {
    alert('Property changed');
});
customClass.set('property', 'testString');

However I'm not sure if this is the best approach...


texts: PostGIS line in polygon performance (ST_Intersects)

texts:
I am running an analysis to find lines that is covered by a polygon. I have to create the polygon from a road network (hence the buffer and union) because the the lines are not exactly equal. The query works but it takes a long time to run, about 350 seconds on my dataset of about 20 000 buffered and united lines.

Is there a way I could modify it to make it execute faster?

with poly as  (
    SELECT ST_UNION(ST_BUFFER(lines.geom, 3)) as newgeom
        FROM roads
)
select
    case
    when ST_coveredby(l.geom, poly.newgeom)
    then l.geom
    else
        ST_Intersection(geom, poly.newgeom) end as geom
from lines as l
    inner join poly
        on ST_Intersects(l.geom, poly.newgeom)
            and not ST_touches(l.geom, poly.newgeom)


texts: In Print Layout, Panels Appear in Different Window using QGIS

texts: I'm using print layout for QGIS. When I open the Item Properties panel, it will only show up as a separate window. I want it to show up embedded in the right hand of the screen with the other panels but cannot figure out how to do that. I've tried moving the other panels around (into their own windows, embedded in different places on the main window etc.) but I cannot do the same thing with Item Properties. I am still able to use Item Properties but it is much more convenient to have it embedded on the side of the screen.


texts:
I am trying to initialise my DrawPolygonMapTool within my application once the DrawPolygonButton is enabled. When the relevant button is pushed, it does run the __init__ function in my DrawPolygonMapTool Class but it doesn't seem to set the map tool on the canvas or the cursor. I don't get any errors when I run the code.

class DrawPolygonMapTool(QgsMapToolEmitPoint):
    def __init__(self, canvas, layer,*args, **kwargs):
        super(DrawPolygonMapTool,self).__init__(canvas)
        print ('i am here')
        self.canvas = canvas
        self.layer = layer
        self.setCursor(Qt.CrossCursor)
        self.vertices = []
        self.provider = layer.dataProvider()
        print (self.layer, self.provider)
        #self.canvasClicked.connect(self.clicked)

    def canvasPressEvent(self, mouseEvent):
        if mouseEvent.button() == Qt.LeftButton:
            qgsPoint = self.toMapCoordinates(mouseEvent.pos())
            qgspointxy = QgsPointXY(qgsPoint)
            self.vertices.append(qgspointxy)
            print (self.vertices, self.vertices[0], type(self.vertices[0]))

        #def canvasDoubleClickEvenr(self, mouseEvent):
        if mouseEvent.button() == Qt.RightButton:
            polygeom = QgsGeometry().fromPolygonXY([self.vertices])
            feature = QgsFeature()
            feature.setGeometry(polygeom)
            self.layer.dataProvider().addFeatures([feature])
            self.layer.updateExtents()
            QgsProject().instance().addMapLayers([self.layer])
            self.canvas.refresh()

class DrawPolygonButton(QAction):
    def __init__(self, *args, **kwargs):
        super(DrawPolygonButton, self).__init__(*args, **kwargs)
        self.setCheckable(True)
        self.setEnabled(True)
        self.iface = iface
        self.canvas = self.iface.mapCanvas()
        self.canvas.refresh()
        self.project = QgsProject.instance()

    def is_checked(self,state):
        if state==True:
            self.canvas.refresh()
            so_layer = [lyr for lyr in self.canvas.layers() if lyr.name()=='so_outlines'][0] #vector Multipolygon layer
            so_layer.startEditing()
            mpt = DrawPolygonMapTool(self.canvas,so_layer)
            self.canvas.setMapTool(mpt)

class MainWindow(QMainWindow):
    def __init__(self, *args, **kwargs):
        super(MainWindow, self).__init__(*args, **kwargs)

        # Save reference to the QGIS interface
        self.iface = iface
        self.canvas = self.iface.mapCanvas()
        self.project = QgsProject.instance()
        self.setWindowTitle('Interpretation')

        #add toolbar
        self.toolbar = QToolBar("Interpretation Toolbar")
        self.toolbar.setIconSize(QSize(16,16))
        self.addToolBar(self.toolbar)

        self.DrawPolygonButton = DrawPolygonButton(QIcon(r'puzzle--plus.png'), 'Draw Polygon', self)
        self.toolbar.addAction(self.DrawPolygonButton)
        self.toolbar.addSeparator()
        self.DrawPolygonButton.toggled.connect(self.DrawPolygonButton.is_checked)

app = QApplication(sys.argv)
window = MainWindow()
window.show()

Running the DrawPolygonMapTool separately works fine- I'm just having problems trying to connect the application to the tool. What am I missing?


texts: The GIS industry has the OGC. What standards does CAD software have?


texts: Applying ST_ClusterDBSCAN repeatedly until cluster sizes small enough

texts:
I am looking for a way to spatially clusters thousands of datapoints (potentially millions) based on distance, such that each cluster contains less than 5000 points.

This is a similar question to Problems with ST_ClusterDBSCAN cluster sizes . I would like to build upon the provided answer by using WITH RECURSIVE to automatically continue splitting clusters until they are all bellow a size.

This is the query I came up with (not complete):

WITH RECURSIVE clusterize(cid, csize, autopoi_ids, eps) AS (
    SELECT cid, csize, unnest(poi_ids) as poi_id, eps
    FROM (
        SELECT cid, count(*) as csize, array_agg(id) as poi_ids, 0.05 as eps
        FROM (
            SELECT id, ST_ClusterDBSCAN(geometry, eps := 0.05, minpoints := 3) over () AS cid
            FROM stats_autopoistat
        ) clusters
        GROUP BY cid
    ) q

    UNION ALL

    SELECT cid, csize, unnest(poi_ids) as poi_id, eps
    FROM (
        SELECT cid, count(*) as csize, array_agg(id) as poi_ids, ( SELECT eps/2.0 FROM clusterize LIMIT 1 )/2.0 as eps
        FROM (
            SELECT id, (SELECT max(cid) FROM clusterize) + ST_ClusterDBSCAN(geometry, eps := ( SELECT eps/2.0 FROM clusterize LIMIT 1), minpoints := 0) over () AS cid
            FROM clusterize
            WHERE csize > 5000
        ) clusters
        GROUP BY cid
    ) q
)
SELECT *
-- here filter out non-max cids for each poi_id
FROM clusterize limit 1000

However, it seems I am unable to refer to the recursive CTE inside a subquery, as Postgres complains with:

ERROR:  recursive reference to query "clusterize" must not appear within a subquery
LINE 15: ..., array_agg(id) as poi_ids, ( SELECT eps/2.0 FROM clusterize...

I would like to know if this can even be come with WITH RECURSIVE given the limitations I encountered above.

The reason I want to accomplish this within Postgres and not Python is that the number of points to cluster will continue increasing. The table already has about 1 million rows, and I would like to avoid loading all this data into Python.


texts:
I used this code to calculate my centroid and the centriod co-ordinates I get is "314167.7583680855,239312.8503371872". however whenever I try to geocode this co-ordinate I get an error.

ERROR:

  DeprecationWarning: Unable to parse the string as Point: "Latitude must be in the [-90; 90] range.". Using the value as-is for the query. In geopy 2.0 this will become an exception.

with fiona.open(DESTINATION_FILE) as input:
input.schema['geometry'] = "Point"
with fiona.open(.cache/centroid.shp, 'w', 'ESRI Shapefile', input.schema.copy(), input.crs) as output:
    for elem in input:
        if elem['id'] == '0':
            geom = shape(elem['geometry'])
            elem['geometry'] = mapping(geom.centroid)
            print(geom.centroid)
            output.write(elem)
 import pyproj
 import geopy_nominatim
 from geopy.geocoders import Nominatim

 geolocator = Nominatim(user_agent="my-application")
 location = geolocator.reverse("314167.7583680855,239312.8503371872")
 print(location)

Any ideas on how I can correct this flaw?


texts: Understanding SAGA Watershed Segmentation in QGIS: Error 1?

texts:
I am trying to run a watershed segmentation using the SAGA plugin in QGIS.  Unfortunately, every time I have tried to run this on a specific file QGIS freezes. The log output reports the following:

What is particularly odd about this is that it worked on a similar file just a few hours prior. The only difference is that the image it keeps failing on is a DSM generated by BCAL lidar tools and the image that was successful was a DSM generated by ENVI lidar.

I also ran the watershed segmentation using the standalone SAGA on the file that kept failing and it was completed successfully.


texts: Unable to Download Map from ArcGIS Online to Collector for ArcGIS for Unconnected Use in the Field

texts:
I am learning how to use ArcGIS Online and Collector for ArcGIS. I have created an ArcGIS online map.  It is properly configured to use in Collector.  I can access the map on a mobile device, which is running Windows 10.  An attempt to download the map, for unconnected use on the mobile device, will not work because the Download button is always greyed out.

Why is the download button greyed out? What could I be doing wrong?

More info:  a help flyout on Collector says to do two things:  pan and zoom to the work area; zoom to the map detail.  Then press download when ready. That makes no sense, as there is no way to tell the system that you have completed the two steps.  I can pan and zoom, all day long, but nothing enables the download button.


texts: Editing raster band metadata using GDAL?

texts:
How does one manually change STATISTIC_MIN/STATISTIC_MAX metadata within a raster band using gdal?

I want to preserve the color scale but ensure that the STATISTIC values are set as needed.


texts: Create contour lines from a WCS file in QGIS?

texts:
I am currently working on a mapping project in QGIS, and the only good DEM model I can find of SE Norway is a high-res WCS link that I have uploaded into my project. I would really like to create contour lines,

So I was wondering if there is any way to do this with a DEM in WCS format. Everything I've found online deals with raster and vector files.


texts: What are the major differences between GPS, GLONASS and Galileo?

texts: What are the major differences between GPS, GLONASS, COMPASS and Galileo?


texts:
I have looked through the other topic similar to this and they just don't seem to have exactly what I am looking for. I have a feature class 'AGM' that I want to update a field in based on the AGMs location to an LSD (which is also a feature class). The LSD has an ID field that I want to use as the field in the AGM.

My script thus far will update the field with the ID of the next LSD, it keeps cycling through the LSD and just putting whichever ID it is on before I manually stop it in the field. (seems the select layer by location is not working the way I had hoped)

#insert a new field (LSD) into the AGM shapefile, locate which LSD the AGM belongs to and update the new LSD field with the LSD ID

#import modules

import arcpy

#set environment
#set up workspace variable as user input
wsp = arcpy.GetParameter (0)
#arcpy.env.overwrieOutput = True

#set up variables for the AGM location, the grid (LSD) location as user input
agm = arcpy.GetParameter (1)
grid = arcpy.GetParameter (2)

#make both shapefiles a layer
arcpy.MakeFeatureLayer_management (agm, "AGM")
arcpy.MakeFeatureLayer_management (grid, "LSD")

#create new field in AGM shapefile (LSD)
arcpy.AddField_management ("AGM", "LSD", "TEXT", field_length = 40)

#create search cursor for LSD
cursor_LSD = arcpy.da.SearchCursor ("LSD", ["ID"])
#for each row in the LSD layer search for the ID
for row_LSD in cursor_LSD:
#Select the LSD ID that contains an AGM
 arcpy.SelectLayerByLocation_management ("LSD", "CONTAINS", "AGM")
#create an update cursor to update the AM with the ID of the LSD that contains it
 cursor_AGM = arcpy.da.UpdateCursor ("AGM", ["LSD"])
 #for the rows in the AGM update the LSD field with the ID of the LSD that contains it
 for row_AGM in cursor_AGM:
     row_AGM[0] = row_LSD [0]
     cursor_AGM.updateRow(row_AGM)

 #delete any locks
 del row_AGM
 del cursor_AGM


texts: Getting latitude-longitudes from tiff and world file

texts:
I have downloaded Version 4 DMSP-OLS from here, which is a bunch of tiff files with their world files. I would now like to crop an area specified by bottom left and top right lat-long points.

I downloaded QGIS, but couldn't get it to read the world file.

Googling around, I found some tools that convert tiff file and world file to Geotiff, but they were for Windows and I am on a Mac.


texts: Creating new layer out of features selected using expression, in QGIS?

texts:
I have lots of points representing buildings, scattered on top of polygons representing output areas of a city. I'd like to select only those points that have a certain descriptor in their database, and make a new layer with them.

This is done a number of times with a view to then counting how many buildings of each category are in each output area. I think I'm going to use a spatial join for that.


texts: Data Import Not Geocoding Everyone from Excel File

texts:
I'm new to this, so please go lightly if I'm asking something obvious.

I imported an Excel file with 9,159 entries and I'm mystified as to why 841 are cartodb_georef_status false and another 36 null.  So, something like a tenth of the data isn't getting mapped.  Many are international addresses which I am less familiar with, but even American addresses like:

fname lname nickname   1609 Mulberry Lane      Wentachee   WA  98801   USA

get false and

fname lname nickname  301 Church Street        Mount Calvary   WI  53057   USA

gets a null.

These seem like legit addresses to me and both of the above examples return valid results on Google maps.


texts: Is it possible to access a qgis plugin through a web-server ? As an example, say Semi-Automatic Classification Plugin. I want the plugin to be accessed through a server (preferably GeoServer). I've migrated all the input files to a PostGres database. I would like to run few process through the plugin which should be accessible through web-portal.


texts: Counting every part of polygons inside another polygon feature class in ArcGIS

texts:
I have two polygon feature classes. The first one represents lithostratygraphy distribution. The second one is an artificial grid polygon feature class.
I want to count the absolute number of patches of the lithostratygraphy (not polygons) inside the each mesh of the grid feature class.

I use the Intersect tool to divide the classes in the grids.
Using the Joins and Relates > Join tool, I calculate the number of polygons in successive meshes.

The problem concerns parts of the patches belonging to the same polygon (e.g. purple upper and lower patches). I would like them to be treated separately, i.e. the result written in the _Counts attribute would be 4, not 3.

How do I split polygons by geometry or how to generate new general geometry feature class like in GeoMedia?


texts:
I have a map of a mountainous landscape, http://skimap.org/data/989/60/1218033025.jpg. It contains a number of known points, the lat-longs of which can be easily found out using google maps. I wish to be able to pin any latitude longitude coordinate on the map, of course within the bounds of the landscape. For this, I tried an approach that seems to be largely failing.

I assumed the map to be equivalent to an aerial photograph of the Swiss landscape, without any info about the altitude or other coordinates of the camera. So, I assumed the plane perpendicular to the camera lens normal to be Ax+By+Cz-d=0. I attempt to find the plane constants, using the known points. I fix my origin at a point, with z=0 at sea level. I take two known points in the landscape, and using the equation for a line in 3d, I find the length of the projection of this line segment joining the two known points, on the plane. I multiply it by another constant K to account for the resizing of this length on a static 2d representation of this 3d image. The length between the two points on a 2d static representation of this image on this screen can be easily found in pixels, and the actual length of the line joining the two points, can be easily found, since I can calculate the distance between the two points with their lat-longs, and their heights above sea level.

I end up with an equation directly relating the distance between the two points on the screen 2d representation, lets call it Ls, and the actual length in the landscape, L. I have many other known points, so plugging them into the equation should give me values of the 4 constants. For this, I needed 8 known points (known parameters being their name, lat-long, and heights above sea level), one being my origin, and the second being a fixed reference point. The remaining 6 points generate a system of 6 linear equations in A^2,B^2,C^2,AB,BC and CA. Solving the system using a online tool, I get the result that the system has a unique solution with all 6 constants being 0. So, it seems that the assumption that the map is equivalent to an aerial photograph taken from an aircraft, is faulty. Can someone please give me some pointers or any other ideas to get this to work? Do open street maps have a Mercator projection?


texts: QGIS 1.8.0 on Mac - how to cut/paste/delete?

texts:
I have a line vector layer selected, editing is on, I select one vector (a dozen points) with the node select tool so the vertices are red squares.

the cut icon is greyed out, command/X does nothing, delete part isn't greyed out but does nothing; so I can't cut/copy/delete it
I select a vertex so its square turns to blue, then hit the delete key - nothing happens. Remember, a PC delete key is forward delete, back delete is the backspace key; a Mac has no forward delete, the delete key is a back delete; is this the problem or is it related to 1.?
I can't select more than one vector by holding down the control key (or shift or command - I've tried everything I can think of) - when I click on the second vector the first is deselected. Again, is this a Mac-only problem?


texts: Options for visualizing LiDAR data on (Mac) OS X?

texts:
I've recently come across open data LiDAR files for the city of Vancouver.

I'd like to view it on my Mac (2011. 10.6.6 OS). My intention is to use the LAS file to identify what the tallest trees are in the city.

I did a quick search and it looks like most open source LiDAR programs are running on Windows. Did I miss some? Or do I have to try to set up a Windows virtualization on my Mac (note that for 10.6.6 Mac OS, Virtual Box does not run).


texts:
I'm trying to use a standalone snap agent. Is that not possible?

Here's some code:

        // instantiate these agents.
        _snapSupportAgent = new FeatureSnapClass();
        _snapSupportAgent.FeatureClass = _parcelSplitLine;
        _snapSupportAgent.HitType = esriGeometryHitPartType.esriGeometryPartBoundary;

        _snapParcelAgent = new FeatureSnapClass();
        _snapParcelAgent.FeatureClass = _parcelSplitLine;
        _snapParcelAgent.HitType = esriGeometryHitPartType.esriGeometryPartBoundary;

Later on code:

        var newPoint = new PointClass();
        _snapParcelAgent.Snap(null,newPoint,1);

When I do that, I get a nasty protected memory exception. I'm editing directly to a IWorkspaceEdit, without interference of the IEditor.


texts:
I just installed GeoViews with success and I tried to follow one example at the first page of their site and this already gave me an error. In fact, there are two errors of the same type that occurred to me. The first:

import geoviews as gv
import geoviews.feature as gf
import xarray as xr
from cartopy import crs

gv.extension('bokeh', 'matplotlib')

The last command gives me this:

AttributeError                            Traceback (most recent call last)
<ipython-input-3-7a99f49a6c24> in <module>
----> 1 gv.extension('bokeh', 'matplotlib')

AttributeError: module 'geoviews' has no attribute 'extension'

Which is odd since it is the very first command line of their tutorial. The second thing I tried was their second example (the second image in the site)

dataset = gv.Dataset(xr.open_dataset('./data/ensemble.nc'))
ensemble = dataset.to(gv.Image, ['longitude', 'latitude'], 'surface_temperature')

gv.output(ensemble.opts(cmap='viridis', colorbar=True, fig_size=200, backend='matplotlib') * gf.coastline(),
          backend='matplotlib')

I used a different file and everything went well until the last line where, again, I got an attribute error.

AttributeError                            Traceback (most recent call last)
<ipython-input-2-ee9535e372cb> in <module>
      3 ensemble = dataset.to(gv.Image)
      4
----> 5 gv.output(ensemble.opts(cmap='viridis', colorbar=True, fig_size=200, backend='matplotlib') * gf.coastline(),
      6           backend='matplotlib')

AttributeError: module 'geoviews' has no attribute 'output'

How can geoviews give these errors? How can I fix it?


texts:
I am using Openlayers with Tiled Layers, and when I click on a map (and get the clicked coordinate), I would like to query a (GeoServer) WFS GetFeature service to see if I clicked on a Feature. (I can do something simlar in WMS but want to try to do this with WFS).

The GetFeature requests takes a bounding box as a parameter, so I was thinking I could build a bounding box based upon a coordinate somehow?  This would allow the click to be a little fuzzy - you wouldn't have to click precisely on the point.

I also see there is some searching capabilities with "CQL_FILTER" I may be able to use?

let viewProjection = "EPSG:3857";

map.on("singleclick", function(evt) {

    let clickedCoordinate = evt.coordinate;

    let params = {
        service: "WFS",
        version: "1.1.0",
        request: "GetFeature",
        typename: "myWorkspace:myFeature",
        srsname: viewProjection,
        outputFormat: "application/json",
        //CQL_FILTER: CAN THIS BE USED???
        //bbox: HOW DO I BUILD A BOX AROUND THE COORDINATE??
    };

        $.ajax(url, {
            type: "GET",
            data: params,
            dataType: "json",
            contentType: "application/json; charset=utf-8"
        }).then(data => {
            // SUCCESS
        }).fail((jqXHR, textStatus, errorThrown) => {
            // FAIL
        });

    }

});


texts: QGIS Project variable and PostgreSQL connection

texts:
Is it possible to use project variable in the PostgreSQL database connection in QGIS?

Usecase: Each user will set his/her db_user variable as part of the project. Once the project is shared among users, everybody will access the PostgreSQL database using assigned user.

Talking about project variables: I mean those, which are to be set in Project -> Properties and ɛ Variables


texts: Setting default raster layer style in QGIS?

texts:
I am trying to set up a QGIS project with a default raster layer style so that I can add additional raster layers (which all have the exact same format but with different names) and they will automatically render with my defined default raster layer style.

I am not sure if this is possible, but I would like to avoid having to manually apply the defined style to each layer individually (I do not want to have all additional layers loaded in to QGIS simultaneously, but be able to add a layer, inspect it, remove it, add another, and so on). It seems it should be possible, otherwise the "Save as default" option would not exist, assuming I am interpreting this correctly. However I am unsure how to get it to work.

I have loaded a raster which includes all possible values and have styled this as I would like. I have saved this style (general file name) and saved the style as default (same file name as layer), I have also tried saving the a layer definition file based on this layer (both with a general name and with the same name as the layer). However, when I load in additional rasters, they are not styled by my defined default style (i.e. they simply appear as black and white).

I am only to get additional rasters styled automatically when I load them into QGIS if I have already copied the default raster style file (.qml) to a new file with the same name as the additional raster to be loaded. This is quite tedious to do, and not straightforward for other team members who also need to use this project, so this is far from an ideal solution.

Should I be able to do what I want?

If yes, how can I get this work? Do I need to be specific about the file names and locations of the default style, the layer this style is based off, and the additional layers to be added? Do they all need to be in the same folder (incredibly messy as I have a LOT of additional raster layers)?

I am using QGIS 2.16.3 Desktop with GRASS 7.0.4 running on Windows 7 64-bit, but have received the same behaviour with QGIS Desktop 2.12.1 with GRASS 6.4.3.

Note the raster style I wish to apply is interpolation style discrete; my default raster has a set of defined values (e.g. 2, 5, 10, 100) and I have assigned a different colour (by setting the RGB) to each value.


texts: GDAL installation problem: Linux server without sudo privileges

texts:
I'm having problems installing GDAL on my account on a remote Linux server where I can't use sudo. Ultimately I want to use RStudio and Rgdal, but it looks like I need to install GDAL and PROJ4 first.

I'm not a Linux expert!

Here's what I did:
created a directory where I have write privileges
got gdal from http://download.osgeo.org/gdal/2.1.2/gdal212.zip with wget
ran ./configure --prefix=/path/to/my/directory
ran make

This is were I had problems.

~/gdal-2.1.2/.libs/libgdal.so: undefined reference to 'SQLFetchScroll'
~/gdal-2.1.2/.libs/libgdal.so: undefined reference to 'SQLDrivers'
...

And about 50 further undefined references, mainly to SQL functions but also to a few XML and other functions.


texts: QGIS models. deleting multiple columns is slow, is there a better way?

texts:
I have a process that has lots of items.  This for some reason seems to make a difference to the time it takes to drop a column from a shapefile during a model run.

I need to drop MANY columns. QGIS spends a long time on the 1st, the same time on the 2nd, then the 3rd... Is there any way to drop many columns in one go or even better just 'hide them' so the final output only take the ones it needs?


texts: How to Export to PDF after zooming to extent of each feature that meets SQL where clause?

texts:
I realize that I've asked two similar questions recently, but following suggestions in the comment chain, I'll make this a separate question (separate as it is not the no output problem in ArcPy: (SearchCursor/export to tiff ) with no output or the produces empty feature problem described Arcpy: SQL error in select_analysis produces empty feature). To be clear, the question is explicitly stated as: How to print a .pdf layout for each record that meets a where clause.

Based on suggestions from @PolyGeo, I'm trying the approach of using a definitionQuery to get the values and then a combination of a search cursor with a panToExtent to print each record. Here is the code:

import arcpy

mxd = arcpy.mapping.MapDocument("C:\\temp\\Graffiti_DM1.mxd")
df = arcpy.mapping.ListDataFrames(mxd, "*")[0]
outpdf="C:\\temp\\1003_zip4.pdf"
where_clause='"Incident_Z" = ' + "'10033'"
graffitidata="C:\\temp\\itscomplicated.shp"

cursor = arcpy.UpdateCursor(graffitidata)

graffitilyr=arcpy.mapping.ListLayers(mxd, "itscomplicated", df)[0]
graffitilyr.definitionQuery=where_clause
for cur in cursor:
    cur.rotation = "0"
    cur.scale = "1000"
    outFile = expdir + "\\" + cur.name + ".pdf"
    cur.panToExtent(graffitilyr.getSelectedExtent())
    arcpy.mapping.ExportToPDF(mxd,outpdf)

del cursor

However, I'm running into the following problem.

Traceback (most recent call last):
  File "C:\temp\defquery_for_in.py", line 15, in <module>
    cur.rotation = "0"
  File "C:\Program Files\ArcGIS\Desktop10.1\arcpy\arcpy\arcobjects\_base.py", line 35, in __setattr__
    return setattr(self._arc_object, attr, ao)
RuntimeError: ERROR 999999: Error executing function.

If anyone has any suggestions concerning the above error, or suggestions concerning the general setup of the code (specifically the addition of the search cursor within the where clause) I'd be greatly appreciateive.

This is the current version of what I'm working with as suggested by @PolyGeo, however it is producing pdfs that have the layout but no data (see comment below).

import arcpy
mxd = arcpy.mapping.MapDocument("C:\\temp\\Graffiti_DM1.mxd")
df = arcpy.mapping.ListDataFrames(mxd, "*")[0]
graffitilyr=arcpy.mapping.ListLayers(mxd, "itscomplicated", df)[0]
where_clause = '"Incident_Z" = ' + "'10003'"
graffitilyr.definitionQuery=where_clause
features = arcpy.SearchCursor(graffitilyr)
count = 1

for feature in features:
        df.rotation = "0"
        df.extent = graffitilyr.getSelectedExtent(True)
        df.scale = "1000"
        outpdf="C:\\temp\\" + str(count) + ".pdf"
        arcpy.mapping.ExportToPDF(mxd,outpdf)
        count = count+1

del features


texts: Overlaying Shapefile with projection and raster (without projection but with defined extent) using QGIS?

texts:
I'm trying to overlay a shapefile into a raster. The raster has no defined projection but it's a global raster with extent 0, -1800 : 3600, 0. I tried "on the fly CRS" transformation and followed the projection of my shapefile, and yeah they appeared together but with wrong position. My mistake here is that 3600 is read as 3600 degrees (I think), thus the length became 3600 (the resolution should be 0.1 degrees).

Can I change the extent and resolution when I reproject my raster? and how to change the extent and resolution?

The raster file is in .PNG by the way.


texts: Openlayers - Vector layer polygon doesn't move in-synch with Google V3 baselayers

texts:
When a polygon is drawn on the map and  the map is dragged, the position of the polygon relative to the GM V3 base changes.

function init() {
    var map = new OpenLayers.Map('map');
    var gsat = new OpenLayers.Layer.Google(
        "Google Satellite",
        {type: google.maps.MapTypeId.SATELLITE, numZoomLevels: 22}
    );
    drawVctr = new OpenLayers.Layer.Vector("Editable Vector");
    map.addLayers([gsat, drawVctr]);

    // Google.v3 uses EPSG:900913 as projection, so we have to
    // transform our coordinates
    var lng = "-71.118004";
    var lat =  "42.389118";
    map.setCenter(new OpenLayers.LonLat(lng, lat).transform(
        new OpenLayers.Projection("EPSG:4326"),
        map.getProjectionObject()
    ), 19);
    drawPlygn = new OpenLayers.Control.DrawFeature(
        drawVctr,
        OpenLayers.Handler.Polygon
    );
    map.addControl(drawPlygn);
}


texts: Looking for free DEM and other remote sensing data for Germany

texts:
Does anyone know of any sources for free DEM
and other remote sensing data in Germany?

I don´t think Europe is as open as the USA when it comes to free data!


texts:
What is the best way to modify the searchbox listener searchbox in the CartoDB map?

I would like to disable the default event listener for the CartoDB searchbox and first to execute my own listener and then decide If I want to execute the default CartoDB event (geolocation) for the searchbox.

How is the best way to do it?

I this is not possible can I add a second input text box in the map?

For now I am using  $(".cartodb-map-wrapper").append(' '); but I don't know if this is the best thing.


texts:
I am developing an android application that uses the database spatialite,
I use this project to integrate the database on android
https://code.google.com/p/spatialite-android/
It works normally, except when I use the clauses' UPDATE 'or' INSERT' it there's the trigger that prevents the request to be executed, i get the following message:'geometry violates Geometry constraint [geom-type or SRID not allowed].
whatsoever geometries that I want to update or just attribute data, but when I execute the same clause in spatialite_gui for example, it works normaly.
I tried to delete the trigger, the problem is solved, but after it is impossible to execute spatial queries, the table is corrupted.
I can't understand or locate the problem,to try to solve it

Why the trigger prevents  'insert' and 'update' on android and not on saptialite_gui?


texts: Smooth contour lines/correctly extract contour lines from a DEM in QGIS

texts:
I have a DEM obtained as a result of the interpolation of elevation points TIN Interpolatin:

I extracted the contour lines in QGIS and the result is this:

After I tried to apply the Line Smoothing tool:

As shown in the picture there are still several "angular" corners.
I suppose there is a more correct way to extract contour lines and process them. I have seen that similar questions have been asked in the past on this forum but mostly the solutions were about QGIS 2 compatible plug-ins.

What I need is to find in QGIS a quick way to process contour lines as correctly as possible and get a smoothed effect from the contours.