texts: Convert EPSG:3347 into EPSG:4326; nothing worked

texts:
I tried really hard to change the CRS of my polygons and the file properties say it was changed, yet the dynamic coordinates window on the bottom continues to show initial CRS (EPSG:3347) and when I extract geometry into CSV using MMGIS plugin - I get the nodes with old CRS EPSG:3347 coordinates.

I've tried saving a shapefile with a new CSR, using OTF, I have tried saving the layer as a CSV file with the CRS reset, saving the project, ... nothing worked. Is there some formula like radians to degrees? I don't know Python but need this a lot...

My initial shapefile is here: census subdivisions, cartographic file


texts: Unsupervised classification "Error: Image.sample: Computed value is too large."

texts:
I am trying to do an unsupervised classification for a small area in Barcelona. I uploaded an RGB image of 0.25cm of spatial resolution and I derived some indexes from it. Then, I added all the indexes as a band into the same image to use it as input in the unsupervised classification.

The problem is that I cannot map the results and I cannot download them, GEE reports all the time the same error: "Error: Image.sample: Computed value is too large."

Should I reduce my study area?

The code is as follows:

// Image from ICC, 25 cm of spatial resolution (RGB, with DN)

var bcn = ee.Image(image)

// Image scaled to get the correct HSV values

var img = bcn.divide(1000)

// INDEXES DERIVED FROM THE RGB (HSV, GNDVI, BNDVI, B_VNDVI, ratio_green, ratio_blue, ratio_red, textures (8 in total))

// var HSV

var hsv = img.select(['b3','b2','b1']).rgbToHsv();
print(hsv)

var value = hsv.select("value")

var hue = hsv.select('hue')

var saturation = hsv.select('saturation')

// Var derived from NDVI

var G_NDVI = img.normalizedDifference(["b2", "b3"])
var B_NDVI = img.normalizedDifference(["b1", "b3"])
var V_BNDVI = img.normalizedDifference(["b2", "b1"])

// Ratio ________

var b3 = img.select("b3")
var b2 = img.select("b2")
var b1 = img.select("b1")

var ratio_blue = img.expression("(b1) / (b1 + b2 + b3)", {
    b3: img.select("b3"),
    b2: img.select("b2"),
    b1: img.select("b1").rename('ratio_blue')
})

var ratio_green = img.expression("(b2) / (b1 + b2 + b3)", {
    b3: img.select("b3"),
    b2: img.select("b2").rename('ratio_green'),
    b1: img.select("b1")
})

var ratio_red = img.expression("(b3) / (b1 + b2 + b3)", {
    b3: img.select("b3").rename('ratio_red'),
    b2: img.select("b2"),
    b1: img.select("b1")})

// Texturas Standard Deviation

var texture_ratio_blue = ratio_blue.reduceNeighborhood({
 reducer: ee.Reducer.stdDev(),
 kernel: ee.Kernel.square(5),
});

var texture_G_NDVI = G_NDVI.reduceNeighborhood({
 reducer: ee.Reducer.stdDev(),
 kernel: ee.Kernel.square(5),
});

var texture_b2 = b2.reduceNeighborhood({
 reducer: ee.Reducer.stdDev(),
 kernel: ee.Kernel.square(5),
});

var texture_saturation = saturation.reduceNeighborhood({
 reducer: ee.Reducer.stdDev(),
 kernel: ee.Kernel.square(5),
});

// Texturas Median

var texture_green_median = b2.reduceNeighborhood({
 reducer: ee.Reducer.median(),
 kernel: ee.Kernel.square(5),
});

var texture_saturation_median = saturation.reduceNeighborhood({
 reducer: ee.Reducer.median(),
 kernel: ee.Kernel.square(5),
});

var texture_ratio_blue_median = ratio_blue.reduceNeighborhood({
 reducer: ee.Reducer.median(),
 kernel: ee.Kernel.square(5),
});

var texture_G_NDVI_median = G_NDVI.reduceNeighborhood({
 reducer: ee.Reducer.median(),
 kernel: ee.Kernel.square(5),
});

// Composite all the bands

var composite = img.addBands(hsv).addBands(G_NDVI).addBands(B_NDVI).addBands(V_BNDVI)
.addBands(ratio_blue).addBands(ratio_red).addBands(ratio_green).addBands(texture_G_NDVI)
.addBands(texture_ratio_blue).addBands(texture_b2).addBands(texture_saturation)
.addBands(texture_G_NDVI_median).addBands(texture_ratio_blue_median)
.addBands(texture_saturation_median)
.addBands(texture_green_median)

print(composite)

// Unsupervised classification___________________

// Display the image
Map.centerObject(img)

// training region is the full image
var training = composite.sample({
  region: geometry,
  scale: 0.25,
  numPixels: 1e9
});

// train cluster on image
var clusterer = ee.Clusterer.wekaKMeans(15).train(training);

// cluster the complete image
var result = composite.cluster(clusterer);

// Display the clusters with random colors.
Map.addLayer(result.randomVisualizer(), {}, 'clusters');

// Export the image, specifying scale and region.
Export.image.toDrive({
  image: result.clip(geometry),
  description: 'result',
  scale: 0.25,
  maxPixels: 2e9,
  region: geometry
});


texts: How to implement search input (autocomplete) of Google Maps with OpenLayers

texts:
I'm trying to implement the autocomplete input search Google Maps in my application, but I use the basemap the GeoServer and OpenLayers, I do not instantiate Google Maps, and I can't... I use this in OpenLayers:

map = new OpenLayers.Map ({ div: "map" projection: new
OpenLayers.Projection ("EPSG: 900913") });

Remembering that, I instantiate the Maps API too:

<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&key=xxx&sensor=false&libraries=places"></script>

I saw this example above but I am not able to implement because use "new google.maps.places.Autocomplete(input)" (see link above):

https://stackoverflow.com/questions/13689705/how-to-add-google-maps-autocomplete-search-box (answer with more 33+)

Finally, I want to put the inputs (more then ONE, like 20 inputs) inside a FORM of one HTML page, not on the map


texts:
I am using the newest version of QGIS (3.6.0 NOOSA) and I am trying to open a .sdc file that I extracted from an ESRI layer package.

Does anyone know if it is possible to open this type of file in the new version of QGIS or alternatively, if there is a plugin that converts from .sdc to .shp?


texts: Unable to remove WMS layer from Leaflet map

texts:
I am using Leaflet. In my application, I am adding layers from GeoServer, through checkboxes. The user selects a checkbox, the map is displayed. Can be seen in the image below.

Now, when the checkbox is not checked, the layer should be removed, but it's not.

This is the list of maps

   var map_layers = [   'Coastal_Ecosystem:Indus_1990_Cover', //landcover
                'Coastal_Ecosystem:Indus_1995_Cover',
                'Coastal_Ecosystem:Indus_2000_Cover',
                'Coastal_Ecosystem:Indus_2005_Cover',
                'Coastal_Ecosystem:Indus_2010_Cover',
                'Coastal_Ecosystem:Indus_2015_Cover',
                'Coastal_Ecosystem:Indus_1990-1995_Change', //landcover change
                'Coastal_Ecosystem:Indus_1995-2000_Change',
                'Coastal_Ecosystem:Indus_2000-2005_Change',
                'Coastal_Ecosystem:Indus_2005-2010_Change',
                'Coastal_Ecosystem:Indus_2010-2015_Change',
                'Coastal_Ecosystem:Indus_1990_Density', //density
                'Coastal_Ecosystem:Indus_1995_Density',
                'Coastal_Ecosystem:Indus_2000_Density',
                'Coastal_Ecosystem:Indus_2005_Density',
                'Coastal_Ecosystem:Indus_2010_Density',
                'Coastal_Ecosystem:Indus_2015_Density',
            ];
       var indus = new Array();

This is the onchange function:

function onSelect(){
     //calling for the checkboxes
    var checks = document.querySelectorAll("[class = years]");

    //loading data with checkbox selection
    for (var i = 0; i < checks.length; i++) {

         //loading and adding map layers
         if (checks[i].checked){
              indus [i] = L.tileLayer.wms('http://localhost:8080/geoserver/Coastal_Ecosystem/wms', {
                layers: map_layers[i],
                format: 'image/png',
                transparent: true,
                attribution: ""
        }).addTo(map);
    }
    else {

        map.removeLayer(indus[i]);

    }
}

}

Why removeLayer is not working?


texts: How to access feature classes in file geodatabases with Python and GDAL?

texts:
I am trying to access a vector dataset in a ESRI File Geodatabase using Python + GDAL.
I have successfully compiled GDAL with the file geodatabase API. The FileGDB driver is working correctly since entering

ogrinfo --formats

shows the FileGDB driver and entering

ogrinfo myfilegdb.gdb

gives me the correct information on the content of the database.

However, I can't find out how to access the content itself in Python.
For accessing a shapefile, I would write:

driver = ogr.GetDriverByName('ESRI Shapefile')
ds = driver.Open('shapefile.shp', 0)

When accessing a FileGDB feature class I would assume using the commands:

driver = ogr.GetDriverByName('FileGDB')
ds = driver.Open('myfilegdb.gdb/feature_class', 0)

but this doesn't seem to work since it can not identify/locate the data set. Does anyone know how to call individual feature classes from a ESRI FileGDB.

I'm using Python 2.7, GDAL 1.9.1, filegdb api 1.2 on Ubuntu 12.04 x64. Thanks for any suggestions!


texts: Aggregate (sum) cell values in high resolution raster that intersect low resolution raster using ArcGIS Spatial Analyst?

texts:
I am trying to aggregate/resample values in a high spatial resolution raster (raster 1) to another lower resolution raster (raster 2).

Raster 1 contains binary yes/no values. I wish to sum these when they intersect low resolution cells of raster 2.

I have tried the ArcMap Aggregate tool but you must specify the number of times to enlarge the input raster cell, rather than specifying the output cell size. The ArcMap resample tool does not offer a sum aggregation technique. I've considered converting the raster to points but this won't represent the full spatial extent of each cell.

What other ways could I achieve this?


texts: Why won't the QGIS Lisboa MSYS and OSGeo4W shortcuts launch?

texts:
I'm trying to deploy Quantum GIS Lisboa to 64bit windows 7 machines the installation works fine but the shortcuts wont run

With an error Windows cannot find "C:\Program"

This also happens on XP sp3 machines

The version I'm installing is QGIS-OSGeo4W-1.8.0-1-Setup.exe


texts: How do I explain what GIS is in a business context

texts:
This is hypothetical so don't ask for details:
I've heard of this GIS thing with computers and maps and stuff and it sounds like it might apply to this project I'm working on. Could you explain what it is in enough detail for me to decide if it's worth me spending time/money looking in to?
In short, I'm asking for a (long) elevator pitch on what GIS offers.

While the answers so far have said a few things that GIS does, nobody has given a picture of what GIS is that differentiates it, that makes it more than just a minor specialty in IT (like C++ or Python).
As a starting point, is the following wrong and if so how?

GIS uses computers to deal with and analyse multiple data sets that are interconnected/related by location information.
GIS can help answer questions like:

What is common to these locations?
Where do these conditions exist?


texts: Add Points shp attributes to Polygon shp by Point location (as Spatial Join in ArcGIS)

texts:
I have a set of points in .shp (ESRI, available here: http://ulozto.cz/xGqRVFrR/voronoi-zip). I would like to calculate Voronoi tesselation from the points, thus create polygons. So far, so good. However, points attribute table is not transferred automatically in R to Voronoi tesselation polygons during calculation (as is the case in ArcGIS).

Thus, depending points' spatial location I want to add points' attributes to my new Voronoi's polygons. I tried to used function

over(diagram.poly, bod.sp)

but it creates data.frame, not polygon.

Please,

how to automatically add points' attributes to Voronoi polygon OR
how to use resulting data.frame as my polygon's attribute table?

I'm sure it is pretty trivial task but I still can't find my answer!

my code:

# exemple with my data
library(spatstat)
library(sp)
library(deldir)
library(rgdal)
library(maptools)

# set directory
wd<- setwd("C:/Users/***/voronoi")

# read point shp, considered as SpatialPointsDataFrame
bod<-readOGR(dsn=setwd("C:/Users/***/voronoi"), layer="voronoi_tess")

# convert firstly to ppp (Spatial point pattern (object of class "ppp")
bod.ppp<-as.ppp(bod)

# calculate Voronoi tesselation
diagram<-dirichlet(bod.ppp)

# convert diagram to SpatialPolygon
diagram.poly=as(diagram, "SpatialPolygons")

# use CRS from "bod"
proj=CRS(proj4string(bod))

# define diagram CRS
proj4string(diagram.poly)=proj

# check if projections are identical
identical(proj4string(bod), proj4string(diagram.poly))

# plot the result
plot(diagram.poly, border = "darkgrey")
points(bod, col = "red", pch = 16)

# try to apply over{sp} function, producing data.frame
over(diagram.poly, bod)


texts: Calling service web from ComboBox using JavaScript?

texts:
I want to call a web service and use it in combox for search. Here is the function that i used to call my service web:

var xmlhttp = new XMLHttpRequest();
var url = "http://176.31.230.211/mtmap/MapSrv.svc/getCities";
var params = JSON.stringify({
    sessId:"1",
    cityName:"ra"
});
xmlhttp.open("POST", url, true);

xmlhttp.setRequestHeader("Content-type", "application/json");

xmlhttp. önreadystatechange = function() {
        if(xmlhttp.readyState == 4 && xmlhttp.status == 200) {
                console.log(xmlhttp.responseText);
        }
}
xmlhttp.send(params);

I created the ComboBox using the GeoExt bibliography:

var promosCombo = new Ext.form.ComboBox({
 id : 'promosCombo',
 triggerAction : 'all',
 emptyText : "Ville, Avenue, Rue...",
 editable : false,
 store : promosStore,
 mode : 'local',
 valueField : 'value',
 displayField : 'display',
});

here is my store:

var promosStore = new Ext.data.JsonStore({
 url : 'http://176.31.230.211/mtmap/MapSrv.svc/getCities',
 fields : ['display', 'value'],
 root : 'rows',
 autoLoad : true
});

What i want exactly is when i start to tape in my ComboBox the list of the city appear so i can choose the city.


texts: QGIS same print layout for multiple features of a layer?

texts:
I have a layer containing hundreds of line-features, which represent flight-tracks of different bird species. The different species are defined by a column species, containing for example values like species a, species b and so on.
What I want to achieve is to create multiple print-maps (pdf-exports), one for each species, using the same layout from the print-composer without duplicating the layout and the layer over and over again for each species.
The Species-name is supposed to occur as a map-title. The map extent has to stay the same in every map.
The solution may be something similar to the atlas-composer, but with a map-page for each species, not for a spatial location...


texts: How to translate (reposition) a .tif raster layer?

texts:
I'm starting to use QGIS for my thesis (environmental physics) and have to admit I'm pretty ignorant about it - I've always used Mathematica or Matlab.

My problem is:
I have a raster layer, in .tif format, which is misplaced (I need to move it south and west by 100m).
I need to translate (reposition) it, and I have absolutely no idea on how I can do that.

I've tried Affine transform but it doesn't work (doesn't let me select an input layer);
I've also read this How to translate (reposition) a raster in Python? but I have to admit I haven't understood much of it, I tried several times but am no good with python.


texts: Changing Thumbnail used for Web Mapping Application shared using Public Account of ArcGIS Online

texts:
An Esri blog entitled Put Your Best Thumbnail Forward has instructions for how to edit an ArcGIS Online map to change its thumbnail image.

Using those I perform the following steps to try and change the thumbnail for an ArcGIS Online Web Mapping Application without success.

Sign into my ArcGIS Online Public Account
Click on My Content tab
Click on the Web Mapping Application to open its item details
Click on Edit Thumbnail
Browse to the image I want which is a *.jpeg 200 pixels wide by 143 pixels high which seems to be OK according to the instructions below (I also tried renaming it as *.jpg).

  For best results, the image should be 200 pixels wide by 133 pixels
  high. Other sizes will be adjusted to fit. Acceptable image formats
  are: PNG, GIF and JPEG.

Click OK
Thumbnail does not update so I hard refresh the browser and it still does not update.

Is it possible to change the Thumbnail used for a Web Mapping Application that is being shared using a Public Account of ArcGIS Online?


texts: Looking for global river datasets more detailed than Natural Earth data

texts:
Does anyone know of any large scale datasets for rivers that are higher resolution than the natural earth data?

I've been looking at the digital chart of the world, and that appears to be down/unavailable at the moment.


texts:
I use mapserver 7.0.2 to display Points which are taken from a MYSQL-database.
If the the SQL-statement fails (for example the database can't be reached) the mapserver gives out an OGR error-message, revealing the entire SQL-statement including user and password.

Example:

msDrawMap(): Image handling error. Failed to draw layer named '....'. msOGRFileNextShape(): OGR error. MySQL connect failed for: .....,user=.....,password=....,host=....,port=...,tables=..... Access denied for user '........' (using password: YES)

Is there a way to disable these exceptions?
I already tried the msencrypt feature to encrypt the password, but it does not affect the exception text.

This shows how i connect to the DB in the mapfile:

 CONNECTION "<OGRVRTDataSource>
    <OGRVRTLayer name='....'>
        <SrcDataSource>MYSQL:....,user=....,password=....,host=....,port=....,tables=....</SrcDataSource>
        <SrcSQL>
        SELECT .... FROM ....
        WHERE ....
        </SrcSQL>
        <GeometryType>wkbPoint</GeometryType>
        <GeometryField encoding='PointFromColumns' x='....' y='....'/>
    </OGRVRTLayer>
    </OGRVRTDataSource>"

I have these problems on my CentOS installation.
I just checked if this problem also occurs on MS4W and here its a bit different:

msDrawMap(): Image handling error. Failed to draw layer named '....'. msOGRFileNextShape(): OGR error. MySQL connect failed for: geobase,user=root,password=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX connect to MySQL server on 'localhost' (10061)

It still prints the user (when with problem server / login) and the SQL-Statement (when the statement fails) but on ms4w it masks the password with XXXXXXXXX... which is alot better than printing it.


texts: Overwrite in ArcGIS Portal hangs for hosted GeoJSON and FGDB

texts:
I'm attempting to use the 'Overwrite' tool inside of ArcGIS Portal, on a existing hosted Feature Layers that have Hosted datasets.
I can successfully 'Add Item' from the ArcGIS Portal page, for a GeoJSON file and this creates the appropriate Feature Services and Feature Layer.
However after initial creation, if I attempt to use the 'Overwrite' feature on the Feature Layer page, it simply hangs during the process and fails to update the service with any new data.
I've performed the following tests:

Loaded a zipped shapefile and overwrote that - worked successfully.
Ensured my Feature Service was not being used by any web maps. Didn't make a difference.
Tried different folders as the loading location - Didn't make any difference.
Tried using the same source file for intial load and Overwrite. - Didn't make any difference.

I also tried a zipped file geodatabase. This actually simply failed to be created at all so I could not attempt to use the Overwrite. (I thought this was very odd as well).
So I've got:

Failure to load a zipped FGDB
Failure to Overwrite on a GeoJSON file.

Another point of interest i that I can however use ArcMap to successfully load the exact same FGDB as a service, from within ArcMap. So something appears wrong with the ArcGIS Portal page specifically.
Does anyone have any experience with this?
Update
I have extended the tests to include the following scenario

Upload raw GeoJSON data and successfully create Feature Service
Exported the data to GeoJSON, from the Feature Service as a new GeoJSON dataset in ArcGIS Portal, then Downloaded the data from there.
(Note - I noticed the formatting of the GeoJSON file was now different, parameters where in different order).
Used the downloaded as the source in the 'Overwrite' operation

This unfortunately still causes the overwrite function to hang and the changes are never reflected in the data or service. I have also checked field name casing as suggested, all original field names were lower case, and downloaded field names are lower case.
The fact that im using the downloaded GeoJSON file for me confirms that this is a bug somewhere, so ill log this one with ESRI.
A link to their doco is below, was using this as a reference.
https://enterprise.arcgis.com/en/portal/10.5/use/manage-hosted-feature-layers.htm#ESRI_SECTION1_1D3A87A80E3E4CD2A71744715F1522FE


texts: Manually giving input and output for QGIS graphical modeler exported python script

texts:
I am using QGIS 3.

How could I manually give the input layer and the output path to the following script extracted from the graphical modeler?

It is a simple model, it takes a DEM as input and apply the hillshade.

'''

def initAlgorithm(self, config=None):
    self.addParameter(QgsProcessingParameterRasterLayer('input', 'input', defaultValue=None))
    self.addParameter(QgsProcessingParameterRasterDestination('Output', 'output', createByDefault=True, defaultValue=None))

def processAlgorithm(self, parameters, context, model_feedback):
    # Use a multi-step feedback, so that individual child algorithm progress reports are adjusted for the
    # overall progress through the model
    feedback = QgsProcessingMultiStepFeedback(1, model_feedback)
    results = {}
    outputs = {}

    # Sombreamento
    alg_params = {
        'AZIMUTH': 300,
        'INPUT': parameters['input'],
        'V_ANGLE': 40,
        'Z_FACTOR': 1,
        'OUTPUT': parameters['Output']
    }
    outputs['Sombreamento'] = processing.run('qgis:hillshade', alg_params, context=context, feedback=feedback, is_child_algorithm=True)
    results['Output'] = outputs['Sombreamento']['OUTPUT']
    return results

def name(self):
    return 'modelo'

def displayName(self):
    return 'modelo'

def group(self):
    return ''

def groupId(self):
    return ''

def createInstance(self):
    return Modelo()

'''


texts: Converting dataframe with Polygon to GeoDataFrame

texts:
I imported a shapefile in the form of a pandas.dataframe and ran operations on it.  But I can't convert the dataframe to a geodataframe. I tried with gpd.GeoDataFrame, and with wkt.loads. I think it's because of the format of my geometry: they're Polygon Z:
0 POLYGON Z((653467.7 6840811 81.5 ...))

Here is my code  when I try to create a geometry column before the conversion to GeoDataFrame
bat['BAT_COORD']=bat['BAT_COORD'].apply(wkt.loads)

and the error :
Traceback (most recent call last):
  File "cleanshp.py", line 34, in <module>
    bat['BAT_COORD']=bat['BAT_COORD'].apply(wkt.loads)
  File "/home/windmyroof/.local/lib/python3.7/site-packages/pandas/core/series.py", line 4200, in apply
    mapped = lib.map_infer(values, f, convert=convert_dtype)
  File "pandas/_libs/lib.pyx", line 2388, in pandas._libs.lib.map_infer
  File "/home/windmyroof/.local/lib/python3.7/site-packages/shapely/wkt.py", line 10, in loads
    return geos.WKTReader(geos.lgeos).read(data)
  File "/home/windmyroof/.local/lib/python3.7/site-packages/shapely/geos.py", line 279, in read
    raise TypeError("Only str is accepted.")
TypeError: Only str is accepted.

The code with the shapefile import as a geodataframe (seems good), and an attempt of export shapefile (that fails) :
import geopandas as gpd
import pandas as pd
from shapely.ops import unary_union
from shapely.geometry import Point, Polygon
from shapely import wkt

def import_shapefile(path):
    # import shapefile using geopandas
    sjer_plot_locations = gpd.read_file(path)

    # create right dataset for geometry reconstruction
    columns = ['BAT_ID', 'BAT_COORD', 'BAT_HAUTEUR', 'Z_SOL']
    bat = gpd.GeoDataFrame(index=range(len(sjer_plot_locations.geometry[:])), columns=columns)

    for i in range(len(sjer_plot_locations.geometry[:])):
        bat.at[i, 'BAT_ID'] = sjer_plot_locations.ID[i]
        bat.at[i, 'BAT_HAUTEUR'] = sjer_plot_locations.HAUTEUR[i]
        bat.at[i, 'Z_SOL'] = sjer_plot_locations.Z_MIN_SOL[i]
        bat.at[i, 'BAT_COORD'] = sjer_plot_locations.geometry[i]

    return bat, sjer_plot_locations

bat, sjer = import_shapefile('/home/windmyroof/salome_shp/bats.shp')

n_bats = [i for i in range(len(bat.index))]

# cleaning geometry
# u = unary_union([bat.at[i, 'BAT_COORD'] for i in range(len(bat.index)) if i in n_bats])
# u = u.simplify(0.5)

bat.to_file('/home/windmyroof/salome_shp/bats_cleaned.shp')

And the error :
Traceback (most recent call last):
  File "cleanshp.py", line 33, in <module>
    bat.to_file('/home/windmyroof/salome_shp/bats_cleaned.shp')
  File "/home/windmyroof/.local/lib/python3.7/site-packages/geopandas/geodataframe.py", line 746, in to_file
    _to_file(self, filename, driver, schema, index, **kwargs)
  File "/home/windmyroof/.local/lib/python3.7/site-packages/geopandas/io/file.py", line 239, in _to_file
    schema = infer_schema(df)
  File "/home/windmyroof/.local/lib/python3.7/site-packages/geopandas/io/file.py", line 299, in infer_schema
    geom_types = _geometry_types(df)
  File "/home/windmyroof/.local/lib/python3.7/site-packages/geopandas/io/file.py", line 316, in _geometry_types
    geom_types_2D = df[~df.geometry.has_z].geometry.geom_type.unique()
  File "/home/windmyroof/.local/lib/python3.7/site-packages/pandas/core/generic.py", line 5130, in __getattr__
    return object.__getattribute__(self, name)
  File "/home/windmyroof/.local/lib/python3.7/site-packages/geopandas/geodataframe.py", line 173, in _get_geometry
    " column '%s'.)" % self._geometry_column_name
AttributeError: No geometry data set yet (expected in column 'geometry'.)

I fixed the problem using the comments. It was necessary to rename the column 'BAT_COORD' to 'geometry'. Indeed importing directly in gdp and not pd works very well.


texts: If Statement Satisfied but not Entering?

texts:
I have some code that seems to behave as expected and occasionally satisfies an if loop I've created but the code never seems to enter the loop. Even where the if statement is satisfied.

The 'Warning' Messages a just to trigger a different font effect in the display box as the tool runs. The if statement on line 21 is the issue, though as I've said it triggers no errors.

BufferLayer = arcpy.da.UpdateCursor(Temp_Buff, ["OBJECTID"])
for Poly in BufferLayer:
    counta = Poly[0]
    arcpy.AddMessage("Assessing Intersection or Outlet {} of {}...".format(counta, total))
    arcpy.AddMessage("Isolating Intersection or Outlet...")
    # Selecting the Current Outlet from the master Layer
    arcpy.Select_analysis(Temp_Buff, Temp_Poly, "OBJECTID = {}".format(counta))
    # Clipping All Vertices
    arcpy.Clip_analysis(All_Points, Temp_Poly, Current_Points)
    # Identify and Sort Stream / River
    Points = arcpy.da.UpdateCursor(Current_Points, ["grid_code"])
    orders = []
    for Point in Points:
        orders.append(Point[0])
    orders.sort()
    countb = 1
    arcpy.AddMessage("Approximating Pour Point(s)...")
    # Append to Master List if a Pour Point, Delete Point if Not
    Points = arcpy.da.UpdateCursor(Current_Points, ["grid_code"])
    for Point in Points:
        arcpy.AddMessage("if {} == {} and {} >= {}".format(Point[0], orders[0], Point[0], Minimum_Stream_Order_To_Delineate))
        if Point[0] == orders[0] and Point[0] >= Minimum_Stream_Order_To_Delineate:
            if arcpy.Exists(Final_PP_Layer + "_O" + Point[0]):
                arcpy.AddWarning("Appending Pour Point to Respective Master Layer...")
                arcpy.Append_management(Point, Final_PP_Layer + "_O" + Point[0], "NO_TEST")
            else:
                arcpy.AddWarning("Creating New {} Order Master Pour Point Layer...")
                arcpy.CreateFeatureclass_management(Workspace, Final_PP_Layer + "_O{}".format(val), "MULTIPOINT", Current_Points, "DISABLED", "DISABLED", "PROJCS['NAD_1983_CSRS_New_Brunswick_Stereographic',GEOGCS['GCS_North_American_1983_CSRS',DATUM['D_North_American_1983_CSRS',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Double_Stereographic'],PARAMETER['False_Easting',2500000.0],PARAMETER['False_Northing',7500000.0],PARAMETER['Central_Meridian',-66.5],PARAMETER['Scale_Factor',0.999912],PARAMETER['Latitude_Of_Origin',46.5],UNIT['Meter',1.0]];-28216700 -23260100 10000;-100000 10000;-100000 10000;0.001;0.001;0.001;IsHighPrecision", "", "0", "0", "0")
                arcpy.AddWarning("Appending Pour Point to Respective Master Layer...")
                arcpy.Append_management(Point, Final_PP_Layer + "_O" + Point[0], "NO_TEST")


texts:
I have a line and polygon in this image.

If i  find the intersection of line exterior and polygon boundry, what will be the graphical representation of both objects intersection..

its my concept..


texts:
I am looking to update the Attribute table for a Layer in QGIS using a join.

However I am not looking to ADD attributes to the table (thereby adding extra columns) rather I would like to "Update" the values within the pre-existing columns.

I have read similar articles to this ---> https://infogeoblog.wordpress.com/2013/02/18/joining-layers-in-qgis/

But unfortunately it only adds columns.

Ultimately I am trying to create a CRM system from Excel, whereby I would create tasks / notes / follow ups -----> that would update the values in QGIS. Happy for any other recommendations that would achieve this or CRM QGIS plugins.


texts: How to recompile a Python toolbox after a change to an imported module

texts:
If an ArcPy toolbox imports modules that are edited, recompiling the modules from the .py source code to the .pyc code that actually runs is a challenge. Deleting the .pyc files doesn't work because (this is a guess) ArcMap keeps a copy of the files in memory. Only a saved change to the main .pyt file triggers a full refresh of the code and it isn't clear that this is a reliable way to recompile.

My current working fix for this is below in case it's useful. Do you have any additional suggestions for how to handle this part of the toolbox creation process?


texts: I have QGIS 3.0 installed, and I installed the pluging qgis2threejs, but there is no way I could find it, is there anything I can do to fix it?


texts: How to include highways type track or service in osm2po?

texts: What must I do for osm2po to take into consideration highways type track or service? I have processed one file and in the results with QGIS I can't see those types of highways.


texts: QGIS distance from point to line along a specific bearing

texts:
I've got a vector layer with points (representing customer locations) and another vector layer with a line (representing the coast line). I want to calculate a "smart" distance to coast. Specifically, I want to determine the shortest distance to the coastline within a specific range along a specific bearing.

For example, suppose a customer is located on a peninsula. At 0 degrees the distance is 1 mile to coast and at 180 degrees the distance to coast is 3 miles. In this case, I'm more interested in the distance at a bearing of 180 degrees. I run into many similar situations where the coastline weaves around so significantly that using a simple distance measurement yields unusable results for my purposes.

For each customer, I would store the bearing (in degrees) that I am wanting to use in this measurement.

Ideally, I'd like a function that allows me to find the shortest distance by specifying a bearing and a +/- range (in degrees), i.e., mypoint.min_distance_to_line_along_bearing(myline, 180, 15) ... which, in a perfect world, would return the shortest distance to the line in a bearing that is between 165 and 195 degrees.

I am using QGIS 2.8 on a Windows 7 PC. I hope this makes sense.


texts: Flood extent extraction from satellite images

texts: How can I extract the floodwater from satellite images? Is the image classification method accurate for moderate-resolution satellite (Terra/Aqua MODIS)? Or are there more accurate methods?


texts:
For writing large raster files (e.g. satellite image GeoTIFFs) to disk, the throughput rate tends to be limited by the compression algorithm rather than by the raw disk IO. (Benchmarks: 1, 2.) This is good news because data compression (computation) is far easier to parallelise than file IO generally is. Can we take advantage of this in python?

When using the rasterio python library, is there any way to use multithreading to write a large file more quickly? (For example, is there a way to set GDAL_NUM_THREADS=ALL_CPUS?)


texts: GDAL framework does not exists after brew install; cannot locate gdal_polygonize.py

texts:
I am trying to get raster to shape form in R using John Baumgartner's code.  This function needs gdal_polygonize.py from gdal package. I installed gdal package using: (I am using MacOS Sierra Version 10.12.6)

brew install gdal --HEAD

When I check for the version. It seems I have installed GDAL:

gdalinfo --version
GDAL 2.3.0dev, released 2017/99/99

Now when I try to run the gdal_polygoniseR function. It gives error. It needs gdal_polygonize.py file. I am stuck at this point:

> system.time(p <- gdal_polygonizeR(r1))
Error in gdal_polygonizeR(r1) :
Can't find gdal_polygonize.py on your system.

I wanted to check if it exists or not and if it does then its path:

> Sys.which("gdal_polygonize.py")
gdal_polygonize.py
            ""

I saw that there is one additional step after installing GDAL:

echo 'export PATH=/Library/Frameworks/GDAL.framework/Programs:$PATH' >> ~/.bash_profile
source ~/.bash_profile

I am able to run this line but does not help as the framework folder does not have gdal folder. When I check for this I do not see "GDAL.framework" in my "Library/Frameworks/..".

If I am able to locate the ".py" file. I will be able to run the function.


texts:
I have managed to build a great web mapping application using tiles created from GeoWebCache and a custom gridset, but I now need to add an overlay to the base maps. The only interactivity I need is a simple pop-up info window that comes from only one of the attributes.

As default the overlay dataset is an ESRI Shapefile which is 180Mb, I have since managed to simplify the dataset using ST_SimplifyPreserverTopology which has dropped the ESRI Shapefile size to 28Mb. However, as a GeoJSON file this is still 78Mb which is just too big.

I then tried CartoDB and loaded the data into a table and then added the  vectorlayer in openlayers but the volume of data is still too big and the HTML page crashes.

I then tried GIS Cloud and an external WMS but that is restricted to WGS84 and has no getfeature info option.

I then started looking at Topojson which I think would work really well on my dataset but I dont think there is a way to load a topojson onto a map in OpenLayers 2.12 that I need to use.

My other option was UTF-Grid, so I loaded the data into tilemill and exported a MbTiles which I can extract using mbutil. But of course UTF-Grid only supports EPSG:3857 (web mercator) which is different from my projection, EPSG:27700. So all the .json files are named differently from my underlying cached tiles from geowebcache.

Is there a way to create a UTF-Grid but in a different projection?

So that is the background and feel that I have tried most options that I know about.

So simply I need an interactive overlay layer in an OpenLayers 2.12 map but I cannot use any server like GeoServer/Mapserver or TileStache etc and I cannot have any server side scripting like PHP.

Can anyone offer any other advice??

Thanks


texts: Adding description text to attribute field using attribute table in QGIS?

texts:
I'm using QGIS 3.0.1 and I would like to add a description text to an attribute field. I already use the alias text but I am interested in to store a more detailed description text for an attribute field like a tooltip or something similar. I know how to define conditional formatting (in qgis and python) but I'm not sure if it is possible to add this "detailed" information.

Should this not be possible, could I use customized signals? I mean, when I press F1 something happens (e.g. I create a pop up with my description).

With respect to my problem, I try to implement my own shortcut function using "QShortcut". This works but now I need the index of the selected field, similar to signal "attributeValueChanged". With this information I could create my own pop up with related description.

Should this not be possible, I would create a dialog including a combo box where the user can select one of the fields of the layer. After that the related description would be displayed.


texts: The scale of layers is changing in the print composer between different project in QGIS

texts:
I am working on a project which have to layers of the word. In this project the world state are displayed as polygons with point and line layers.

All the layers are display on raster from Natural Earth.
I need two layers with different polygon colors that will much in scale and  location precisely.
I saved each layer as a different project and when I export them from print composer the upper layer.

The layer is a little bit off from the bottom layer


texts: Remove raster layers from QGIS interface within a script

texts:
I am trying to clean up intermediate files created as part of a script, but get errors when I try to clean up from within the script.  The code works fine if I execute it outside of the script (ie by copying and pasting to the consul command line). but fails when it's part of the larger script.
My script takes a series of vector layers and interpolates 4 separate raster surfaces , which it saves to a temporary directory.  It then loads the interim layers and masks these layers based on one of the output rasters and saves the masked rasters to the final location, and loads them.
I would like to have the script remove the interim layers, so I can delete them, leaving a clean temporary work space, but within my script I get a permission error indicating the layers are in use:

PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:...

If I copy my code to a separate script, it removes the layers, and I can proceed with deleting the files, but can't get it to work within the main script. If I include loading the layers in the new script, it will not not throw the error, but also doesn't remove the layers added.
I've tried moving the remove layers loop later in the script after adding the final layers into the QGIS interface, but I still get the same error.
reproducible example:
import qgis.analysis
import qgis.core
import processing
import os
import fnmatch
from qgis.core import QgsProcessingFeedback

interim_path = "C:/temp/"  # Folder that includes raster files stored as geotif's (This has 2 rasters in it)

# List, then load all .tif rasters from "interim_path" folder
new_files = fnmatch.filter(os.listdir(interim_path), '*.tif')
for file in new_files:
    raster_layer = export_path+file
    display_name = file[0:-4]
    iface.addRasterLayer(raster_layer, display_name)

# Two rasters added to the open QGIS project

# List all of the active layers in the mapCanvas
layers_now = qgis.utils.iface.mapCanvas().layers()

# Remove the layers
for layer in layers_now:
    if (layer.type() == QgsMapLayerType.RasterLayer):
        QgsProject.instance().removeMapLayer(layer)

When I run the above script, it will remove any previously loaded raster layers, but the two layers added in the first part will not be removed. If the remove layers loop is included in a larger script, I get the PermissionError indicated above.
I tried creating the layers as 'Temporary_Output' along the lines suggested in [Question 243520]Deleting raster file after doing some processing in QGIS? but kept running into errors trying to pipe the temporary output into the masking algorithm.
What do I need to do to remove layers created and added as part of a script from within the script?


texts: Terrain Accessibility map using GIS (ArcGIS or QGIS)

texts:
I need to make an accessibility map showing the walking distance based on the terrain and availability of road networks, could anyone point me in the right direction where i could learn to do so.
Basically i need to create something like this:


texts:
I have a Network GIS which I have made in QGIS and has direction arrow,

but as soon as I export it to KML file I can just see the polylines without the direction.

Is there a way to get the direction  / Start and End points of travel in KML to open in Google Earth ?


texts: I'm trying to display different soil types with unique values. For some reason all but one soil type shows up when I choose add all values in the unique values symbology window. The soil type has it's own attribute and information. I really don't understand why only one is not showing. Any ideas?


texts: Does ArcMap have a Pan To Layer command?

texts:
In an Attribute Table, I am able to choose Pan to Feature (rather than Zoom to Feature) to refocus the map without changing the zoom level. Is there a similar Pan to Layer option (and/or shortcut key) when in the Table of Contents, to match the Zoom to Layer?

(The workaround is, obviously, Zoom to Layer and then reset the scale -- I'm just looking for a simpler way.)


texts: VectorTileServer (ArcGIS) layer is showing in the wrong place and in the wrong scale

texts:
I'm using esri-leaflet@3.0.0 and esri-leaflet-vector plugin.
Unfortunately, the added layer is at the wrong scale and shifted.
L.esri.Vector.vectorTileLayer("https://MY_ARCGIS/rest/services/Norway/VectorTileServer").addTo(map);

Used VectorTileServer is published with:
{"wkid":102100,"latestWkid":3857}
How can I fix this?


texts: Where to find administrative L-2 polygons under open license?

texts:
NaturalEarth provide L-0 (countries) and L-1 (sub-division) shapefiles, but no L-2 (sub-sub-division) shapefiles.

GADM.org provides L0 to L-5 data, and have a pretty good coverage for L-2 (sub-sub-division) shapefiles.

but it is forbidden for commercial use.

Where do I find administrative L-2 polygons with near similar world coverage under open license ?


texts: Can I visualize MultiLineStrings in Google Maps

texts:
I have made a web application which retrieves roads coordinates from a Postgres database and I when I attempt to visualize this using Google Maps API nothing shows.

  I am trying to plot coordinates for every line in a table row.

<?php

     $sql =<<<EOF
         SELECT ST_AsGeoJSON(geom) FROM roads;
     EOF;

     $ret = pg_query($db, $sql);
       if(!$ret){
         echo pg_last_error($db);
         exit;
       }
       while ($line = pg_fetch_array($result, null, PGSQL_ASSOC)) {
           $row[]=$line['coordinates']; //var_dump($array['coordinates'])

       }

       pg_close($db);
 ?>

  Here I try to visualize the rows:

  var map = new google.maps.Map(document.getElementById('map-canvas'),
               mapOptions);

  var flightPlanCoordinates = [
         new google.maps.LatLng('<?php echo implode("','", $roads); ?>')
        ];
         var flightPath = new google.maps.Polyline({
             path: flightPlanCoordinates,
             geodesic: true,
             strokeColor: '#FF0000',
             strokeOpacity: 1.0,
             strokeWeight: 2
         });

           flightPath.setMap(map);
       }

      google.maps.event.addDomListener(window, 'load', initialize);


texts: Calculate the sum of the area of selected features?

texts: In Arc I am trying to write an expression that will calculate the sum of the area in sq mi of features whose attribute is equal to "PRO1E". Thanks for the help.


texts:
Trying to install GeoPandas using Anaconda for Python 2 (geopandas version in anaconda navigator is 0.6.1).

I also have ArcGIS 10.7 pre installed.
First when I tried to install it through the navigator I got this message:

  geopandas -> python[version='>=3.5|>=3.8,<3.9.0a0|>=3.7|>=3.6']

  Your python: python=2.7

  If python is on the left-most side of the chain, that's the version
  you've asked for. When python appears to the right, that indicates
  that the thing on the left is somehow not available for the python
  version you are constrained to. Note that conda will not change your
  python version to a different minor version unless you explicitly
  specify that.

Then tried to create a new env and declare I meant for Python 2 and not 3 use this commands which I saw in the offical GeoPandas page.

  conda create -n geo_env

  conda activate geo_env

  conda config --env --add channels conda-forge

  conda config --env --set channel_priority strict

  conda install python=2 geopandas

When I ran those commands in the anaconda prompt I got this message in the picture below saying there is a package conflict between pandas to geopandas (tried also to uninstall all dependencies (shapely,pandas etc) from anaconda navigator and then run the commands again but got the same message in the picture below).


texts: Import GPX track into existing Line/MultiLineString Layer

texts:
I'm working on a project to map utility lines on a small university campus. We have paper maps right now, and we're looking to step into the modern era a little bit.

What I currently have set up is Qgis with a good campus basemap, then a line/multilinestring layer with categorized layer styling, based on a "Type" column in the attribute table (Electrical, Fiber, Water, etc).

To take things a step further/more accurate, I'm attempting to use a Garmin etrex 30 handheld hiking GPS to gather tracks saved into a GPX format. I've tested importing these, and I have no problem importing them into QGIS as their own Line/MultiLineString layer. What I would really like though is to import them to my existing layer. This way we could walk campus with the GPS and map a few routes over a few days, import and slowly build our map, as well as easily add to it down the road.

Is it possible to bring GPX tracks into an existing layer, OR is it possible to add them/merge them into an existing multiline layer once they're imported within QGIS?

I'm new to GIS & QGIS - and more than happy to clarify anything!


texts: QGIS 3.4 - Credentials to PostGIS connection constantly requested when panning the map

texts:
I am using PostGIS databases linked to QGIS 3.4 with credentials set for all users, in other words user-authenticated workspaces. Note: The credentials are not stored within the project file or setup database connection within QGIS.

In QGIS 2.18, when loading a workspace the credentials were requested only once. Even if the workspace was used for a long time, when the map would be panned the credentials would not be constantly requested.

In QGIS 3.4 the same approach does not work. Once a workspace is loaded by entering first time the credentials, after a few minutes of zooming and panning, the credentials window pops up.

I have already tried the following, but with no success:

Setting up the PostGIS connection and saving the credentials as configuration on my machine.
Settings -> Options-> Network -> Cache Settings -> Authentication - Untick the setting to Automatically clear the connection authentication cache on SSL errors
Looked up in any possible setting related to database connections

The only workaround was to manually edit the local workspace and embed the credentials within it using a text editor e.g. finding the connection settings and replacing it with full configuration. I'd like to know if there is a possibility to sort out this issue without the need of manually editing the workspaces.


texts: ArcGIS raster data - Group statistics for classification

texts:
I'm trying to figure out how to classify a group of rasters. These can't be joined as they have overlaps which must be kept. I was wondering whether there's a way of obtaining grouped statistics - eg histograms - which might help me visually classify either groups, or all of the data.

Basically, an efficient way to classify them all based on aggregate data. I think I'll probably be able to add symbology to more than one once I have the class limits established.

They're all separate ADF files at the moment - I'm wondering whether I should get these into a geodatabase first, somehow.


texts: Geowebcache does not displaying map tiles in EPSG:900913 from a remote WMS server

texts:
I connect  Geowebcache to a remote WMS service  through their Getcapability request by adding the url in geowebcache-servlet.xml document. Geowebcache demo page  displays the list of wms layers from the remote wms server.  When I click on the png link for the EPSG:900913 format ,  to display the map,  only displays the image place holders instead of map tiles. This displays map for the png link for EPSG:4326 formaT.  When I issue a Getmap request to the remote wms service directly from my browser, for EPSG:4326   works well but for EPSG:900913 it shows error “SRS Code 'EPSG:900913' is not supported (not found in SRS xml settings)”. When I check their Getcapability document   I could not find EPSG:900913 in the SRS list, but EPSG:4326 is available.  Since I want display the map in google map api v2 , think i need EPSG900913 format to get this work.  I think geowebcache generate an automatic re-projection in EPSG:900913 format for googlemap api. This link  is not working for me, I think that could be the reason this is not displying in google map api.
could someone tell me a solution for this ? why the reprojection not working ?

Here is the link for  EPSG:4326 format , this will start disply at a scale 1:272K range 10th zoom

This is the  link for  EPSG:900913 format which is not working for me.

This is the link for the Geowebcache demo page

I think there is a way to define independent layers and projections in geowebcache.xml document. Not sure how to do this to suit for my situation ?


texts: Hosting 100 GB of MrSID files in GeoServer

texts:
I've been given 100 GB worth of MrSID files (about 2,300) and been asked to create one map with them that can be hosted in GeoServer.

I originally attempted to put all of these tiles into a layer in ArcMap but after adding about 1/3 of them, the program just crashed. After that, I did a lot of research about MrSID files and GeoTIFF files and based on the limitations of my own system (500GB HD) and the target environment, hit a bit of a dead end.

Thus the move to GeoServer. The goal is to be able to host the data, in what format I'm still not sure, and only access the portion we need in the client application.

I was starting to think that a Mosaic Dataset through ArcMap was the best approach, but I'm not sure if that can be integrated into GeoServer.

How would you go about this problem?


texts: Alternative to ArcGIS Desktop for software development?

texts:
I'm looking for a free and reasonably licensed alternative to ArcGIS Desktop (or maybe just ArcGIS Server).  I'm quite new to GIS, so I'll state some of the things I want to be able to do and you can tell me what alternatives are out there.

I need to be able to convert from GML or Shapefile format to some GIS database format, (I bet I can't do this with GDAL/OGR but I'm not sure).  And then I want to be able to programmatically query the database for assets of certain types within specified bounds.  For instance, I would like to find all roads within a lat/long box and extract their names and their polyline representations.

At this point I am only interested in a programmatic API.  I'm not interested in anything with a GUI.


texts: AttributeError: 'Layer' object has no attribute 'metadata' from ArcPy with ArcGIS Pro

texts:
I am trying to get the metadata for each layer within each map within a ArcGIS Pro project (.aprx file), but get this error message: AttributeError: 'Layer' object has no attribute 'metadata'. The code is simple:
import arcpy
project = arcpy.mp.ArcGISProject(r"path\to\project.aprx")
maps = project.listMaps()
for map in maps:
    print(map.name)
    layers = map.listLayers()
    for layer in layers:
        print("  " + layer.name)
        print("    " + layer.metadata.description)

I did not really see how this is different with the 4th code block at https://pro.arcgis.com/en/pro-app/arcpy/metadata/metadata-class.htm.
I am using ArcGIS Pro 2.4.


texts: Un-deleting folder accidentally deleted in ArcCatalog?

texts:
aka "dude where's my OOPS command?"

I accidentally hit the DEL key with a folder selected in ArcCatalog, and it's apparently gone forever. There was no warning message shown, and it doesn't go into the Recycle Bin.

Is there a way to recover it, short of restoring a backup?

Edit - it was my fault no warning message was shown, as I had switched off that option in the Recycle Bin settings.


texts:
I have a database project (in MS Access 2016) and wish to add a mapping feature with the following functionality (via VBA is preferred);

1 – Create a FORM that includes display of a street map of a specific small city overall view (I can get the desired starting URL from Google or Bing maps). This can fill on Open or via a command button.

2 – The user manipulates that map’s controls in order to locate a target point that they desire, and manually MARK (such as by pushpin) that point.

3 – After marking the point they can press a command button which will then acquire the latitude and longitude of the point so marked (pushpin) and store that data in the current recordset. If that marked map image can be stored as a .jpg or similar, that would be a “bonus”.

4 – On the REPORT associated with that recordset, I would like to include a subREPORT that is an image of that map showing that pushpin…… either using the SAVED .jpg image OR created dynamically at Preview/Print so that it appears in the printed REPORT (whichever method is easier to code).


texts: QGIS Print Composer: How can I get the sum of the canopy areas that are displayed on the map?

texts:
I've already asked this question, but I didn't really get the answer I was expecting.
I will then try to reformulate with added details:
I am in the process of migrating an entire orchard mapping project from Manifold to QGIS.
Manifold has been scripted (using VB) in a way that at the bottom of each map it has generated, it will calculate and display the total canopy area of the orchard with a breakdown per variety (see image below).

I want to replicate this with QGIS.

From my understanding, there are 3 fields in the attributes table of my polygon shapefile layer that could be useful:

KPIN: every orchard has his own KPIN number. An orchard is subdivided by blocks and each block that grows a different variety of fruit will have the same KPIN number as the orchard where it belongs.
Canopy area: this field will calculate (with the $area expression) the surface area of our blocks (polygons).
Variety: this field defines what variety is being grown within our blocks

I believe there should be an expression that could use the KPIN number to pull data from the attribute tables and get what I would like to achieve:

the total sum of the canopy area for my KPIN (orchard)
a breakdown of the canopy areas per variety that is grown within the orchard

What this expression would look like?
And where should I insert my expression? Is it in the print composer, in a label?


texts: What is the highest resolution of population density data that I can obtain for USA freely?

texts:
Ok so as far as my understanding goes the most high resolution dataset available that factors in many other things (other than Census data ) at a 1X1 km resolution is Landscan data created by Oak ridge National Laboratory (ORNL). But, these are not available freely. What is the closest alternative you know of?

I am planning to use US Census Tiger data for 2010 and the lowest resolution it provides is of Census Tracts which are variable in their size (see here).

Can anyone suggest me any other alternative (transformed) datasets ?


texts: Unable to get the SLD file of existing style in Geoserver

texts:
I am trying to access some specific geoserver styles but I get an error page:

HTTP Status 404 -
The requested resource () is not available.

This is the URL I use:

http://localhost:8080/geoserver/styles/polygon.sld

I use Geoserver 2.7 and the style exists.

If I try this:

 http://localhost:8080/geoserver/rest/styles/polygon.sld

Then I get a file with the SLD.

When I try with other styles, which I have defined it works properly.


texts: Difference between 'Metadata links' and 'Data links' field GeoServer

texts: What is the difference between the fields 'Metadata links' and 'Data links' in GeoServer? What is expected as input for the latter? (GeoServer  2.11.5)


texts: ArcGIS PRO Memory Leak Caused By Single Feature Class

texts:
I use a combination of ArcMap and PRO on a daily basis. It doesn't appear that many people are using PRO yet based on the lack of documentation online. All of layers are feature classes stored in geodatabases.

I understand that PRO uses a lot of RAM. My computer at work has 8GB. PRO normally uses between 1-3.5GB. This week I have been working in project in which over the course of a couple minutes my RAM usage will start at around 1GB and wind up at 7GB (caps there because my other processes are using the last gig). The program is virtually unusable at that point, with 99% of my computer's resources being used. Additionally coinciding with this problem, the snapping feature is not correctly working. I'm using the same snapping settings I always use, but have to hover over a point or line for 10-15 seconds until the snap registers. Once the RAM reaches that max, the snapping no longer works.

I spent hours trying to figure out the issue. I updated my drivers, turned off labeling, and removed all rasters to try and deduce the problem. I noticed that one feature was correctly snapping. If I moved any non-working feature class (FC) to the top of the ToC hierarchy they began working correctly. I realized every FC below a certain polygon FC was not snapping. I removed the FC and snapping began working correctly, and the memory leak stopped. The only difference I notice between the FC in question and every other FC is the indexing. The working FCs are all using FDO_OBJECTID for attribute index. The problem FC is using FDO_OBJECTID, but also has FDO_GlobalID listed. Is there any way indexing can be causing this leak? Has anyone else experienced this problem?

TLDR: One feature class in my ArcGIS PRO project was causing a rapid memory leak, making the program unusable. It was also causing the snapping feature to not work correctly. Removing the feature from the project corrected the situation. My only hypothesis for the problem is related to indexing.


texts: Projecting Cross-Track distance on great Circle?

texts:
I have a route formed by some waypoints (black path) and I would like to project it over the great circle (blue path) connecting the starting and ending waypoint.
With the work "project" I mean to find the Latitude and Longitude of the red points.

The red lines are the shortest distances between the black points and the great circle and I am able to calculate it as suggested by this website (section cross-track distance).

Can you tell me how I can calculate the geographical coordinates of the red points, if the only information provided is about the black route and the great circle?


texts: Trigger to automatically calculating area when adding polygon in Postgis

texts:
I need help with writing a trigger to automatically update and insert into a column the area of a polygon being created using PostgreSQL/PostGIS and QGIS.

This is what I have but its not updating when I add new features.

CREATE OR REPLACE FUNCTION calc_area()
RETURNS trigger AS
$BODY$
BEGIN
NEW.area_ha := ROUND((st_area(NEW.geom::geography)/10000)::numeric,2);
RETURN NEW;
END;
$BODY$
LANGUAGE plpgsql;

CREATE TRIGGER area_calculate AFTER INSERT OR UPDATE ON public."Guyana_Coastal_Zone"
    FOR EACH ROW EXECUTE PROCEDURE calc_area();


texts:
I was wondering if there is a way to reorganize the layers when applying a style based on a categorizing value?  I have many values, but I would like to rearrange them alphabetically.  In ArcMap there are arrows to promote, or demote the values in the list, but I do not see anything like this in QGIS 1.8.0.

Any help would be appreciated.

Thanks...


texts: Can I use a remote folder as GeoServer data directory

texts: Can I define a remote folder as Geoserver data directory? My Geoserver installation is on Ubuntu and the data directory that I would like to save/fetch my data from is located on a Windows server that exists in the same network.


texts: Calculate ratio of a vector field within a raster grid cell

texts:
I have a large dataset (shapefile) in which one variable is binary. I want to be able to find the fraction of 1 for all the points, but within a given raster grid cell, see below.
Yes, as you can see the numbers are not gonna be high (lots of 0), but still interesting to plot later on in my project.
How can I calculate the fraction of 1 within each raster grid cell? Hence, I need  per grid cell.
The goal is to get it as a raster again file again.
I have not been able to figure it out on my own, side note I prefer to work in Qgis.


texts: Capturing GPS coords in EXIF header for JPEGs with ArcPad ImageBox control?

texts:
Problem with capturing GPS locations in EXIF header for JPEG photo using Esri's ArcPad and its ImageBox control.

I have customized forms for ArcPad.  I have added three ImageBox controls to a form and kept the Picture page.  If I take a photo via the Picture page, ArcPad writes EXIF data to the JPEG file (including date, time and GPS coordinates).

If I take a photo via an ImageBox control on the same form for the same feature, ArcPad does not write any EXIF data to the JPEG.  Both methods fire up the same ArcPadCamera.exe program.

Has anyone worked out how to use ArcPad's ImageBox control to force EXIF data to be written to the JPEG file?  ImageBoxes are more convenient for my users than  using the Picture page.

Esri has more or less said:

  it just doesn't do it


texts:
I know I can add KML files once I have unzipped the KMZ files, but is there a way to open KMZ files directly?

When I try to open a kmz file on QGIS 1.8.0 on Windows XP, through the all files filter, it does not accept it as a valid format.

Am I doing something wrong?

Does this all depend on OGR support?


texts: Converting linestring of the imported DXF to a closed polygon

texts:
Is there a way to convert linestring of the imported DXF file to a closed polygon?
I am using QGIS 3.10.


texts: Conditional Visibility of a field based on checkbox or value map

texts:
Does anyone know how to show some fields only when a previous one has a not null value? I tried what was on this link but it didn't work since when I go to the expression dialogue it can't find the field

What I want to do is that the "Descripcion" group only shows up once DESRI_RX or Rock_Type, are not null (it needs to works on QField as well).


texts: Use QuadTree for better complexity on search features

texts:
I want to improve the complexity of search specific feature when using this function :

map.forEachFeatureAtPixel(e.pixel, function (feature, layer) {
   //     Do something..
    });

The improvment will occur by using QuadTree? How can i approach to this situation ?


texts: MBtiles ext for GeoServer can't find the version I need

texts:
I'm running geoserver 2.10.3 as local host just for development prior to pushing things into production on a public facing site. I generated tiles in TileMill but i can't find the the matching version I need for geoServer.All of the subfolders here are all contain 2.12 versions:

http://ares.boundlessgeo.com/geoserver/master/

Does anyone know where i can find the 2.10.3 version?


texts:
In OpenLayer 5, i've a long rectangular SVG image (like 7000x600 px) as main layer. I need to limit the view and pan only to its bounds. I tried the code below, but when zooming the layer can't panned anymore and get cropped.

In other words, how can i limit the view to image size and zoom and pan only inside it?

var extent = [
    -svgImageSize.width,
    -svgImageSize.height,
    svgImageSize.width,
    svgImageSize.height
]

var projection = new ol.proj.Projection({
    code: 'static-image',
    units: 'pixels',
    extent: extent
});

map = new ol.Map({
    layers: [
        new ol.layer.Image({
            source: new ol.source.ImageStatic({
            url: svgUrl,
            imageExtent: extent,
            projection: projection
            })
        })
    ],
    target: 'map',
    view: new ol.View({
            projection: projection,
            center: [0, 0],
            extent: extent,
            maxZoom: 5
        })
});


texts:
I know the "Value Map" option which allow to create a drop-down list, but how can I create a combo-box in QGis 3 ?

Reminder : a combo-box is

  a combination of a drop-down list or list box and a single-line
  editable textbox


texts:
I'm building a graphic modeler in QGIS.

I need to model adding multiple fields/columns to a layer and then importing values from other fields/columns into those new fields.

Example :

Existing field = a
New field = A
Formula = A = a

This works fine.

I'm using user parameter to choose which field to use for the data. In the Field calculator, I specify that

Newfield = @Datafield (parameter)

The thing is, if the @Datafield is non-existent (not selected by the user) the graphic modeler won't run.

What I need is a way make my Field calculator understand that
if @Datafield is empty or non-existent (nothing inserted in the userparameter), to insert NULL values in the new field, else return @Datafield (the values in the Datafield inserted in the parameter).


texts:
When I try to launch SAGA GIS I get this error:

  "segmentation fault (core dumped)"

How can I solve this problem?

I am using Lubuntu 14.04 64-bit.


texts: ArcGIS Web adaptor for Portal login link fails

texts:
I have ArcGIS Server installed on a server behind my company's firewall and a web adaptor pointing to it on a DMZ server. Both are working (I can see unsecured services while using the web adaptor URL), but the login link doesn't work when accessed from the web adaptor. Clicking the login link simply leads the user to a blank page. The login function works when accessed from arc server directly. How can I fix this?

Here's what I've discovered in my troubleshooting efforts so far:

-The expiration time in minutes for the token was set to -1. I updated it to 1440 and restarted the server. Didn't work. ( https://support.esri.com/en/technical-article/000013440 )

-Ports 80 and 443 are open on the DMZ server. Ports 80, 443, 6080, 6443, 7080, 7443, 7099, 7654 are open on the application server behind the firewall. They are not competing with other applications.

-IWA federation is enabled on the back end server.


texts: Why 'Transparent' parameter in OpenLayers is a server side property?

texts:
There are four parameters for WMS Layers: Name, URL, Server Side Params, OpenLayers Options. Transparent Parameter comes under Server Side Params.

Does it mean that transparent images are pre-cached in the GeoServer and return to browser on request. Can transparency be a OpenLayers Property too?

Where can I see all possible server side parameters in OpenLayers?


texts: Easiest fix for polygon corner error in QGIS?

texts:
I am new to QGIS. What would be the easiest way to fix this apparent boundary error in a shapefile that I have downloaded?

I believe it was intended for these lines to intersect as a 4-way corner, but something apparently went wrong in the boundary drawing.

When I attempt to use this layer as input for an intersect, I get an 'invalid geometry' error for this feature. Am I correct in assuming this corner problem might be the basis of the intersect error?


texts: Create an image using vector and Raster layer QGIS

texts:
I want to create a map with one vector layer (a state shapefile) and another vector layer/raster layer containing desired data in QGIS. When I load both the layers in QGIS, in order to obtain image I always save as JPEG (under Project -- save as image) and then edit it in paint tool of Windows by removing the unnecessary areas around the state image, by rubbing it with an eraser.

Is their a method by which this eraser practice can be skipped to save time?


texts: ArcMap crashing in geoprocessing script with AreaSolarRadiation. Does a log file exist?

texts:
I am writing a greoprocessing script in python and running it in arcmap 10.  The script works as expected until it gets to an area solar radiation calculation

AreaSolarRadiation(input_dem, "", "400", TimeMultipleDays(2011,1,31),7)

It seems every other time I try to run the geoprocessing tool in arcmap the application crashes when it gets to that solar radiation calculation.  Sometimes the crash is followed by a prompt to send ESRI an error report.  Sometimes I don't even get that.  The dem I am calculating area solar for is pretty small so I don't believe the calculation is too intensive.  The script never crashed arcmap before I started trying to do the solar calc.

I am thinking if I could see a log file I might have a better idea of whats going on.  Does anyone know if the arcmap application keeps a log file I could view that would shed light on why it crashed?  This is running on windows server 2003.


texts: Calculating the slope for parts of the dem

texts:
In my PostGIS / PostgreSQL DB I have a DEM cropped to the size of Germany. As a second (vector) layer I have 1300 catchment areas (<30km²) for which I want to calculate the slope. To reduce the calculation time and effort I decided to clip the DEM to the geometries of the catchment and calculate their slope values afterwards. The DEM has to be transformed to SRID 31467.

DROP TABLE IF EXISTS spatial_derived.ezg_slope;
CREATE TABLE spatial_derived.ezg_slope AS

SELECT gid rid, ST_Union(rast) rast
FROM (
SELECT ezg.gid,
ST_slope(ST_Clip(ST_Transform(eu.rast, 31467), ezg.geom, -9999, true),1,'32BF','degree',1,false) rast
FROM spatial_derived.land_use_ezg30 ezg, spatial.eu_dem eu
WHERE ST_Intersects(eu.rast, ezg.geom) AND ST_IsValid(ezg.geom) )t1
GROUP BY gid

This worked nicely for a LIMIT of 20 rows:

However when I try to apply the query on all the data I just get an area of the size of the bounding box with 0s, and the polygons are not presented anymore. Up to now I can't go into more detail what might have gone wrong.
My question here is if the query contains any evident flaws?


texts: Importing Sentinel-1 Image Collection to Google Earth Engine API

texts:
I'm currently having an issue with trying to import the Sentinel-1 image collection into the Earth Engine API. My script is as follows:

var imgSentinel1 = ee.ImageCollection('COPERNICUS/S1');
Map.centerObject(imgSentinel1, 3);
Map.addLayer(imgSentinel1);

The error outputted is as follows:

Layer 1: Tile error: Expected a homogeneous image collection, but an image with incompatible bands was encountered:
  First image type: 2 bands ([HH, HV]).
Current image type: 2 bands ([VH, VV]).
      Image ID: S1A_EW_GRDH_1SDV_20141017T180916_20141017T181011_002873_0033FA_7339
Some bands might require explicit casts.

Since Sentinel-1 holds multiple bands, I try to filter the bands:

Map.addLayer(imgSentinel1, {'bands':['HH, HV']});

The following is outputted:

Layer 1: Tile error: Expected a homogeneous image collection, but an image with incompatible bands was encountered:
  First image type: 2 bands ([HH, HV]).
Current image type: 2 bands ([VH, VV]).
      Image ID: S1A_EW_GRDH_1SDV_20141013T234000_20141013T234103_002818_0032C9_90E3
Some bands might require explicit casts.

I've tried to change the bands (ex. 'HH', 'HV', 'VV', 'VH, VV'), but it would output:

Layer 1: Tile error: Expected a homogeneous image collection, but an image with incompatible bands was encountered:
  First image type: 2 bands ([HH, HV]).
Current image type: 2 bands ([VH, VV]).
      Image ID: S1A_EW_GRDH_1SDV_20141013T234000_20141013T234103_002818_0032C9_90E3
Some bands might require explicit casts.

^ when 'HH', 'HV' or 'HH, HV' was inputted, and:

Layer 1: Layer error: Image.visualize: No band named 'VV'. Available band names: [HH, HV].

^ when 'VV', 'VH', 'VH, VV' or 'VV, VH' was inputted for the bands. Other basic variables used for other satellite images like 'B1' also failed.

I wish to display any (and potentially all) bands that may be used for statistical analysis similar to displaying Landsat-8.


texts:
I try to use ArcPy to accessing the features of a shapefile. I tried to use a searcheCursor, like that:

cursor = arcpy.da.SearchCursor(Points, ["SHAPE@XY"])
for row in cursor:
    x, y = row[0]
    print "Origin"
    print("{0}, {1}".format(x, y))
    row = cursor.next()
    x, y = row[0]
    print "End"
    print("{0}, {1}".format(x, y))

It's just a example. In the first loop I want to use feature 1 and 2, in the second feature 2 and 3. But my problem is that I can't do the access by the row-index.

Is there a possibility to do what I want?


texts:
On CentOS 7 I have QGIS Server and QGIS Desktop installed. In QGIS Desktop I created a project with raster and vector data and saved it in a ".qgs" file. Then I copied the file in "/var/www/html/cgi-bin/" and also copied the files "qgis_mapserv.fcgi" and "wms_metadata.xml" into this directory.

In my html-file I created a raster layer:

        var layer = new ol.layer.Image({
            source: new ol.source.ImageWMS(({
            url: 'http://localhost/cgi-bin/qgis_mapserv.fcgi',
            params: {'LAYERS': 'RasterLayerName'},
            serverType: 'qgis',
            crossOrigin: null
            }))
        });

That worked once. In an other project it didn't work. And I couldn't add a vector layer.

Is this the way to refer to QGIS layers with OpenLayers?


texts:
When using Spatialite, I cannot run a Distance query. I've tried investigating the data stored in the database, however it doesn't appear to be related to my database. If I run a Distance query on two coordinates, there is even a difference between the CLI and using the C library.

The correct response is given from the CLI (built with homebrew on OS X):

$ spatialite
SpatiaLite version ..: 4.2.0    Supported Extensions:
    - 'VirtualShape'    [direct Shapefile access]
    - 'VirtualDbf'      [direct DBF access]
    - 'VirtualXL'       [direct XLS access]
    - 'VirtualText'     [direct CSV/TXT access]
    - 'VirtualNetwork'  [Dijkstra shortest path]
    - 'RTree'       [Spatial Index - R*Tree]
    - 'MbrCache'        [Spatial Index - MBR cache]
    - 'VirtualSpatialIndex' [R*Tree metahandler]
    - 'VirtualXPath'    [XML Path Language - XPath]
    - 'VirtualFDO'      [FDO-OGR interoperability]
    - 'VirtualGPKG' [OGC GeoPackage interoperability]
    - 'VirtualBBox'     [BoundingBox tables]
    - 'SpatiaLite'      [Spatial SQL - OGC]
PROJ.4 version ......: Rel. 4.8.0, 6 March 2012
GEOS version ........: 3.4.2-CAPI-1.8.2 r3921
TARGET CPU ..........: x86_64-apple-darwin14.1.0
the SPATIAL_REF_SYS table already contains some row(s)
SQLite version ......: 3.8.8.2
spatialite> SELECT Distance(MakePoint(-73.995, 41.145556, 4326), MakePoint(-122.416667, 37.783333, 4326), 0);
4119935.70473556

However if I do this from my code using the C library, the response is NULL:

SpatiaLite version ..: 4.2.0    Supported Extensions:
    - 'VirtualShape'    [direct Shapefile access]
    - 'VirtualDbf'      [direct DBF access]
    - 'VirtualText'     [direct CSV/TXT access]
    - 'VirtualNetwork'  [Dijkstra shortest path]
    - 'RTree'       [Spatial Index - R*Tree]
    - 'MbrCache'        [Spatial Index - MBR cache]
    - 'VirtualSpatialIndex' [R*Tree metahandler]
    - 'VirtualFDO'      [FDO-OGR interoperability]
    - 'VirtualGPKG' [OGC GeoPackage interoperability]
    - 'VirtualBBox'     [BoundingBox tables]
    - 'SpatiaLite'      [Spatial SQL - OGC]
PROJ.4 version ......: Rel. 4.8.0, 6 March 2012
GEOS version ........: 3.4.2-CAPI-1.8.2 r0
TARGET CPU ..........: x86_64-apple-darwin14.0.0

(sqlite3_column_type(...) == SQLITE_NULL) == true

What do I have to change in order to get a valid distance calculation?


texts: How to draw a simple bus network that works with pgRouting?

texts:
What I'm I doing wrong? I've created a new shape layer for lines, I've enabled snapping with 5 map units for that layer. When I draw a line between two of the stops I get a purple marker when I'm at the "right" spot, I click the first stop and then the second, then I close the drawing with a "right click" (I create one line between every stop(point) to be able to specify cost for that certain distance. When I zoom in on the points this is how it looks like and I'm guessing this is the reason that pgRouting doesn't work as well: (I feel like a total idiot, this should be easy but somehow I fail)

Ok, I have now been able to achieve this:

Buss stations as points imported from google earth (saved to my places, imported and saved as a shp from QGIS)
Using the plug Points to Path drawing a single line through all the points.

How can I turn this into a routable network with pgRouting? I'm guessing I'll have to split the long line between my 38 stations into smaller pieces so that I can specify the cost (travel time) between each station.

Can anyone help? It's really frustrating not knowing how to do this..

EDIT: This is what I have:
Three shape files: (See new screenshot)
1. Train stations. Points (RED)
2. Rail network. Lines (BLUE)
3. Buss stations. Points (GREEN)

I also have travel times between all buss stations and between all train stations specified in minutes.

This is what I want to do:
Runt pgRouting stuff like driving_distance and alpha shapes from your (underdark) blog on this combined public transport network i Sweden. I guess I'll have to draw lines between the buss stations? And also connect the train station with the closest buss stations to allow the traveler to change to buss and move further.

Vision:
Manage to merge them into one shape file with travel times between stations specified as COST in the attribute table and where both busses and trains are connected with manually drawn lines that connects them (and have a COST attribute as well to make the analysis more realistic)

(My ultimate christmas answer would be how to turn this into a multimodal network and be able to merge this public network on top of my working road_network, but from what I understand thats hard with pgRouting? Wrote a couple of questions that didn't get answers on that)

How to make this work with QGIS+pgRouting+PostGIS+Postgresql?

OLD QUESTION:
I would like to be able to draw two lines (see attached screenshot, specify the cost for each one and then import the layer to psql with QGIS DBManager and then pgr_createTopology and back to QGIS as a PostGIS layer. I now want to be able to runt pgRouting analysis on this simple bus network with three stops (at the start and the end + where the lines intersect).

With this workflow driving distance wont get me anywhere and Dijkstra only works with one of the lines.. What am I missing here? How would you set this up?


texts: How to automate the Interpolation of daily(Total-365 days) precipitation data?

texts:
I have daily rainfall data in comma-delimited text file for some location as follows

Lat, Long, Precipitaion(mm)
26.0, 78.0, 23
26.50, 78.30, 200
26.70, 78.45, 405
...

I have total 365 files, means one file for each day.
My problem is that I want to create raster for each day by interpolating,
means I have to create 365 raster in arcgis or any other gis software.
After generation of these 365 rainfall raster layer I want to extract the
interpolated value of precipitaion for a desired location(which is previously not available
in our rainfall data) from each 365 interpolated rainfall raster data layer and want to save this in a new comma-delimited text file for 365 days just as follows.
example:

Julian_Day, New-lat, New-lon, interpolated_precipitation(mm)
1, 26.35, 76.5, 405

...
I know how to load and interpolate these data in arcGis, QGIS but manually it takes long time to generate the result. so will you please suggest the automated solution in ArcGIS, QGIS, python or vb6 or any
other programming language or techniques.


texts:
I have a polygon feature class(Parcel) that I want to append to another polygon feature class(FinalParcel). The schemas do not match. I'm trying to determine the best way to update Parcel so that it has a matching schema to FinalParcel without using Python.

Is there a way to combine an empty template feature class with the Parcel feature class to yield the right schema so append can be used?

Answer: Yes. I ran a definition query for nonsense on the FinalParcel FC and then exported the data. This gave me an empty SHP with just the field names and no data. In ArcCatalog, I then created my "TemplateFC" by creating a new polygon FC and importing the table from the empty SHP copy.

Next, I was able to append the Parcel FC to the TemplateFC by using a No Test append.


texts: Load large shapefile just at data frame current view

texts:
Is there a way to just load a large shapefile at just my current data frame view or select and export a shapefile by a polygon without loading it?
I have a country's pipelines but I want just to select and export a small village's pipes and prevent time-consuming loading of that large file.


texts: QMS basemap opening up in wrong CRS and GPS points (maybe?) showing in wrong place

texts:
Im having problems with the CRS of my QMS basemap in Qgis (2.18).

As a basemap im using the ESRI satellite provided by the QMS plugin. I have set my default and project CRS to WGS 84/UTM zone 19S (EPSG: 32719), and this is the CRS i want to use in my maps. But when i open the layers (ESRI satellite and my gps points as shp.) everything seems correct, but in properties i can see that the ESRI satellite have opened up in Pseudo Mercator (EPSG: 3857). Anyhow, the ESRI satellite does not look like Pseudo Mercator, it looks like this:

So, my layers have different CRS but the gps points show in right location, at least approximately. I changed the CRS of ESRI satellite to WGS 84/UTM zone 19S, but then when both layers have the same CRS my gps points show in the middle of the Nort Sea, so in the other side of the world.

Is it possible that only the name of the CRS of ESRI satellite in properties is showing wrong?

I also tried changing the CRS of the shapefile, so that both layers would be in Pseudo Mercator, but again the gps points show in the North Sea.

Where is the problem?


texts: Exporting Earth Engine results to kml for use in Google Earth

texts:
So I have a date range of MODIS temperature images that I am attempting to export from GEE for use in Google Earth. This is what the code looks like thus far:

var dataset = ee.ImageCollection('MODIS/006/MYD11A2')
                  .filter(ee.Filter.date('2018-05-01', '2018-06-01'));
var landSurfaceTemperature = dataset.select('LST_Day_1km');
var landSurfaceTemperatureVis = {
  min: 14000.0,
  max: 16000.0,
  palette: [
    '040274', '040281', '0502a3', '0502b8', '0502ce', '0502e6',
    '0602ff', '235cb1', '307ef3', '269db1', '30c8e2', '32d3ef',
    '3be285', '3ff38f', '86e26f', '3ae237', 'b5e22e', 'd6e21f',
    'fff705', 'ffd611', 'ffb613', 'ff8b13', 'ff6e08', 'ff500d',
    'ff0000', 'de0101', 'c21301', 'a71001', '911003'
  ],
};
Map.setCenter(-85.60371794450282,44.73590436363271, 8);
Map.addLayer(
    landSurfaceTemperature, landSurfaceTemperatureVis,
    'Land Surface Temperature');

// Create a geometry representing an export region.
var features = ee.Geometry.Rectangle([-85.1417893413635, 45.31413490213395, -86.125065708551, 44.65070625463291]);

Where I am having trouble is coding the export feature that would allow for an overlay to be placed into Google Earth. This is what I have now:

// Export the image, specifying scale and region.
Export.image.toDrive({
  image: dataset.filter('LST_Day_1km'),
  description: 'Overlay',
  scale: 30,
  region: features
});

So what do I need to add to that code to facilitate the export of the color-coded data set into a .kmz, GeoTIFF or some sort of file that could be overlayed in Google Earth? Do I need to .sum() the image set prior to export?

This is for personal use, so I do not need to embed it into a website, so I don't think I will need to use the API provided by Earth Engine....or do it?

EDIT:

After trying the below suggestion, this is what happened.

After I added the .mean() function, I could then export an image. Without that, I couldn't as I would get the error " Error: Invalid argument: 'image' must be of type Image."

I was able to successfully export a .tif that could be read in google earth when I added .mean()

Export.image.toDrive({
image: landSurfaceTemperature.mean(),
description: 'Overlay',
scale: 30,
region: features });

However, the imported image was entirely white (no data or visualization.) I'm wondering if it has to do with exporting the landSurfaceTemperatureVis variable, however when attempting to export that variable I get an error saying that it's not a valid variable to export.

Any suggestions?

EDIT 2:

Still getting a white image upon importation to Google Earth.


texts: Importing multiple CSV-files without coordinates into schema in QGIS 2.18

texts:
I have multiple CSV-files that I need to import into a database in QGIS 2.18.
The data contains Australian Postal Code information hence does not have x,y (lat/long) coordinates in it.
How can I load all those files into a database?


texts: How to force EXT JS - GeoEXT to show legends with OpenLayers?

texts:
My sld is applying as below

  function cusMap(strSld_body,talukaName,name){
       console.log(strSld_body);
    var query = new OpenLayers.Layer.WMS.Post(name,
    geoServerURL, {
        LAYERS : 'VP:village_customize',
        sld_body : strSld_body,
        format : 'image/jpeg',
        transparent : 'true'
    },
    {
        unsupportedBrowsers: [],
        isBaseLayer: false,
        yx : {'EPSG:4326' : true}
    } );
  query.mergeNewParams({'CQL_FILTER': "Taluka='"+talukaName+"'"});
  query.mergeNewParams({'sld_body': strSld_body});
  query=registerEvents(query);
   map.addLayer(query);

 }

But the legend is not coming as per sld made. How can I force legends to show up?

I am using Ext JS Tree to show legends.

 Ext.onReady(function() {

var mapPanel = new GeoExt.MapPanel({
    renderTo : 'mymap',
    width:780,
    zoom:7,
    region: "center",
    //autoWidth:true,
    boxMaxWidth : 762,
    boxMaxHeight : 490,
    map: map
    //layout: "fit"

});

var tree = new Ext.tree.TreePanel({
    renderTo : 'mytree',
    region: "east",
    title: "Layers / Legends",

    width: 230,
    boxMaxHeight : 455,

    autoScroll: true,
    enableDD: true,
    collapsible: false,
    split: false,

    plugins: [{
            ptype: "gx_treenodecomponent"
        }],
    loader: {
        applyLoader: true,
        uiProviders: {
            "custom_ui": LayerNodeUI
        }
    },
    root: {
        nodeType: "gx_layercontainer",
        loader: {
            baseAttrs: {
                uiProvider: "custom_ui"

            },
            createNode: function(attr) {
                // add a WMS legend to each node created
                attr.component = {
                    xtype: "gx_wmslegend",
                    layerRecord: mapPanel.layers.getByLayer(attr.layer),
                    showTitle: false,
                    cls: "legend"
                }
                return GeoExt.tree.LayerLoader.prototype.createNode.call(this, attr);
            }
        }
    },
    rootVisible: false,
    lines: true
});

new Ext.Viewport({
    layout: 'border',
    region: 'center',
    autoScroll: true,

    split: false,
    renderTo : 'bodypanel',
            items: [
                  mapPanel,tree

            ]

});

});


texts: Select Widget not selecting all features inside polygon ArcGIS WebApp

texts:
AGOL version 8.4 - ArcGIS Web AppBuilder - Select Widget
I am trying to select a large number of point features using the Select Widget inside an ArcGIS web app. The number of features returned is smaller than the number that should be selected, and when zooming in the selection pattern appears random. Why are some features being selected and others not? Zoomed in  image shows the unselected points... Is there a threshold that can be set, perhaps in the original sharing/hosting stage?


texts: Is there a stats dashboard on cartoDB (now carto)

texts: I've been looking for an overview of map stats (how many views etc) on cartoDB (now carto). All I can find is the bar charts for each map in the gallery. Is there a page on the site that brings these together?


texts: arcpy: join feature class (one to one) and get feature id of each joined object

texts:
I am currently spatial joining two feature classes like this

arcpy.SpatialJoin_analysis(target_features,join_features,output_features,
                       join_operation="JOIN_ONE_TO_ONE",
                       join_type="KEEP_ALL",
                       match_option="CLOSEST")

I need to access the object ID of each join feature that was joined to the target feature.  However, in spatial joins, arcpy only adds "JOIN_FID" in one-to-many joins.  In a one-to-one join I only get "TARGET_FID" (which seems pretty useless as I knew that already).

How can I access (programatically) the feature ID of the joined feature from the output feature class?


texts: why is map tiling computationally intensive?

texts:
I recently starting using gdal2tiles.py (and its parallel implementation) to generate tiled images from raster datasets for kml interpretation and I'm shocked by how computationally intensive the process is. For example, rendering a 3.8MB PNG image of the US (35000 x 15000 px - or 2500 dpi @ 14" x 6") with tile levels 0-7 takes over an hour on a modern quad-core system. Even then, the resolution isn't all that great!

What is happening during the tiling process that is so computationally intensive?


texts: Multiple raster - same extent - smallest overlapping area

texts:
Within ArcGIS (10.1) I have multiple raster files, for which I have to calculate different statistics, based on the total size of the raster.

EDIT: The raster have the same extent on a coarse scale from a visual Impression, but zooming in on a fine scale it is visible that the cells at the boundary are different. The raster have been computed with different Software products, but they have the same cell size.

I already tried to clip all raster by the same polygon of the study area boundary, but this still gives a different total size of the raster.
The problem is that I cannot compare the raster if the total size (number of cells multiplied by the cellsize_x multiplied by the cellsize_y) for the one is 119.5 km2 and for the other 120.8 km2.

How can I calculate the smallest overlapping area of the multiple raster?


texts: Calculate distance from polygon feature centroid to coordinate in QGIS 3.18

texts:
I have a shapefile with a lot of polygon features in it. For each polygon, I want to calculate the distance from the centroid of each polygon to a certain coordinate.
How can I achieve this using the field calculator?

See the added picture for an example: For every feature, I want the distance from its centroid to the red dot (CRS projection I used is EPSG28992, but regular lon lat is also fine. As long as the distance gets calculated).


texts: Why Integrate GP tool (ArcGIS) does not use the cluster tolerance as expected?

texts:
Have spent some time on generalizing some datasets and got puzzled by the algorithm used by the Integrate GP tool.

I have two points in a file geodatabase of 10.3 version, those points are located on a certain distance from each other. I run the Integrate tool (tried both inside and outside the editing session). The feature class is stored in a projected coordinate system (specifically, the WGS_1984_Web_Mercator_Auxiliary_Sphere). I run the Integrate tool on this feature class with the cluster tolerance = 1000m.

I cannot comprehend how the cluster tolerance is used. I've added a scale bar while in Layout mode for illustration purposes. Here points will be integrated when the distance between them = ~2300m.

They stop collapsing into one feature in between when the distance gets larger than ~2800m. Any value smaller than that will move both points into a position that is right between them (i.e., they get integrated).

So, I could see two ways the cluster tolerance is used:

if the distance between the two points is smaller than the cluster
tolerance, they will be moved into a common central position; doesn't
seem to work for me - they get integrated when distance between them > 1000m.
if the circles around the points (with
radius=cluster tolerance) intersect, they will be moved into a common
central position (then they should be integrated if the distance
between points < 2000m, which again is not the case.

Can anyone explain how does the Integrate tool work in terms of cluster tolerance, because from my tests it doesn't make sense.

I am on ArcGIS 10.3, but I've tested on 10.2 and got the same behaviour.


texts: Flow accumulation algorithm open source code in C++ on Windows

texts:
I'm looking for flow accumulation open source implementation ( C++ or C# would do, Python no), on Windows, preferably the source code comes with Visual Studio project files so that I can just build and run immediately.

This is my actual problem statement:

  I have a terrain ( in the form of mesh/element), and I want to
  indicate how the water flows in the terrain, subjected to gravity
  force and the terrain condition ( of course).

  A crude way of doing this is to take every single mesh element, then
  draw the water flow direction from the highest point to the lowest,
  but I think this will result in a lot of ugly arrows that although can
  roughly point towards the correct directions, but really don't look
  nice when view as a whole.

I've asked this question at Computational Science Stack Exchange, but I reask here because I wonder whether there is any other flow accumulation option besides RichDEM, which I've some trouble with because I am not familiar with GCC compiler used to compile it, and also because I'm not too familiar with the R tools.


texts: Is there a way to view Pix4D outputs in an intractable web viewer?

texts:
I have a small area that I created a 3D Triangle Mesh for. I want to be able to use the output files and view them on a browser rather than in the program so it's easier to share with others.

I've tried opening the KML file in Google Earth and Maps, but it only takes me to the location.

And the DSM I open in ArcScene or ArcMap doesn't have the orthoimages on it. Its merely a DSM.

Below is an example of what I'm working with. Its small, but I want to be able to manipulate it on the web, and share it with others to manipulate as well.

Any suggestions?


texts:
After running a GRASS watershed algorithm I've got nine new layers:

Each one is in its own folder with a long hex name under a processing folder with a long hex name:

/tmp/processing_7dcdb54465034e139116032dc507384b/d6a3c2fc521146f792f01b0fc6c6acad/spi.tif
/tmp/processing_7dcdb54465034e139116032dc507384b/b7fe7e0b26934216b084c456f90f8873/drainage.tif

These are in a temporary folder (/tmp) so what I want to do is copy them to a less temporary folder (eg in my /home) and (ideally) update the QGIS layers to point to them in their new location.

I tried some plugins that do this kind of thing but for all layers, in order to make a transportable set of data and QGS project files:

QConsolidate3 : "Error: Parse error at line 1, column 1: error occurred while parsing element" on running it. Output folder empty.
QPackage : Install fail with "TypeError QVariant object is not subscriptable"
relocator : mentioned in another SO post, can't see it in my plugin dialog.

I could move that processing folder but there are also a few other folders in there with things I don't want. Selecting all the raster layers and using "Save As" or "Export" only saves the first layer.

I think (before I write a plugin to do this myself) I can create a layer definition file from the group, get the paths, and move the files manually. Luckily I've not set up any complex styles (yet) so losing the styles isn't too much trouble. But if I'm missing an easy way to do this I'd like to hear it...

Of course what I probably should have done is set the GRASS output folder to be where I wanted it in the first place....


texts: Making a 3D map by interpolation by stacking data for different depths

texts:
So, I have the data of shipping Noise levels at various coordinates (300x300 km grid, with 900 coordinates). I have the Noise levels for 5 depths (10m, 30m, 50m, 70m, 90m) and I while I am able to create separate 2D maps for each of the depth, I need to visualize the sound behavior underwater.
Is there any way this can be done?


texts:
I have a list of more than one hundred CRS defenitions in PROJ4 format in a plain text file (csv, tsv or txt). I'd like to know if there is any way of adding them into QGIS database at once. The "Custom CRS" dialog offers only manual adding of CRS into the app.
QGIS 3.14.1


texts: I have a raster stack that has NULL values from applying a focal buffer. They're not NA values but 0. Each layer shares the same extent, but the layers with the larger buffer widths have more 0 values (more whitespace around the perimeter) than those with smaller buffer widths. How can I create a new stack that clips each layer based on the extent of the largest buffer layer after removing these 0 values? In other words, I would like the extent of each layer to match the smallest extent after removing 0 values. In the example below, the X2017.10.10.arterial10000m layer would have the smallest extent.


texts: How geographically accurate is Google Earth?

texts:
I'm using a KML file which I have loaded in to Google Earth. I am looking at some islands, and see items such as the following island:

Note the blue region is the polygon describing the area provided, and the image in the background. Sometimes I see similar shapes, but they are off a bit, such as below:

Bottom line is, I'm trying to get as accurate of a map of some of these island nations that I can. Is it fare to use the image that comes from Google Earth to attempt to make a better representation of such islands, or is there enough inaccuracy in the creation of Google Earth islands that it is not worth making any changes?