texts: Create frequency polygon from overlapping features in another polygon

texts:
Mac 10.9.5; QGIS 2.8.4-Wien; history and unioned data, in GDA94, zone 55 here.

I have a polygon of fire history with a number of overlapping features. I want to create a new polygon for fire frequency, where each feature has a count of the overlapping features in the history polygon.

The attached data is a small subset of my full data set, so I need a method that will be manageable with a large data set.

I unioned the history polygon to itself to get the individual features that should contain the frequencies. I previously followed Donovan Cameron's method in ArcGIS (http://forums.esri.com/Thread.asp?c=93&f=987&t=282764) with success. However, there is no 'summarize' option in QGIS, so I get stuck at point #6 in that method. I no longer have access to ArcGIS, so I am looking for a QGIS solution.

Here are some other things I've tried:

In another ArcGIS method (gis.stackexchange.com/questions/51929/how-to-count-and-rasterize-polygon-overlaps-in-arcgis-desktop), I get stuck at the 'dissolve' step (step 2) because there is no option to count in the dissolve tool for QGIS.
In the spaghetti and meatball (blogs.esri.com/esri/arcgis/2012/11/13/spaghetti_and_meatballs/) method, I substituted 'Feature to polygon' with union, and used Vector>Geometry tools>Polygon centroids (instead of the suggested Feature to point tool). At the intersect step I get an empty polygon so I tried to use the spatial join then join steps. This produced a range of the counts I was expecting (0-4) but not all of the original unioned polygon features were retained and the spatial configuration of counts were incorrect.
Finally, I've tried raster solutions (e.g. Creating a raster surface of overlaps from vector polygon shapefiles?), but I can't work out how to split my polygon features into separate polygons (multipart to single part returns an indentical polygon).


texts: Display only one symbol when points overlap

texts: I have a series of points that each represent a sample taken at various locations across the site.  Some points appear to overlap when I display the entire site.  Is there a setting to only display one point if overlap occurs?  I don't want to disperse the points because I want the positioning to be accurate, rather I would only like to display one symbol if points overlap at the current extent.


texts: GetFeatureInfo on GeoServer - what parameters/variables are available

texts:
I am customizing the HTML response from GetFeatureInfo on GeoServer. GeoServer uses freemarker templates (content.ftl) to build the HTML response.

The attributes are available as a list. Since the findings are related to grid cells with unique ids I can create a string of the relevant grid cells. This string can again be used to build a URL which is sent to an API connected to my database.

I plan on using iframe to present the API response. This way I can get richer content on my HTML response.

Building the API based on the above is possible. But it would be better if I could forward the original bounding box info to the GetFeatureInfo request.

Is the bounding box available from within the GetFeatureInfo freemarker template? If so, how do I request it and forward it to the API?


texts: I am getting very low reflectance values (mostly < 0.15) in all bands of multiple Landsat 7 scenes after having converted to TOA reflectance manually in ENVI. These values are not supposed to happened. The objective is to perform relative radiometric normalization between these scenes (2010) and others from Landsat 8 (2016) (OLI scenes worked well!).


texts: Writing Python Script to Iterate through several geodatabases in folder and copy feature classes to single geodatabase?

texts:
I need to go through multi GDB in 1 folder and copy all feature classes from each GDB and copy them into the single GDB. I create a piece of python code that can go through each different GDB and also can access to all FCs in each GDB but, I can not copy them to the single GDB.

import arcpy, os
from arcpy import env
arcpy.env.overwriteOutput = True

# The folder that contain multi GDBs
env.workspace = r'C:\Users\Desktop\Polygon Created By Tool\Polygons For AutoA'

# New GDBs for output
output = r'C:\Users\Desktop\Polygon Created By Tool\Polygons\ALL POLYGONS.gdb'

gdbname=arcpy.ListWorkspaces()
for gdb_Name in gdbname:
    env.workspace = gdb_Name
    for fc in arcpy.ListFeatureClasses():
        arcpy.MakeFeatureLayer_management(fc, fc+'new', '#', output, '*')


texts: TauDEM: identical flow accumulation values along stream

texts:
I recently discovered TauDEM and overall experience is fantastic.

However I found something weird, when computing flow accumulation (ESRI ArcGIS term) or D8 Contributing area (TauDEM term). Some neighboring cells, very few though, along high flow line store the same value:

which in my opinion defeats the definition of flow accumulation. Even stranger, this is happening on a single flow path only, unless I've failed to find other duplicates.

I am posting this question, because software author David Tarboton suggested to do so on his site. So hopefully he might comment on this (minor) issue to benefit multiple users.


texts: Zonal Statistics as Table: Generic 99999 Error on Some Features

texts:
I'm running Zonal Statistics as Table on three separate feature classes. These feature classes represent travel walk bands from various locations. These travel bands are my zone data, I have a regular raster stored in a geodatabase for my value raster, and I am calculating the mean raster value.

As you can imagine, many of these travel bands overlap, which is problematic for Zonal Statistics as Table. I got around this issue by using a Python script to iterate through each zone one at a time and then merge the outputted single-record tables at the end.

One outstanding issue I am having is that some of the input travel bands/zones refuse to calculate a mean raster value; it keeps returning a generic error. I have included a try-except clause in the script to handle these errors and include a note of the problem zones.

Isolating these problem zones and trying to run a Zonal Statistics as Table using the official tool returns the same error.

On a separate run of Zonal Statistics as Table, these same exact zones functioned perfectly fine with a different raster and using the sum statistic option.

I have tried various remedies including: ensuring projections match, checking field names, making there are not very many records, altering some of the suggested raster ArcMap options, repairing geometry etc...

The amount of records this error occurs with is quite small relative to the total number of zones, so I am not overly worried if I have to throw them out. Although naturally, I would like to include everything I can.


texts: Reverse colour-ramped DEM to its original elevation value?

texts:
A have a GeoTIFF LIDAR image which display DEM in its color-ramp version (color relief) from blue (minimum value) to red (maximum value) and green (in between).

I don't have the original elevation data.

Is there any application or algorithm to turn this 'color coded' maps into its original DEM? (elevation data).

Suppose from another measurement, I know the elevation at multiple point in the DEM to reference the color-map. (or in case I'm sure that some region is the sea, I'll assign zero to it).


texts: Seeking tools or open source library to deal with LIDAR data(mobile laser scan data)

texts:
I would like to do some research job relating to automatic objects extraction along the road, like road markings, pole-like objects.

I have to pre-process the original data before applying my own algorithm, including segmentation of huge datasets, filtering of road poins, and feature image generation.

What tools or open source lib can I use?


texts: band name for landsat surface reflectance product

texts: I'm looking for any link/documentation where the centre wavelengths of Landsat surface reflectance product are  stated/written (i.e. the value for each centre band). Specifically, I wanted to be sure the band names are same as Landsat 8. All I've seen so far is the band 1, band 2, band 3..... naming convention without the exact value.


texts: How to use edge match tool for a larger tolerance? It seems that snapping tolerance didn't work

texts:
When I use edge snapping in spatial adjustment to connect two layers, I find that it works on the lines which are close to each other (about 3 meters). But when the distance became large (about 8 meters), it does not work.

I tried to set the snap tolerance, but it did not work too.


texts: QGIS Calculating Line Lengths and Statistics

texts:
I am working through this tutorial:

http://www.qgistutorials.com/en/docs/calculating_line_lengths.html

In the tutorial we import a shapefile map of railroads,clip the data through a selection/calculation to create a new layer. Next we add a new field to this new shapefile table using Field Calculator.

Everything was working until I got to steps 18 and 19 when I need to SUM up the length of all the values in the field.

I am using a later version (2.18.3) So my steps for this process are  Vector>Analysis Tools>Basic Statistics for Numeric Fields.

In the Basic Statistics For Numeric Fields dialog box I am able to select the layer, but I am unable to select the field 'length_km2' I think the problem is that the field is the wrong type. The field I need is currently set to 'double' in the table. The type name is 'Real'. I think the type should be 'Real' or 'Integer'. Is there a way to edit the field type? Or is there another way to apply this calculation?


texts:
So I've got a website that I want to extend by letting people look up postal/zip codes for an address they enter.  I've already got all the addresses (with their postal codes) for the city in an ArcSDE geodatabase.

What I'd like to happen is that the user will enter a civic number, select a street from a dropdown list and then upon clicking a button the postal code for the address will appear in it's text box.

I've created a script tool that takes two arguments: civicNumber and streetName and then uses a search cursor to get the postal code for the address.  If it finds the postal code the tool uses arcpy.AddMessage() to return the postal code.

This actually works, I've turned the tool into a GP Service and tested it from the web and the postal code is indeed being returned in a esriJobMessageTypeInformative JSON object.

My question is this: Is there any way for the Python script to return the Postal Code as a string without using the arcpy.AddMessage() function?


texts: Error: Image.reduceRegions: Unable to find a crs. within a loop in Google Earth Engine

texts:
I am trying to get daily estimates for AOD per Census tract in CA from the year 2000-2015. When I run the loop to filter to the daily level. I get the Error: Image.reduceRegions: Unable to find a crs. I know this is because some of the images do not have bands. (I'm assuming this is from missing data of AOD measurements for that particular day). I'm not sure how to filter out these images within the loop in order to get it to run. Here is a link to my GEE code: https://code.earthengine.google.com/98a73c8ea6e71633c3e14258b39e759d:

var CACensus= ee.FeatureCollection('users/s1mcelroy1287/tl_2010_06_tract10');
var filtAOD01= AOD.filterDate('2001-01-01','2001-12-31');
var filtAOD00=AOD.filterDate('2000-03-01','2000-12-31');

 //Creating function to get mean AOD per Census
 var calcmeanAOD=function(image){
 var AODpercensus=image.reduceRegions(
{

  collection:CACensus,
  reducer:ee.Reducer.mean(),
  scale:1000,

})

return AODpercensus;
};

//Writing loop for daily AOD measurement per Census tract across the CA for 2001

var myList=ee.List([]);
   for (var day=1; day<366; day++){
   var data=filtAOD01.filter(ee.Filter.calendarRange(day,day,'day_of_year'));
   var AOD01 = data.select('Optical_Depth_047').mean();
   var AOD01Census=calcmeanAOD(AOD01);
   AOD01Census=AOD01Census.set('day_of_year',day);
   myList=myList.add(AOD01Census);
   var myListFlat=myList.flatten();
   var myList01=ee.FeatureCollection(myListFlat);
  }

 Export.table.toDrive(myList01,'AOD_Zcta_00');


texts: NetworkX read_shp works on Python 2.7 but not on Python 3?

texts:
I was trying to implement the same code in Python 2.7 and Python 3.0 opening the same file from the same directory using NetworkX's read_shp function.

One, using Python 2.7 IDE and the other is using Virtualenv Python 3.0 in Django.

Python 2.7

import fiona
import networkx as nx

features = fiona.open("/home/gridlockdev/Desktop/heroku/grace/files/test/test.shp")

print len(features)
#for feat in features:
    #print feat['geometry']

G = nx.read_shp('/home/gridlockdev/Desktop/heroku/grace/files/test/test.shp')
print len(G.nodes())
print G.nodes()

print len(G.edges())
print G.edges()

Python 3.0 Django

def view_network(request):
directory  = os.path.join(settings.BASE_DIR, 'files/test/test.shp')

#Open shapefile
shp = fiona.open(directory)

if shp is None:
    print('Could not open %s' % (directory))
else:
    print('Opened %s' % (directory))

    featureCount = len(shp)
    print("Number of features in %s: %d" % (os.path.basename(directory), featureCount))

    G = nx.read_shp(directory)

    print("Number of nodes %d" % G.nodes())
    print("Number of edges %d" % G.edges())

    return render(request, 'plexus/analysis.html')

Python 2.7 would read it and output the corresponding nodes and edges. But 3.0 would not, instead this error shows up:

  Internal Server Error: /network/view/

  Traceback (most recent call last):   File
  "/home/gridlockdev/Desktop/heroku/grace/env/lib/python3.5/site-packages/django/core/handlers/exception.py",
  line 41, in inner
  response = get_response(request)   File "/home/gridlockdev/Desktop/heroku/grace/env/lib/python3.5/site-packages/django/core/handlers/base.py",
  line 187, in _get_response
  response = self.process_exception_by_middleware(e, request)   File "/home/gridlockdev/Desktop/heroku/grace/env/lib/python3.5/site-packages/django/core/handlers/base.py",
  line 185, in _get_response
      response = wrapped_callback(request, *callback_args, **callback_kwargs)   File "/home/gridlockdev/Desktop/heroku/grace/network/views.py", line 242,
  in view_network
      G = nx.read_shp(directory)   File "/home/gridlockdev/Desktop/heroku/grace/env/lib/python3.5/site-packages/networkx/readwrite/nx_shp.py",
  line 71, in read_shp
      for f in lyr:

  TypeError: iter() returned non-iterator of type 'Layer'


texts: How do I set the domain extents to default?

texts:
I have a feature class that seems to be cutting off geometry. I looked around to see if there is a bounding box applied and found the Domain, Resolution and Tolerance tab in the Feature Class Properties.

The Min / Max values are populated with values that are not appropriate for my region. How do I set / reset the extents to the default value? That is, how do I let the geometry control the extents? Various documents suggest using the "use default extents" checkbox but I don't see that option anywhere.

This feature class is in enterprise SDE - not a local file geodatabase.


texts: I have got this message when I was trying to run PostGIS 2.0 shapefile and dbf loader and exporter for first time. I tryed to reinstall but it did not run after second installation either. I have Win10 and PgAdmin4. How can I solve this problem?


texts: Writing style information into geopackage with python and GDAL

texts: I managed to generate geopackage with GDAL/OGR Python API using this example from the official website. However, there's no information on how to write style information into the geopackage file. Any suggestions?


texts: Projecting a PRISM raster from NAD1983 to Albers Equal Area PCS in ArcMap: Why does my raster change position and cell size?

texts:
I want to perform zonal statistics on PRISM precipitation rasters using watershed shapefiles as my input zone features.  I'm operating under the precept that I should project all my data into the same PCS before doing zonal stats. Original PRISM data is in NAD 1983.

Yet, I am having a couple issues understanding why Project Raster apparently adjusts the original PRISM rasters.

First, regardless of interpolation method I choose (nearest, cubic, bilinear), the position of the resulting projected raster is the same.  Not sure it matters but dataframe is NAD 1983.  From what I've read, generally speaking, cubic is best for continuous data like precipitation and that it should change the cell's values (it did in my projection process).  Though, I expected spatial location of the original raster data to be preserved using cubic as opposed to nearest interpolation.

Second, after running Project Raster, the cell size of the original raster changed from 4x4 km (that's the resolution of publicly available PRISM data) to ~ 5x5 km in the projected raster.  These are approximate values using measurement tool.

Why does the spatial location and cell size change during the projection process?  I didn't set a Snap Raster or change the Output Coordinate System or Raster Storage in Env't Settings either.  Any link to a scientific paper or blog/online article post discussing the best practices for Project Raster?


texts: Using reduceRegions to calculate landcover

texts:
I am trying to use reduceRegions across a number of polygons to extract landcover classes and calculate the percentage frequency per polygon. I can do this fine with reduceregion but I am struggling with doing this across multiple polygons. The end result I am aiming for is the percent of the different land cover types in each polygon (my buffers around the points) that I can then extract to .csv.

I have read through the different help pages and debugging and I am aware I am probably missing something very simple / obvious. However I am very new to EarthEngine and JavaScript and I just can't see how I translate .reduceRegion solutions to reduceRegions.

Example script is below:

//Load in landcover map

    var globcov = ee.Image("ESA/GLOBCOVER_L4_200901_200912_V2_3");

    var landcover = globcov.select("landcover");
    print(landcover)
    //make a few random points using the add geometry

    var points = [
      ee.Feature(ee.Geometry.Point(-11.73, 9.3), {name: 'A'}),
      ee.Feature(ee.Geometry.Point(-10.530, 9.28104), {name: 'B'}),
      ee.Feature(ee.Geometry.Point(-11.530, 9.48104), {name: 'C'}),
      ee.Feature(ee.Geometry.Point(-10.830, 9.33104), {name: 'D'})
    ];

    var ex_points = ee.FeatureCollection(points);
    print(ex_points);

    //put a buffer round to make the different regions
    var buff = function(feature){
        return feature.buffer(5000);
    };
    var buff5000 = ex_points.map(buff)

    Map.addLayer(buff5000)

    //calculate the histogram with reduce.regions

    var varslc = landcover.reduceRegions({
      reducer:ee.Reducer.frequencyHistogram(),
      collection: buff5000,
      scale:1000,
    });

    print(ee.Feature(varslc),{},"varslc");

    //try to recover the histogram information - This is the first problem
    print('landcover frequency', varslc.get('landcover'));

    //The below code works on the output from .reduceRegion but not for .reduceRegions
    //I think the problem is the "get" command
    //Get command always returns null
    //Not sure what I should reference to using .reduceRegions compared to .reduceRegion to get the correct values from the dictionary

    var dict = ee.Dictionary(varslc.get('value'));
    print(dict, {},"dict") //This is always null

    //Below calcuates the percent on a single polygon fine but I cant translate to the multiple polygon

    var sum = ee.Array(dict.values()).reduce(ee.Reducer.sum(),[0]).get([0]);
    var new_dict = dict.map(function(k,v) {
      return ee.Number(v).divide(sum).multiply(100);
    });

    print('Land Cover (%)',new_dict);


texts: How to correctly import a raster file with these metadatas into Tilemill?

texts:
I have a GeoTIFF file for which gdalsrsinfo reports this:

PROJ.4 : '+proj=utm +zone=32 +datum=WGS84 +units=m +no_defs '

OGC WKT :
PROJCS["WGS 84 / UTM zone 32N",
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0,
        AUTHORITY["EPSG","8901"]],
    UNIT["degree",0.0174532925199433,
        AUTHORITY["EPSG","9122"]],
    AUTHORITY["EPSG","4326"]],
PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",0],
PARAMETER["central_meridian",9],
PARAMETER["scale_factor",0.9996],
PARAMETER["false_easting",500000],
PARAMETER["false_northing",0],
UNIT["metre",1,
    AUTHORITY["EPSG","9001"]],
AXIS["Easting",EAST],
AXIS["Northing",NORTH],
AUTHORITY["EPSG","32632"]]

If I try to import that file into Tilemill, I cannot view it properly. If I chose to let Tilemill autodetect the SRS, it fails:

Unable to determine SRS for layer "antani2" at /home/strappanai/antani2.tiff

If in Tilemill I specify a Custom PROJ.4 string instead, that is, the one I get from gdalsrsinfo (and from QGIS as well), that is

+proj=utm +zone=32 +datum=WGS84 +units=m +no_defs

then the layer actually  gets imported, but it is showed significantly tilted to the right - not as expected.

I don't know if this may matter to any extent, but QGIS imports and visualizes the file perfectly fine.

I also tried to reproject the source file as instructed here:
https://www.mapbox.com/tilemill/docs/guides/reprojecting-geotiff/

But gdalwarp returns this error a thousand times and then fails:

ERROR 1: Too many points (441 out of 441) failed to transform,
unable to compute output bounds.
Warning 1: Unable to compute source region for output window     3593619,2225230,6394,6394, skipping.
More than 1000 errors or warnings have been reported. No more will be reported from now.

EDIT:
This is the Layer Extent given by QGIS.

Layer Extent (layer original source projection)
638153.2011202700668946,5115644.8502587005496025 : 662908.4373886700486764,5132649.3878203006461263

Here's an identically behaving file:
sample file

And here's how it's pictured in QGIS and in Tilemill (QGIS reads the SRS from the file, I specify the PROJ.4 string into Tilemill as stated above as it can't read it out from the TIFF).


texts: How do I add my .shp file as a Vector layer in QGIS?

texts: I'm working in QGIS 3.12 and my university as given us zip files of "data" for each practical we do. I've unzipped it and followed steps of adding a vector layer and navigating to the right file to add the layer. But each time I can see it in the list of layers in the bottom right of the screen but not as an actual map in the project. I've attached a picture of what I see once I've added it. I've tried closing and starting the project again but other than that I don't know what to do.


texts: How to handle coordinates accuracy in ArcGIS

texts:
I am creating very basic rectangular polygon using very basic a Python code

nCols,nRows=100,100
corners =[[0,0],[0,nRows],[nCols,nRows],[nCols,0],[0,0]]
p=arcpy.Polygon(arcpy.Array([arcpy.Point(*coords) for coords in corners]))
arcpy.AddMessage(p.area)

and this is a message

10000.0244140774

It seems that forced conversion to doubles is a reason, as described in
ArcGIS 10 exports losing precision with large numbers

Who can please tell how to get more accurate result?

P.S. Polygon created in ArcView 3 using same coordinates has an area of 10000.0000

This is update on my original question. Slightly modified code:

nCols,nRows= 101, 101
corners =[[1,1],[1,nRows],[nCols,nRows],[nCols,1],[1,1]]
p=[arcpy.PointGeometry(arcpy.Point(*coords)) for coords in corners]
arcpy.CopyFeatures_management(p, "d:/rubbish/points.shp")
p=arcpy.Polygon(arcpy.Array([arcpy.Point(*coords) for coords in corners]))
arcpy.AddMessage(p.area)

produced correct answer(!). Area of polygon = 10000.

This is a relief, I don't have to write my own procedure in GIS to calculate area of the shape. What I don't like are coordinates of the points that makes this polygon:


texts: Using commands from ArcMap Main Menu in ModelBuilder?

texts:
Is it possible to use the functions from ArcMap's Main Menu (for example Add Data, Start Editing) in my model?

I cannot find a way to add any other functions except Toolboxes.


texts: "Orphan Symbol" problem with QGIS marker line symbol

texts:
I'm experiencing a problem with the way QGIS Essen 2.14.12 draws a marker line symbol at the end of a polyline.  It only occurs sometimes, and sometimes moving (even slightly) the mapping within the window will make the "orphan" symbol disappear, or make it reappear.  Zooming in/out will also have the same seemingly random effect.  I hope the attached image shows the problem - note the floating V at the top end of the brown line.

The offending V is an inverted V symbol and offset by 8mm relative to the non-offset symbol (which plays nice and behaves itself) see settings below.

Despite searching, I've not found an answer to this issue.


texts: Batch digitization of a fixed set of relative geometry

texts:
In support of some watershed work, I need to force flow into several valid sinks that I have burned into my DEM. Flow direction and flow accumulation really don't like sinks so trouble is that the flow accumulation at my sinks is zero and the several flow lines to each of the sinks do not converge.  as a result, my pour points fail to capture all flow.

Since all flow lines terminate at the 8 pixels immediately adjacent to my sinks, I have proposed placing 8 additional pour points at fixed positions relative to my current points such that:

For each input point, 8 new points with the same attributes are to be created to match the fixed pixel spacing of my DEM.

to put it another way, for each input pixel (yellow) I want the digitize the 8 surrounding ones (cyan)

are there existing tools or processes that I can use to accomplish this?

I asked these questions yesterday to bring me to this thought process

Understanding ArcGIS Flow accumulation result?

Understanding ArcGIS Flow Direction pixel values?


texts: Loading GeoJSON vector layer does not limit loading when setting maxResolution/minResolution

texts:
I am using GeoJSON Vector layer that is loaded dynamically through a call to a server api method. This basically works, but it potentially loads a lot of features, so I want to limit the zoom level so it does not load when zoomed too far out.

I try to set maxResolution on the config, but this does not seem to have any effect.

Here is my layer source definition:

  var vectorFormat = new ol.format.GeoJSON()
  var vectorSource = new ol.source.Vector({
    maxResolution: 1.2,
    strategy: ol.loadingstrategy.bbox,
    loader: function (extent, resolution, projection) {
      var transformedExtent = ol.proj.transformExtent(extent, projection, 'EPSG:4326')
      self.loadGeoHashesJson(transformedExtent).then(function (response) {
        console.log('loadGeoHashesJson response:', response)
        var features = vectorFormat.readFeatures(response.body, { dataProjection: 'EPSG:4326', featureProjection: projection })
        vectorSource.addFeatures(features)
      }, function (response) {
        console.error('error getting data from server', response)
      })
    }
  })

I also tried to check on the resolution inside the loader method, and skip loading the data if the resolution is larger than the maxResolution. This works initially, but it does not trigger load immediately when zoomed in to a valid resolution.  I have to pan about a bit to get to an area that has not been touched earlier for it to load again.

How can I get this to work so that the maxResolution is actively stopping the layer from loading when resolution is above maxResolution, and actually loading when the resolution goes below maxResolution?


texts: Make a loop in Google Earth Engine for reduce NDVI from year a months?

texts:
I have this code, it generate N ImageCollection and for each image a chart from NDVI in function a the months

This is the place of study:

var areaEst = ee.FeatureCollection("users/aleszczuk/Trabajo_Final_Especializacion/TF_Mascara_Suelos")

This is the collection:

var NDVICollection=ee.ImageCollection('MODIS/MOD13A1')
                         .filterDate('2000-01-01','2018-12-31');

a list

var list=NDVICollection.toList(20);

The loop a generator of charts:

for (var i=2000;i<=2018;i++){
    var image=ee.Image(list.get(i));
    var name1=ee.String('Grafico ')
      .cat(ee.String(ee.Number(i)))
      .getInfo();

    var NDVICollection=ee.ImageCollection('MODIS/006/MOD13Q1')
                         .filterDate(i+'-01-01',i+'-12-31')
                         .filterBounds(table).select('NDVI');
                         print(NDVICollection,i);

    var tempTimeSeries = ui.Chart.image.seriesByRegion(
                        NDVICollection, table, ee.Reducer.mean(), 'NDVI', 200, 'system:time_start', 'class')
                          .setChartType('ScatterChart')
                          .setOptions({
                                      title: 'NDVI por potrero año '+i,
                                      vAxis: {title: 'NDVI MODIS'},
                                      lineWidth: 1,
                                      pointSize: 4,
                                      series: {
                                              0: {color: 'FF0000'},
                                              1: {color: '00FF00'},
                                              2: {color: '0000FF'}
}});
print(tempTimeSeries);
}

So far so good, the issue is that now I want to adapt the following line of code to generate collections of images and reduce them to months

That is to say 18 collections of 12 months instead of having the 23 data that are in the imagecollection's.

The code is:

//Function for reduce a temporal resolution a months
var months = ee.List.sequence(1, 12);

var NDVI_mensual = months.map(function(m) {
  // Filter to 1 month.
  var NDVI_men = NDVI.filter(ee.Filter.calendarRange(m, m, 'month')).mean();
  // add month band for MMax
  return  NDVI_men.addBands(ee.Image.constant(m).select([0],['month']).int8());
});

var NDVI_mensual = ee.ImageCollection(NDVI_mensual);

This code works well but it generates me a single image.
I need 18, one per year.
I need adapt the previous code and assemble it with the loop.


texts: Expected field value does not appear after converting .shp to .asc

texts: I converted .shp map to .asc choosing land-use type field (e.g building=1 etc). I expected the .asc will contain numbers of the land-use types. However, the values are all zero when I open it with notepad. Below the parameters used for converting .shp to raster and raster to .asc.


texts: ESRI Flex Viewer 2.4 - Changing Widget Title At Runtime

texts:
I have an "About" widget which displays information about the current active widget in my Flex Viewer app.  I am trying to update the About widget's title accordingly.  For example, if 'Super Fancy Widget' is active, the about widget title would read 'About Super Fancy Widget'.

Updating the widget title property only seems to stick the first time.  Continuing on my example above, if I then activate 'Other Widget', the about widget's title still shows 'About Super Fancy Widget'.

The snippet below is the code that I am expecting to update the widget's title.  It is in the About widget, and basically just sets the widgetTitle property from the WidgetTemplate.as

public function set aboutTitleLabel(value:String):void
{
     this.widgetTitle = value;
     this.invalidateProperties();
     this.invalidateDisplayList();
     this.validateNow();
}

Any ideas on how to change the title dynamically?


texts: How to offset/ move Key Numbering and its lists instead of covering line features

texts:
Does anyone know how to move the placement of the key numbers and the key numbering lists?

I am labeling lines and the key number keeps getting placed on the line. But if the line is very small, the key number covers the line rather than labels offset from the line. I also Can't figure to move the list around. It would be nice if I could move that list to a standard position (i.e. on a legend).


texts: Make messageBar critical messages permanent

texts:
The default for messages generated with self.iface.messageBar().pushCritical() is to remain on screen for a set duration. I would like them to keep being displayed as long as the user has not closed them by clicking on "x", but I don't know how to do that.

I also tried using pushMessage()instead of pushCritical(), as it allows you to specify a duration and thus could make the message "permanent" if I specified a very long duration, but I can't get it to work. The instruction

self.iface.messageBar().pushMessage(u'Error : ', u' My error message.', level=QgsMessageBar.CRITICAL, duration=999)

gets me the following error in the console :
NameError: global name 'QgsMessageBar' is not defined.
I don't understand what the problem is, I used from PyQt4.QtGui import * at the beginning of my script...


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

texts:
I have a situation where I am inserting items from Excel into maps a lot.  When I insert the items it always makes them a fixed width and then adjusts height to maintain aspect ratio.

What I would like to do is paste the object, then click my tool.  THis would prompt me for a number of units the item should be, and the tool would then resize it appropriately.

I am able to get to a list of graphic elements ( narrowed down to photo elements even) using

arcpy.mapping.ListLayoutElements(mxd, "PICTURE_ELEMENT")

But, I'm not sure how to identify which one/ones are selected in order to start manipulating it/them.


texts: Why does the QGIS Conversion (Translate Format) fail in batch mode? QGIS 3.4.4

texts:
QGIS Conversion (Translate Format) will convert individual file from tif and tfw to tiff that does not need the tfw. But the batch process gives the error "Wrong or missing output value: Converted (row 1)".

I don't see any place on the batch screen that asks for output setting. I set the output to float 32 as one post suggested but got the same error

I have about 100 tif/tfw files I want to convert.

There was a similar question but it had no answer


texts: How to select different visualizations with buttons

texts:
I have created a few visualizations in cartodb, and I'm trying to create a html with some buttons to select each one.

I have seen some examples using createlayer and sublayers, but not using different viz.jon.

I am a rookie, and I would like that someone to give me a simple example to start developing.


texts: QGIS2web Leaftet Measure Control renders transparent

texts:
Exporting a map with QGIS2Web renders the Measure Control as transparent with no icon in it or anything.  See the attached image.  I have looked in the CSS and can't find any settings etc. in there to change either.
What is going on?


texts: Problem with transform in GRIB using GDAL

texts:
I'm getting some strange numbers out of a GRIB file (from a different source than others we process) and am not experienced enough with GRIB and GDAL to quite understand what is going on.

If I call GetProjectionRef I receive this:

GEOGCS["Coordinate System imported from GRIB file",DATUM["unknown",SPHEROID["Sphere",6367470,0]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]]

That would suggest to me that I should we working in lat/lon degrees. However, when I call GetGeoTransform I receive

[0] -2047.4836475
[1] -1E-06
[2] 0
[3] 74.9999995
[4] 0
[5] 1E-06

This seems inconsistent to me, particularly given that I know the top left corner of the raster should be at 75N 100W. The longitude of the transform appears to be correct, but all the rest are a mystery to me.

I also queried it with a different library (grib.api) and it also has trouble computing coordinates for the data, and lists the x and y direction stepsizes as "MISSING". However, if I open the GRIB file in the Panoply viewer, it seems to have no problems.

Am I overlooking something obvious (almost certainly!) or is the file ill-formed?


texts: QGIS Time Manager having trouble parsing valid dates from SQLite?

texts:
I am getting the message below from TimeManager in QGIS. The error message is confusing because the date is displays would seem to be a valid format (I'm using YYYY-MM-DD).  The table is in sqllite format.

Any suggestions where to look for the problem?  I have done a quick check of this large table, but I don't see any problems with the date field.

Here is snippet of the table:

Here is a snippet of the Field types in the table.  The date field is a QString.


texts: Is there any way to reproject multiple layers in QGIS?

texts:
I'd like to be able to consolidate not only the layers of a QGIS project (using QConsolidate) but also the projections used by each layer. On-the-fly projection reduces performance in QGIS, and this is particularly problematic when working on a slow platform such as an Android tablet; ideally I'd like to be able to quickly recreate a project with all its layers in a single CRS and turn off on-the-fly projection.

Is there a plugin that could take a selected set of vector or raster layers and reproject them, renaming appropriately? Is this perhaps something that could be done directly from the Python console, iterating over selected layers?


texts: Calculate shortest car distance -- repeated over many points

texts:
I am using QGIS 3.10.
I have a dataset with coordinates of many households. Separately I have coordinates of a number of sites. For each of these households, I need to calculate:

Which is their closest site by car
What is the distance to their closest site by car

Essentially I need to an equivalent of 'Distance to nearest hub' Vector Analysis, but not as the crow flies. I need car distances.
I tried plugin ORS Tools. I got the API key, but I cannot get it to work. There is an error everytime:
Traceback (most recent call last):
File "/Application Support/QGIS/QGIS3/profiles/default/python/plugins/ORStools/proc/directions_points_layers_proc.py", line 248, in processAlgorithm
destination_field
File "Application Support/QGIS/QGIS3/profiles/default/python/plugins/ORStools/proc/directions_points_layers_proc.py", line 327, in _get_route_dict
geometries=[xformer_destination.transform(feat.geometry().asPoint()) for feat in destination_feats],
File "Application Support/QGIS/QGIS3/profiles/default/python/plugins/ORStools/proc/directions_points_layers_proc.py", line 327, in <listcomp>
geometries=[xformer_destination.transform(feat.geometry().asPoint()) for feat in destination_feats],
ValueError: Null geometry cannot be converted to a point.

Execution failed after 0.23 seconds

I don't have to stick with ORS Tools. Is there any solution to do this calculation over many houses?


texts: Are calculations in ArcMap performed using map units or display units?

texts:
When using ArcMap (10.1), say I perform an operation like a Polygon Volume calculation.

Are the results in map units or display units (i.e., according to the Data Frame Properties > General tab)?


texts: QGIS Layers not lining up with same CRS projections

texts:
I've been working with Boston parcel and transit shapefiles downloaded directly from either the city website or MassGIS data center and can't figure out why the shapefiles are not lining up. I have 'on the fly' enabled and have set the project CRS to WGS 84 UTM19N as well as set each individual layer CRS to the same but the layers aren't layering. I'm working in QGIS 2.18.2 on a Mac.

The links to the shapefiles are as follows.
Parcel: http://bostonopendata-boston.opendata.arcgis.com/datasets/f3d274161b4a47aa9acf48d0d04cd5d4_0?mapSize=map-maximize&geometry=-71.923%2C41.978%2C-70.221%2C42.465
Transit: http://www.mass.gov/anf/research-and-tech/it-serv-and-support/application-serv/office-of-geographic-information-massgis/datalayers/mbta.html


texts: python plugin menu action in Composer menu

texts:
I'm new developing plugins for QGIS and am working on a plugin to add some pictures on the Composer layout.

I think the appropriate place to have the plugin menu action is in the Composer menu where one can see what's going on, not the mainWindow where everything happens out of view.

There is little code around about plugins for the Composer.

Can anybody help me with this?


texts: ArcGIS ModelBuilder model works in Edit windows but not from the "open" window - do you have any experience or advice?

texts:
I am using ArcGIS 10.1, most recent service pack/patch, and on Windows 7 with 8GB RAM

I always run Models from ArcCatalog

I have a model that validates and runs from the "edit" window.

When I run the exact same model with the exact same input data, but from the "open" window it returns error messages.

Do you have any experience or advice to share over this issue?

Are there certain tools or processes that can cause this issue?

The issue that occurs most frequently is with the Focal statistics and the Get Raster Properties Tools - when the model is run from the Open window these tools can fail because the preceding data does not have valid statistics. It is unclear why the model runs OK (with exact same data) from the edit window. Surely this should be picked up by the model validation process?

The errors that occur are

  ERROR 001100: Failed because no statistics are available.

The solution can be to add in "Calculate Statistics" tools into the models, however the behaviour appears erratic and this solution has occasionally not worked, even on the same model , same data, same computer.

One of the models that runs OK from the edit Window, into which I have added the Calculate Statistics tool, return the following error only when run from the Open Window.

  ERROR 999999: Error executing function. The workspace is not
  connected. Failed to execute (Calculate Statistics).

Any ideas/thoughts?


texts: Extract midpoint coordinates from TIFFs (QGIS)

texts:
I have a large collection (>20000) of georeferenced satellite imagery tiles in TIFF format. Each of them has a size of 64x64 pixels.

Is there a way to extract the lat/lon coordinates of the midpoint of each tile and store them all in one table?


texts:
I am trying to teach myself QGIS. I have been following the following notes: http://www.qgistutorials.com/en/docs/nearest_neighbor_analysis.html
While trying to reproduce the results from the link above, I have found that my output units are terribly wrong. In the example above the distances are between 0 and 1; however, my results seem to be in meters as they are considerably larger than those on the tutorial (they are all larger than 1000). I am using QGIS 3.4 on a Mac and I have checked that the CRS that I am using is the same as the one in the example. Any ideas regarding what could be wrong and how to fix it? Are you aware of another tutorial on the distance matrix?


texts: Update attributes of Esri FeatureLayer from Leaflet

texts:
I have a shapefile hosted as Feature Layer at ESRI Server.

I create a Leaflet application where I want to enable an attributes update of my Feature Layer (field 'Status'). I have customized a popup where users can choose an attribute value from the list. This value has to be sent to the server as soon as they click the "OK" button.

I tried to make use of Ajax. Console log returns an updated attribute, however I can not see any changes when I look at the data at ESRI Server.

Probably UpdateFeature function works only with geometry.

var net = L.esri.featureLayer({ url: netURL}).addTo(map);

var status_content = '<form role="form" id="form" enctype="multipart/form-data" onsubmit="addMarker()">'+
                  '
Update status
'+
                  '
'+
                      '<select class="form-control" id="st" name="new_status">'+
                        '<option value="etab">Established</option>'+
                        '<option value="plan">Planned</option>'+
                        '<option value="default">Default</option>'+
                      '</select>'+
                  '
'+
                  '
'+
                  '<button type="button" title="Save new status" class="ok" id="OK"></button>'+
                  '
';

net.on('click', function(e) {
       net.bindPopup(status_content);
       e.layer.openPopup();
       $(document).ready(function(){
          $("#OK").click(function(){
              e.layer.feature.properties["Status"] = $("#st").val();
              net.updateFeature(e.layer.feature.properties.Status);
              console.log (e.layer.feature.properties.Status);
              e.layer.closePopup();
              });
          });
    });


texts:
I've been working on an Android app (using Android Studio 3.0) that utilises certain supported GRASS GIS modules that are available on QGIS. It uses the module in conjunction with open source raster maps as well as user-inputed data to create a prediction model.

I'm new to GIS.

Is there a procedure for accessing these libraries as well as the OSM and Google Earth plugins out of the QGIS framework?


texts: GeoServer: Creating CQL-filter which only filters dates for given weekday

texts:
I use a GeoServer which i query over Openlayers with WMS and CQL.

I have a date field in my database which i want to filter with
CQL.

I want only have Dates which has the weekday monday.

The Result would contain only two dates.

id   time
1    12.10.2015 12:26:31
2    19.10.2015 13:45:00
3    20.10.2015 12:16:11
4    21.10.2015 12:03:45
5    22.10.2015 12:01:45

I don't see any way to do that. Are the some functions to do that?
I was thinking of use a formular to calculate the weekday, but therefore i need the day, month, year and century from a date and i don't see any way to extracts this values.


texts: Adding Transparent Polygon to Map using ArcObjects?

texts:
I am creating an ArcGIS Desktop Add-In that allows the user to draw a polygon and then have it added to the map. I am able to capture the polygon and add it to the map, the issue is the transparency. Currently and by default it is 100% opacity and solid. I want to make it around 50% opacity so the user can see the data behind it.

Here is the ArcObjects 10.3 code I have so far:

     public static void AddPolygonToMap(IActiveView ActiveViewInstance, IGeometry NewGeo)
    {
        //Local Variable Declaration
        var fillShapeElement = default(IFillShapeElement);
        var element = default(IElement);
        var graphicsContainer = default(IGraphicsContainer);
        var simpleFilleSymbol = default(ISimpleFillSymbol);
        var newRgbColor = default(IRgbColor);
        var lineSymbol = default(ILineSymbol);

        //Use the IElement interface to set the Envelope Element's geo
        element = new PolygonElement();
        element.Geometry = NewGeo;

        //QI for the IFillShapeElement interface so that the symbol property can be set
        fillShapeElement = element as IFillShapeElement;

        //Create a new fill symbol
        simpleFilleSymbol = new SimpleFillSymbol();

        //Create a new color marker symbol of the color black;
        newRgbColor = new RgbColor();
        newRgbColor.Red = 0;
        newRgbColor.Green = 0;
        newRgbColor.Blue = 0;

        //Create a new line symbol so that we can set the width outline
        lineSymbol = new SimpleLineSymbol();
        lineSymbol.Color = newRgbColor;
        lineSymbol.Width = 2;

        //Setup the Simple Fill Symbol
        simpleFilleSymbol.Color = newRgbColor;
        simpleFilleSymbol.Style = esriSimpleFillStyle.esriSFSHollow;
        simpleFilleSymbol.Outline = lineSymbol;
        fillShapeElement.Symbol = simpleFilleSymbol;

        //QI for the graphics container from the active view allows access to basic graphics layer
        graphicsContainer = ActiveViewInstance as IGraphicsContainer;

        //Add the new element at Z order 0
        graphicsContainer.AddElement((IElement)fillShapeElement, 0);

        //Show the new graphic
        ActiveViewInstance.Refresh();
    }


texts: Except from Hyperion do you know any other hyper-spectral satellites?

texts:
There aren't many images for my research area.
So I am looking for other hyperspectral satellites.
Or maybe another site except USGS?
The area is near here "40.223124, 23.031155"


texts:
I am trying to average 5 rasters in arcGIS using the Raster Calculator and the code: (Raster1 + Raster2 + Raster3 + Raster 4 + Raster 5) / 5

This does not error but I find that the output is identical to the 5th raster and does not reflect an average of the 5 rasters at all.

How can I error check this? The rasters look to be in the same format?


texts: How to optimize PostGIS Intersection Query

texts:
I've 2 sets of polygons in 2 tables and the sets overlap each other. For each polygon in set A, I get the ID of the polygon in set B that it overlaps the most.
This is the query:
SELECT DISTINCT ON (a.id)
  a.id as a_id,
  b.id as b_id,
  ST_Area(ST_Intersection(a.geom, b.geom)) as intersect_area
FROM a, b
ORDER BY a.id, ST_Area(ST_Intersection(a.geom, b.geom)) DESC

It works properly so, what's the problem? It's very slow (it takes several minutes). Table "a" has more than 10,000 rows and table "b" 700 rows. So, how can I improve the perfomance?
I've tried with spatial index but I haven't had better results.


texts: Seeking ArcGIS *.tpk maps to buy / download?

texts:
I have an ArcGIS for WPF application capable of displaying both online (ESRI map server) and local (*.tpk files) basemaps.  I currently have a need to be able to load a basemap of China on a machine that has no internet / network connection.

My initial thought was to find / purchase / generate a tpk file (or similar) that can be copied onto the drive of the machine in question, but I am having trouble finding such a thing.

Are basemaps available as tiled packages that can be accessed in such a manner?

I am aware that they can be rather large.


texts: Show html page(from different file) inside a leafleat marker

texts:
I am developing a web application and I would like to be able to show a full web page inside an L.marker popup window with fixed size... Until now I figured out how to run some php or html in the popup.
code:

var k= new L.marker( [markers[0].lat, markers[0].lng], {icon: myIcon} )
    .bindPopup( '' + markers[0].name + '' )
    .addTo( map );
    k.setPopupContent('<?php $user=$userRow['username']; echo $user; ?>');

This one obviously shows the username in the popup window. The thing is, that if would like to write my html or php in a separate file and include it with php, or even write my code straight inside the setPopupContent function, I would have to write all of my code in a straight line. So is there any other thoughts on how to do this so that I wont have to write my pages in a single line?


texts: Forcing long layer names to multiple lines based on specified legend width in ArcGIS Desktop?

texts:
Do to various limitations I almost always create static (graphic) legends but I do have the occasional map where impeccable cartography is secondary to functionality hence a dynamic legend is acceptable.

I am Currently working on a map where I want the legend to be 4" wide with one legend column.  I need to show very long layer names in the legend but I don't know how to force labels to roll to multiple lines dynamically.


texts: Applying processing extent in zonal statistics

texts:
I am using Zonal Statistics to calculate statistics of a raster (input value raster) within land cover types which is specified by another raster (input raster). Both the Input raster and Input value raster are global and the Zonal Statistics (as table) works fine in global scale. However, when I specify processing extent (so that I can do the calculation by regions) using latitude/longitude, The resulting table is empty. I used different lat/lon but still get empty table.

Could you help?


texts: Why can't I save styles (categorized, graduated) within a SpatiaLite layer in QGIS 2.16?

texts:
I can't save graduated styles in a polygon sqlite layer in qgis 2.16.0 and 2.16.1. A friend of mine with 2.6.1 has the same problem.

when I change the styles to categorized or graduated and I want to save that style to my spatialite DB I get an error message: "Error looking for style. The query was logged." To prove the error: When I try to add the spatialite-layer to a new project, the graduated style is gone.

However, qgis can save simple styles in the sqlite, this works for me. But this is not what I want...

How can I fix it? I really liked the feature of saving layer styles easily into the sqlite database...


texts: Using st_geometry functions inside query statements in ADO.net?

texts:
I have ArcSDE 10 and Oracle 11g installed on my Windows server 2003. And i am trying to query tables having st_geoemtry columns.and i have got the results when i am querying from SQL Developer, and queries are working fine. But when i am trying to access and filling into DataSet in c# using ADO.NET it is throwing exception like "Un supported data format" for st_geometry column.

Actually my main objective is querying oracle (ArcSDE) using C#. If anybody have any idea over this please share with me or at least some suggestions.


texts: same RMS error for different resolution data

texts: if i rectify a low resolution data and high resolution data and both have same RMS error =1 then what would be rectify more accurately? means for which resolution this error is more acceptable comparatively to other ?


texts: How to downgrade from ubuntugis-unstable to ubuntugis-stable

texts:
I have some problems with gdal and I would like to downgrade all of my ubuntugis related libraries on Ubuntu 16.04 again to the stable libraries.

How can I do that?


texts: Van Der Grinten projection repeating past 180 degrees

texts:
I have a ArcGIS map with this projection, but I want to project past 180 degress
so that the data is repeating, like here:

How can I do that? I'm using ArcGIS 10.2.
I'm welcome to try new software if that's not possible with ArcMap.


texts: How to change the colour of a Feature on a FeatureLayer using ArcGIS Android 10.2.6 API

texts:
I have a featurelayer generated from offline shapefile read from SD Card, with shapes representing houses. Android version is 4.2, API is ArcGIS Android 10.2.6.

The user would select a shape/feature and complete the audit. After the audit is complete I would like to change the colour of the feature to indicate which premises have been audited. I can get the selected feature ID from the feature layer but cannot find a way to change the colour of the feature.

Here is the code for the FeatureLayer:

    ShapefileFeatureTable shapefileFeatureTable =
            new ShapefileFeatureTable(myShapeFilePath.toString());
    FeatureLayer featureLayer = new FeatureLayer(shapefileFeatureTable);


texts:
I apparently have a problem with getting meaningful scalebar values referred to a shapefile in QGIS. I think I tried all solutions suggested in other discussions, but still I don't get it. I use QGIS 1.8.0 Lisboa.
The shapefile was downloaded from a reliable source (DIVA-GIS.org), it is a typical
administrative areas polygon.

In case anyone wants to try it, here it is:

http://gadm.org/data/shp/CHN_adm.zip

When it was downloaded it came set with WGS84.
I set the Project settings to: on the fly projection enabled, Project CRS WGS84/UTM ZONE 33N.

I set the layer CRS to WGS84/UTM ZONE 33N.

Then I "zoomed to layer" extent and added the scalebar: it reads 10 meters. Whole China
seems to span east to west about 60 meters.

I also tried to "save as" the shapefile with WGS84/UTM ZONE 33N, got a new shapefile and the new shapefile behaves just the same.

There must be a mistake I am doing, but I can't find what.

I would really appreciate any help...
Thank you!


texts: Django demands to set default. ValueError: String input unrecognized as WKT EWKT, and HEXEWKB

texts:
when I try to makemigrate models with Geometry fields to postgres DB
I face with next message:

You are trying to change the nullable field 'geom' on allotment to non-nullable without a default; we can't do that (the database needs something to populate existing rows).

OK, set default = ' ', or something  like 'MULTIPOLIGON (((0. 0. 0. 0. 0.)))' and when I wish to migrate terminal throws this:

    ..File "/home/user/MyProjects/forest-venv/lib/python3.5/site-packages/django/contrib/gis/geos/geometry.py", line 697, in __init__
    raise ValueError('String input unrecognized as WKT EWKT, and HEXEWKB.')
ValueError: String input unrecognized as WKT EWKT, and HEXEWKB.

An examples of my classes with geometry:

class ForestryKeys(models.Model):

id = models.IntegerField(primary_key=True)
name = models.TextField(blank=True, null=True),
geom = models.MultiPolygonField(verbose_name='geo',srid = 4326)

class Meta:
    managed = True
    verbose_name = 'geo'
    verbose_name_plural =  'geos'

class DistrForestKeys(models.Model):

id = models.IntegerField(primary_key=True)
df_names = models.TextField(blank=True, null=True)
geom = models.MultiPolygonField(verbose_name='polygs',srid = 4326)
forestry_id = models.ForeignKey(ForestryKeys, models.DO_NOTHING, blank=True, null=True)

class Meta:
    managed = True
    verbose_name = 'ULV'
    verbose_name_plural =  'ULVs'

etc.

Why I have to set default value? and how it do correct for diffrient geometry types?


texts:
I'm using land use data, and report the proportion of each sub-catchment that is used for “Grazing Modified Pastures” and “Irrigated Modified Pastures”.

I'm essentially focused on these two layers, I need to know how much of catchment area falls within Grazing Modified Pastures and Irrigated Modified Pastures.

What is the best way to process this in ArcMap 10?


texts: Converting Atn function of VB Script for Python parser of ArcGIS Field Calculator?

texts:
I would like to convert the Atn function (which returns the arctangent of a number) of VB Script to Python but I cannot find exactly the same function. Any help?

I want to convert the slope of percent to slope of degree but I cannot use the Slope tool of ArcGIS (slope to degree) as the slope has been already calculated in another tool.

So I have found this conversion (https://msdn.microsoft.com/en-us/library/system.math.atan.aspx) and convert it to VB Script (in field calculator) using the following code:

Atn ( [Avg_Slope]/100  )*(180/3.14159265358979)


texts: How do I select all polygons in a layer that border 2+ polygons in the same layer?

texts: My data consists of equal-sized polygons. I need to identify and select all the polygons that border two or more polygons.


texts:
I am, trying to export GeoJSON from postgis. I am using the following code which is working local machine but when I am trying to use this in a server the following error is occuring

CODE:

  ogr2ogr -progress -f GeoJSON landuse_gen0.geojson -t_srs EPSG:4326
  "PG:host=localhost port=5432 dbname=database user=usernbame
  password=Password"  -sql "SELECT way, way_area AS area,
  COALESCE(landuse, leisure, 'natural', highway, amenity, tourism) AS
  type  FROM planet_osm_polygon  WHERE way_area > 100000  ORDER BY
  way_area DESC"

ERROR:

FAILURE:
Unable to open datasource `PG:host=localhost port=5432 dbname=database user=usernbame password=Password' with the following drivers.
  -> `PCIDSK'
  -> `PDF'
  -> `ESRI Shapefile'
  -> `MapInfo File'
  -> `UK .NTF'
  -> `OGR_SDTS'
  -> `S57'
  -> `DGN'
  -> `OGR_VRT'
  -> `REC'
  -> `Memory'
  -> `BNA'
  -> `CSV'
  -> `GML'
  -> `GPX'
  -> `KML'
  -> `GeoJSON'
  -> `ESRIJSON'
  -> `TopoJSON'
  -> `OGR_GMT'
  -> `WAsP'
  -> `OpenFileGDB'
  -> `XPlane'
  -> `DXF'
  -> `CAD'
  -> `Geoconcept'
  -> `GeoRSS'
  -> `GPSTrackMaker'
  -> `PGDUMP'
  -> `GPSBabel'
  -> `SUA'
  -> `OpenAir'
  -> `OGR_PDS'
  -> `HTF'
  -> `AeronavFAA'
  -> `EDIGEO'
  -> `SVG'
  -> `Idrisi'
  -> `ARCGEN'
  -> `SEGUKOOA'
  -> `SEGY'
  -> `ODS'
  -> `XLSX'
  -> `SXF'
  -> `Selafin'
  -> `JML'
  -> `VDV'
  -> `MVT'
  -> `TIGER'
  -> `AVCBin'
  -> `AVCE00'


texts: Getting error while executing grass algorithms from PyQGIS

texts:
I am trying to run r.water.outlet by PyQGIS but getting grass folder not configured error

I have QGIS 2.18 installed and Grass is not installed on windows 10 and I am able to use r.water.outlet from Processing>Toolbox>r.water.outlet but getting error for using it by PyQGIS below code

from qgis.core import *
from PyQt4.QtGui import *
import processing
registry = QgsMapLayerRegistry.instance()

watershedLayer =registry.mapLayersByName('Gondala_AET-PET')[0]

xmin =  watershedLayer.extent().xMinimum()
xmax = watershedLayer.extent().xMaximum()
ymin = watershedLayer.extent().yMinimum()
ymax = watershedLayer.extent().yMaximum()

processing.runalg('grass:r.water.outlet',  'Drainage direction' , 695991.202933 , 2180877.920948 ,"%f,%f,%f,%f"% (xmin, xmax, ymin, ymax),
    0.0,'b') # 'Drainage direction' is layer name in layer panel

Below is window pop up after running this script.


texts: Publishing multiple CSVS as uniquely names feature services

texts:
I'm supposed to publish each file as a uniquely names feature service, but despite my approach I keep having issues where my csv files aren't found... a friend advised me to add my initials to each CSV because sometimes arcgis doesn't like when the names aren't unique enough, but I keep getting the same errors. any ideas?

from arcgis.gis import GIS
import os
import pandas as pd
from arcgis.gis import GIS
from arcgis.features.analysis import *
from arcgis.features import FeatureLayer

gis = GIS("http://slustl.maps.arcgis.com/home", "SLysy_SLUSTL")

data_dir = r"C:\Users\Stephanie\NOTEBOOKS\FINAL\FSI"
file_list = os.listdir(data_dir)

csv_file_list = [x for x in file_list if x.endswith(".csv")]
print("Number of .csv files found: " + str(len(csv_file_list)))

for csv in csv_file_list:
    item = gis.content.add({}, data_dir + csv)   # .sd file is uploaded and a .sd file item is created
    published_item = item.publish()

Error

RuntimeError: File(C:\Users\Stephanie\NOTEBOOKS\FINAL\FSIFSI-2006sl.csv) not found.

Print output

['FSI-2006sl.csv',
 'FSI-2007sl.csv',
 'FSI-2008sl.csv',
 'FSI-2009sl.csv',
 'FSI-2010sl.csv',
 'FSI-2011sl.csv',
 'FSI-2012sl.csv',
 'FSI-2013sl.csv',
 'FSI-2014sl.csv',
 'FSI-2015sl.csv',
 'FSI-2016sl.csv',
 'FSI-2017sl.csv',
 'FSI-2018sl.csv']


texts: What kind of tuning can be done on your own cartodb instance to speed things up (outside of sql query optimization and indices)? Is there any documentation on this? If the records do not change, could that make a difference?


texts: Datum transformation in QGIS Server 3.10

texts: I have a QGIS project that uses data stored in Web Mercator (epsg:3857) spatial reference system. The project itself has epsg:5514. To have a better precision I use one of datum transformations that are available for this srs. This datum transformation is set on project level.  On the QGIS Destkop works everything perfectly but when I use the same project in QGIS Server, the data are several meters shifted. It seems that QGIS Server does not work with datum transformation that are specified in project file.


texts: After hiding a field, Table to Excel gives RuntimeError Cannot find field ''

texts:
I'm trying to export a Table View to Excel (using arcpy). It works well if the Table View doesn't have hidden fields. As soon as I hide the OBJECTID when creating the View, I get a runtime error (Cannot find field '').

When I try to do the same in the ModelBuilder, it works. Any idea why the Python script fails to execute?

arcpy.MakeTableView_management(TEMP_Consumption, TEMP_Consumption_View, "", "", "OBJECTID OBJECTID HIDDEN NONE;Customer_Name Customer_Name VISIBLE NONE")
arcpy.TableToExcel_conversion(TEMP_Consumption_View, ExportFile, "ALIAS", "CODE")

The full error message:

Traceback (most recent call last):
File "C:\Users\Daniel\Desktop\exportconsumptions1.py", line 84, in <module>
arcpy.TableToExcel_conversion(TEMP_Consumption_View, ExportFile, "ALIAS", "CODE")
File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\conversion.py", line 81, in TableToExcel
raise e
ExecuteError:
Traceback (most recent call last):
File "c:\program files (x86)\arcgis\desktop10.3\ArcToolbox\Scripts\TableToExcel.py", line 222, in <module>
arcpy.GetParameter(3))
File "c:\program files (x86)\arcgis\desktop10.3\ArcToolbox\Scripts\TableToExcel.py", line 192, in table_to_excel
for row in cursor:
RuntimeError: Cannot find field ''

Failed to execute (TableToExcel).


texts: Store Database Connection String in App.config for an ArcGIS Pro SDK Add-In 2.x

texts:
I have added an app.config file to my visual studio pro SDK project and I’m trying to retrieve a connection string from it. The retrieval code always returns null. I don’t know if that’s because it is a UserControl or running inside ArcGIS Pro or what. Any thoughts? Is there a better place to store the connection string?

Visual Studio 2017, .Net Framework 4.6.1, ArcGIS Pro SDK 2.1, SQL Server

app.config

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <connectionStrings>
        <add name="my_conn" connectionString="Data Source=xx.xx.xx.xxx;Initial Catalog=some_db;User ID=xxx;Password=yyy" />
    </connectionStrings>
</configuration>

c# code

// Assume failure.
string returnValue = null;

// Look for the name in the connectionStrings section.
ConnectionStringSettings settings = ConfigurationManager.ConnectionStrings["my_conn"];

// If found, return the connection string.
if (settings != null)
    returnValue = settings.ConnectionString;


texts: FME does not create map after xlsx conversion to shapefile

texts:
I am running FME 2018 in Windows 10, and trying to convert an xlsx file to an Esri shapefile as discussed in this FME 2016 tutorial:

The result should be a map of Vancouver, but the Inspect dialog box only shows the points...  The OpenStreetMap layer in the Display Control window in the tutorial does not appear in my Display Control Window.


texts: Convert worldfile for jpg to worldfile for png

texts:
I am using 3 band jpeg files with 1 band png masks for image analysis. The names match except for extension, and I am merging the jpgs using gdalbuildvrt, then gdal_translate to generate a geotiff. I would like to merge the pngs in the same manner (reusing my existing scripts if possible), but my mask generator does not create a worldfile.

Example files:

tileset_nn_0_0.jpg
tileset_nn_0_0.jpg.aux.xml
tileset_nn_0_0.png
tileset_nn_1_0.jpg
tileset_nn_1_0.jpg.aux.xml
tileset_nn_1_0.png
tileset_nn_2_0.jpg
...

The worldfile I have for the jpgs is a PAM/GDAL dataset, and looking inside the files, they won't work by just renaming because they include attributes regarding JPEG compression, bands, etc that don't exist in the pngs.

I have thought of using gdal_translate to convert each jpg image to a grayscale png in a temp directory, then delete the png and copy the worldfile out, but I will be doing this repeatedly for several datasets, so I would prefer a cleaner solution.


texts: How to split a raster into x tiles that overlapped by x km?

texts:
I have a raster that I split into three tiles by using the function Split raster in ArcMap as follows:

How can I split my raster into three tiles that overlap by 2 km as follows : ?


texts: Getting TIN Statistics in ArcGIS Pro with 3D Analyst

texts:
I'm trying to get basic descriptive statistics from a TIN layer (MIN, MAX, MEAN, STD) to compare it to IDW interpolation data of the same study area, but can't seem to figure out how to retrieve descriptive statistics from a TIN dataset.

I have access to a 3D Analyst license.


texts: Openlayers - Losing selection or style on layer redraw

texts:
When I zoom or move the map my layer is redrawn. This is what I want, because I have allot of features to load at once. This is the code:

    wfs = new OpenLayers.Layer.Vector("WFS", {
    strategies: [new OpenLayers.Strategy.BBOX({
                    resFactor: 1,
                    ratio:1
                })],
    protocol: new OpenLayers.Protocol.WFS({
              maxFeatures:1000,
              url:  myUrl,
              featureType: myFeatureType,
              featureNS: myFeaturedNS,
              version: "1.1.0"
              }),
      filter: setFilter(year, variant)
});

The following code is my selectioncode. This all works as I wan't it to. However, when the layer is redrawn the selection is lost and the onFeatureUnselect is not fired (which it should). I'm not sure if the selection is really lost or that the style is resetted.

    selectCtrl = new OpenLayers.Control.SelectFeature(
        wfs,
        {
            clickout: true, toggle: false,
            multiple: false, hover: false,
            box: true,
            toggleKey: "shiftKey", // ctrl key removes from selection
            multipleKey: "shiftKey",
            eventListeners: {
                featurehighlighted: onFeatureSelect,
                featureunhighlighted: onFeatureUnselect

            }
        }
    );

@geographika

My onFeatureSelect and onFeatureUnselect functions:

function onFeatureSelect(e) {
var feature = e.feature.attributes;
var featureclone = e.feature.clone();

var style = {
    pointRadius: 10,
    fillOpacity:0,
    strokeColor: "#000000"
    };

featureclone.style = style;

layer2.addFeatures([featureclone]);
selectedFeatures[featureclone.attributes.receptor_id] = featureclone;
}

function onFeatureUnselect(e) {
    var feature = e.feature.attributes;
    layer2.removeFeatures(selectedFeatures[feature.receptor_id]);
    delete selectedFeatures[feature.receptor_id];
}


texts: Inserting new field with first three characters from the shapefile name using ArcPy?

texts: Is there any Python script which will add a field to shapefile which will be corresponding to first three characters from the shapefile name?


texts: Python GDAL resampling incorrectly: masking actual data points

texts:
I am trying to resample GeoTIFF image from 460 m resolution to 500 m using the Python gdal library. But somehow GDAL is not resampling correctly. It is also resampling noData values, so resulting images has noData where it should have some data. I have noData values in range of 249 to 255. So, I thought that might be the problem. So, I had assigned all the noData to NaN using np.nan, but I am still having same problem.
I have used gdal.Translate() as well as gdal.Warp(), but getting same results on both functions.
import os
import gdal
import pandas as pd
import numpy as np
from pandas import DataFrame as df

maskedObj = gdal.Open('maskedLai.tif')

px = 0.004491576420597608
py = -0.004491576420597608

GDAL Translate function
gdal.Translate('resampled.tif',maskedObj, format='GTiff', outputType=gdal.GDT_Float32, xRes=px, yRes=py, noData=np.nan, resampleAlg='bilinear')

GDAL Warp function
gdal.Warp('resampled.tif', maskedObj, format='GTiff', outputType=gdal.GDT_Float32, xRes=px, yRes=py, resampleAlg='bilinear', srcNodata=np.nan, dstNodata=np.nan)

Here's the maskedLai.tif array before resampling
maskedArr = maskedObj.ReadAsArray()
df(maskedArr)

Here's the resampled.tif array after resampling
resObj = gdal.Open('resampled.tif')
resArr = resObj.ReadAsArray()
df(resArr)

Here's the visualization of both images.
Before Resampling

After Resampling

As you can see it has masked the part below San Diego with NaN. I am having trouble understanding why GDAL is doing this (irrespective of resampling algorithm). Am I doing something wrong here?


texts: What is the meaning of z_order in OSM/pgsql datamodel?

texts: Site http://wiki.openstreetmap.org/wiki/Osm2pgsql/schema describe OSM/pgsql database schema. But I don't understand the meaning of z_order in this model.


texts: Overlapping features in index layer of Map Series in ArcGIS Pro show even when not currently selected

texts:
I am using the Map Series tool in ArcGIS Pro to create about 30 maps using "Florida BMAPs" as the index layer. Some of the features in this layer overlap. I assumed this wouldn't be an issue, because the Map Series tool would only display the selected index layer feature per map layout. However, what is actually happening is anywhere that adjacent BMAP boundaries coincide with the current selected BMAP feature, they are also being displayed. It is hard to ignore this error, since the line width for the unwanted features is even bolder than the correct boundary.
Is there any way I can fix this so that only the desired BMAP boundary is being selected & displayed?
In the image below, you can see the desired BMAP boundary is a thin black line in a oval shape surrounding the other polygons. I've circled the undesired lines (resulting from other overlapping BMAP boundaries) in RED.


texts: Seasonal changes in habitat use from radio tracking data - how to analyse?

texts:
I've been given some data to analyse on deer movements. I have data for the movements of 10 deer over a year period. There are 35 GPS locations per dear for each season (4 seasons).

I would like to look at whether habitat use of the deer changed between seasons but I'm unsure how to do this. I initially thought I could conduct Kernel Density Estimates for each season and then look at the proportions of total observations in each habitat type but I'm unsure if this is correct? I also don't know how to quantify the number of observations in each habitat type (although I imagine this shouldn't be too hard to do). Also, I am looking at this at a population level as it would take a long time to do every individual for all 4 seasons

Anyone have any advice on the best way to look at seasonal changes in habitat use?


texts: How to calculate x/y in a different coordinate system in QGIS 2.4?

texts: I'm trying to calculate Northing Easting in QGIS.  I can get it to calculate my lat/long using $y and $x in the field calculator.  I changed coordinate systems to what I want it displayed at, but it's still calcing the lat/long


texts: CSV points not showing up when importing them in QGIS

texts:
I know this question has been asked before in one form or another, but those answers didn't solve my issue.

I'm using QGIS 2.14.0 and trying to upload lat/lon coordinates from a csv file. When I drag the file into the QGIS window it loads up the attribute table perfectly, but will not show any of my points. When I try to upload the csv file manually (layer->add delimited text layer etc) and check off the correct stuff (csv, first record has field names, point coordinates) it says there's no data in the file while simultaneously combining different cells together; for example, it keeps xlat as a heading, but then combines my ylon with the location name for the first point. So like I said, dragging and dropping it into QGIS loads up the data correctly on the attribute table, but still won't show my points. I'm completely at a loss.

An important note: when I load the csv file into ArcGIS, the points come up perfectly,  but for the purposes I need these points for, I need to use QGIS and its plugins.

This is a sample within the csv file:

location xlat ylon
2ndary sc -3.9115 35.78992
nd water -3.91238 35.78988
lily pond -3.91587 35.78909
old pump -3.91706 35.7888
drk pump -3.91691 35.78885
fatuma s -3.90755 35.81442
kaku shop-3.90756 35.81433
parts shop-3.90743 35.81444
aquilina h -3.90785 35.81469
diana hou-3.90909 35.81462
traffic sur -3.90654 35.81398
goat wo -3.90938 35.81441
lucian ho -3.91062 35.81454
lucas hou -3.87172 35.82846


texts:
I'd like to aggregate a raster from 1m to 6m in ArcGIS with a custom rule.

For example, each cell value of aggregated raster = mean value of 5 highest cell values from 36 aggregated values.

How do I do that?


texts: Steps for creating an online webmap with editable features using ArcGIS Server/SDE and SQL Server?

texts:
EDIT/UPDATE: I'm adding a bounty to this in hopes of obtaining a step-by-step guide to creating an online map with feature editing using the ArcGIS Flex API, SQL Server Express and ArcGIS Server 10.1. I've run into so many issues (database authentication with Express, errors enabling feature editing) that I think my best bet is to start over and go through each step. A moderately detailed guide would be very much appreciated.

I'm primarily a desktop GIS programmer and need to develop a web application in which features can be edited by multiple users. I'm looking for a brief summary of the full steps I would need to carry this process out if I were starting from scratch.

Software: ArcGIS Flex API and SQL Server Express with ArcGIS Server 10.1.

The steps as I understand them so far:

1) Install ArcGIS Server on our server (actually a virtual machine on an existing server)

2) Install the ArcGIS Web Adapter

3) Install ArcSDE on the same server

4) Install SQL Server Express on the same server

This is where I need some clarification. As I understand it I need to create a new geodatabase to store the features I wish to display/edit. I also understand I need to create a Feature Service and Geometry Service. Finally I will need to host the developed application using a web server.

I'm essentially looking for a walk-through for this process as I have never carried it out before. Any information/resources would be much appreciated.


texts: Is there any way to create elevation mesh plot in ArcMap 10.1

texts:
I am using ArcMap 10.1.  I have data with elevation value. Now I want to create mesh plot (as created in Golden Software Surfer).

How to do this?


texts: How to read Autodesk Spatial Data File (.SDF) in PHP

texts:
I am working on an application using Autodesk MapGuide. The application is being developed on PHP and hosted in IIS 7.5.

I had to create point, line and polygon geometries on-the-fly. I found a working code sample and customized it for my logic. The sample writes the geometry in an SDF (Autodesk Spatial Data File) file. The code writes only three fields - ID, Text and Geometry. The ID field is "AutoIncrement"

Now, I have to store the remaining data about the feature drawn on map (and stored in SDF) into a table in MySQL. For that, I have to fetch the ID of the last entry into the SDF file, which is not exposed at any point. Also, I have to select a row in MySQL table based on the feature I select on map/drawing (whose geometry is stored in SDF file) for updates. For that also, I have to again read/query the SDF.

How can I achieve that using PHP?

Thanks


texts: How can I create a 16bit PNG heightmap in QGIS?

texts:
I am new to QGIS or any GIS software. I have been using a totalstation to measure a hillside and I am trying to convert the point cloud to a 16bit png heightmap that I can use in Unreal Engine 4.

I have tried using interpolation and print composer in QGIS but the landscape in UE4 looks blocky, like minecraft.

What am I doing wrong?


texts: Seeking simple GIS for Estate inventory and mapping?

texts:
I think my GIS needs would be considered simple for the 3500 acre estate I manage:

create maps of our roads, trails, fields, and buildings, and show distances on the roads and trails;
calculate areas in SF or acres for tasks such as fertilizing fields or forestry projects.

It would be nice if I could produce a database of the results so I can automatically calculate the miles of certain road types we have, water resources, or the acres of various areas to be fertilized or timbered. I want to use layers of satellite photos or topo maps (which I can geo-locate), my drawing layers, and import Garmin data also.

I guess that can be done with a pretty simple system.

I use fGIS (Forestry GIS) which was free but buggy, with no hope of being fixed now that they stopped updating the free version. It was relatively easy to learn, but extensive editing of polygon areas leaves visual anomalies, and the database does not update reliably when editing areas.

What's out there that can do my simple tasks (reliably) without having to learn a lot of complex things I'll never use. I'll pay for a simple program (up to $200?) if that's what it takes to get reliability.


texts: Copying features from one class to another using QGIS modeler?

texts:
How do I copy some features from one class to another in QGIS modeller?

In ArcGIS it was just "Copy features", but I cannot find it in QGIS.


texts: pgRouting assign source and target value to streets based on available nodes

texts:
I am a beginner in pgrouting. I have two tables in my postgres database. A street table, where each segment (see red line) carries an Id (ogc_fid). Additionally I have a nodes table (see brown points below). Each point also carries a unique Id (ogc_fid). The nodes below do not intersect at overpasses and underpasses.

Based on the nodes table I want to find the shortest path. However, first I have to assign the nodes ID as source and target node to my street table. And split the streets based on the nodes. (so that each segment is connected to a source and target node from the nodes table)

However, when I use following example from the tutorial pgrouting create topology

SELECT pgr_createTopology('streets',0.001,'geom','ogc_fid','source','target');

The results are worse, because it doesn’t node the graph correctly (see below) and additionally it nodes overpasses and underpasses. This is why I want to use my nodes table instead of the automatically generated verticesstreets_verticec_pgr

My question: Is there a way to assign the ogc_fid from the nodes table as source and target value to my streets table based on the digitized direction? Does anyone have useful links related to this issue?


texts: How to convert points into line without changing the attributes?

texts:
I have several points and its attributes.

I want to classify them into some class, but I want to classify it in line shape. When I convert it into line, the attributes turn out to be one (one row only) while there were so many attributes from the points.

How do I convert those points without making the attributes into one attribute? Can anyone help me?


texts:
I'm configuring a GIS Portal with GeoNode 2.6.x running on Windows 7 but I'm now confusing with an error. When I try to logout the admin account, the error is shown and I don't know what's wrong:

KeyError at /account/logout/
'LOGOUT_ENDPOINT'
Request Method: POST
Request URL:    http://localhost/account/logout/
Django Version: 1.8.17
Exception Type: KeyError
Exception Value: 'LOGOUT_ENDPOINT'
Exception Location: C:\GeoNode-2.6.x\geonode-2.6.x\geonode\base\models.py in do_logout, line 1026
Python Executable:  C:\GeoNode-2.6.x\Apache2\bin\Apache.exe
Python Version: 2.7.8
Python Path:
['C:\\GeoNode-2.6.x\\geonode-2.6.x\\geonode\\Lib\\site-packages',
 'C:\\windows\\system32\\python27.zip',
 'C:\\GeoNode-2.6.x\\geonode-2.6.x\\DLLs',
 'C:\\GeoNode-2.6.x\\geonode-2.6.x\\lib',
 'C:\\GeoNode-2.6.x\\geonode-2.6.x\\lib\\plat-win',
 'C:\\GeoNode-2.6.x\\geonode-2.6.x\\lib\\lib-tk',
 'C:\\GeoNode-2.6.x\\Apache2\\bin',
 'C:\\GeoNode-2.6.x\\Python27\\Lib',
 'C:\\GeoNode-2.6.x\\Python27\\DLLs',
 'C:\\GeoNode-2.6.x\\Python27\\Lib\\lib-tk',
 'C:\\GeoNode-2.6.x\\geonode-2.6.x',
 'C:\\GeoNode-2.6.x\\geonode-2.6.x\\lib\\site-packages',
 'C:\\GeoNode-2.6.x\\Apache2']

Traceback:
File "C:\GeoNode-2.6.x\geonode-2.6.x\lib\site-packages\django\core\handlers\base.py" in get_response
  132.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "C:\GeoNode-2.6.x\geonode-2.6.x\lib\site-packages\django\views\generic\base.py" in view
  71.             return self.dispatch(request, *args, **kwargs)
File "C:\GeoNode-2.6.x\geonode-2.6.x\lib\site-packages\django\views\generic\base.py" in dispatch
  89.         return handler(request, *args, **kwargs)
File "C:\GeoNode-2.6.x\geonode-2.6.x\lib\site-packages\account\views.py" in post
  375.             auth.logout(self.request)
File "C:\GeoNode-2.6.x\geonode-2.6.x\lib\site-packages\django\contrib\auth\__init__.py" in logout
  130.     user_logged_out.send(sender=user.__class__, request=request, user=user)
File "C:\GeoNode-2.6.x\geonode-2.6.x\lib\site-packages\django\dispatch\dispatcher.py" in send
  189.             response = receiver(signal=self, sender=sender, **named)
File "C:\GeoNode-2.6.x\geonode-2.6.x\geonode\base\models.py" in do_logout
  1026.                                             settings.OGC_SERVER['default']['LOGOUT_ENDPOINT'],

I checked several sites with different solutions and those didn't fix with my problem. I also found that the authentication set on GeoServer OAuth2 has some problems and I'm not sure whether it is related (cannot authorize user and get Error: invalid_request Missing client_id parameter. error from http://localhost/o/authorize/). The token endpoint checking also returns {"error": "invalid_request"}.

How can I solve this...??


texts: Cloning or duplicating feature within feature class using ArcMap

texts:
Is there a way to copy selected features, then paste them into the same feature class (and then edit some attributes)?

e.g. If I have a land parcel that has more than one owner, how can I create multiple instances of that feature without having to import or load it for each owner?  I just want to copy and paste it then edit the 'Owner' field.


texts: Extract geographic subregion from grib2 file

texts:
I'd like to extract a sub-region from a grib2 data file (GFS data from NOAA), writing the results into a separage grib2 file.  I'd prefer it if I could use a lat/lon bounding box (the GFS data is on a regular lat/lon grid) but can deal with converting the latitudes/longitudes to grid coordinates.

I've tried some things wgrib2 but am running into configuration problems.  None of the documented tricks directly address this.  Before I go further down that route, which will probably require compiling from source, I'd like to confirm that (a) wgrib2 can actually do what I want and (b) fully understand the syntax for doing so. What looks like the relevant option for wgrib2, -small_grib, is marked as "beta", and it's not clear if "small grib" is just a term used in the help messages or if it is different from a "regular" grib file all together.

Alternately, if there are other tools/approaches for achieving the same ends, I'd like to know about them.


texts: Adding a field to attribute table and populating using a list

texts:
I have four folders, each with 50 sub folders.  Within each sub folder I have 80 shapefiles.  For the first shapefile within each sub folder I want to add a field and populate that field with the name of the sub folder.

I am attempting to do this like so:

import arcpy
import os

folders=r'F:\Sheyenne\grazing_final\pressure_per_pixel_by_allotment\allotment_points' #path to four folders
for folder in os.listdir(folders):

    for sub in os.listdir(os.path.join(folders,folder)): #path to sub folders

        arcpy.env.workspace=os.path.join(folders,folder,sub)  #set environment
        shapefiles=[os.path.join(arcpy.env.workspace, i) for i in arcpy.ListFeatureClasses('*.shp')]
        shapefiles=shapefiles[0] #return only the first shapefile from each sub folder

        arcpy.AddField_management(shapefiles, "Allotment", "SHORT", "5") #add new field to each shapefile

        with arcpy.da.UpdateCursor(shapefiles, 'Allotment') as cursor: #populate each field with the string contained in sub
        for row in cursor:
            row.setValue(sub)
            cursor.updateRow(row)
        del row

but this returns:

 File "F:/python codes/prelim_codes/grazing_regression.py", line 78, in <module>
    row.setValue(allotment)

AttributeError: 'list' object has no attribute 'setValue'


texts: Label display at different zoom level of single shapefile?

texts:
I have a layer name "road.shp". In 'road type' attribute field  I have 'national highway', 'state highway' and 'other roads'.
Using rule based I defined different symbols and scale visibility for each road type successfully.
Now I want 'road name' field to visible using label. It is simple.
Problem is, I want lable have to be display at the same level as the above layers visible.
In detail suppose National highway is visible at 1:500000 scale at that time only road names label for National highway to be visible. As we zoom to 1:250000; State highway layer is visible and those state highway names labels to be display instead of all labels.
Is there any way to do this?


texts: How can I relate between street and city in OSM imported data into SQL?

texts:
I've used OSM2MSSQL to fill db with 2 cities streets. Now I have the following tables in my DB :

tNode
tNodeTag
tRelation
tRelationMember
tRelationTag
tTagText
tWay
tWayCreation
tWayTag

How can I get all the streets that are in a specific city ?


texts: Cannot modify or snap to existing features in OpenLayers using the Modify/ Snap interactions in Chrome

texts:
I am having a problem in my project where the Modify and Snap interactions don't allow clicking and editing of existing features in a layer. I am using the most recent version of OpenLayers (6.4.3)
I can select features using the Select  interaction just fine. But I cannot click a polygon and start modifying it at all.
If I add a Draw interaction to the map with EditSchemeGeometrySubTool.editSource  as the source, I can draw and modify those features absolutely fine. But already existing features cannot be modified.
I have tested this is Edge and Firefox and it works fine, but in Chrome I have these issues.
Here is the relevant code. It is in TypeScript.
There is a button on the webpage that calls startEditing()  when it is clicked to enable editing.
MapWrapper is another class that holds the openlayers map object.
class EditSchemeGeometrySubTool {

    private select : Select;
    private modify: Modify;
    private editSource : VectorSource;
    private editLayer: VectorLayer;
    private snap: Snap;

    startEditing() {

      this.select = new Select({layers:[this.editLayer]})

      //The select interaction works fine.
      this.select.on("select",(e)=>{
        this.mapWrapper.map.removeInteraction(this.modify)
        this.mapWrapper.map.removeInteraction(this.snap)
        console.log(this.select.getFeatures().getLength()) // this prints "1" as expected.
        this.modify = new Modify({features:this.select.getFeatures()})
        this.mapWrapper.map.addInteraction(this.snap);
        this.mapWrapper.map.addInteraction(this.modify)

      })

      this.snap = new Snap({features:this.select.getFeatures()})

      this.mapWrapper.map.addInteraction(this.select)

      this.modify = new Modify({source:this.editSource})
      this.mapWrapper.map.addInteraction(this.modify)
      this.mapWrapper.map.addInteraction(new Snap({source:this.editSource}))
    }

    constructor(private mapWrapper:MapWrapper) {
      this.editSource = new VectorSource({
        url: 'https://raw.githubusercontent.com/openlayers/openlayers/main/examples/data/geojson/countries.geojson',
        format: new GeoJSON(),
        useSpatialIndex:false,
      });

      this.editLayer = new VectorLayer({source:this.editSource});

      this.mapWrapper.map.addLayer(this.editLayer);
    }
}


texts: ArcGIS Desktop vector symbol levels: why a maximum of 32 colors?

texts: At 10.8.1, when applying vector Layer Properties > Symbology > Quantities > Graduated colors, a maximum of 32 color levels are possible.  Why 32 and not some other number?  Is there something special or unique about 32?


texts: QGIS plugins open automatically when starting QGIS

texts:
I created a plugin using QGIS Plugin Builder Plugin using the Template Tool Button with dock widget. Works fine, but I have to click the associated button each time I start QGIS in order to open the dock widget.

Question: How can I make QGIS open the dock widget at each start, or at least remind its state like those of the core plugins (GPS Information Panel for example)?


texts:
Is there any use in setting the PNG and JPEG compression in GeoServer (Services - WMS - PNG Options/JPEG Options)?

The default is 25, but we heard rumours that having compression resulted in a time penalty for decompression on the way out, so we set it to 0. We deliver PNG8 and JPEG tiles, and these are relatively small but if we can make them smaller without significant quality or time loss then that would be great.

We just aren't sure whether sticking compression on would reduce the image sizes but result in a (significant) time penalty or not and would like to know for certain.

FYI We can't really just test it as currently we do not have a Dev GeoServer environment!

Thanks!


texts: Intersecting large shapefiles onto a grid in QGIS

texts:
I have 21 separate shapefiles containing data for Ireland as various
polygons on QGIS 3.10. I'm trying to intersect each shapefile onto a
250m² grid of Ireland so that I'll have 21 separate shapefiles in a grid
format. I'll then spatially join each dataset using the corresponding grid
"ID"s to create one shapefile containing all the data in a 250m² grid
format for Ireland.
My problem is that the intersections onto the grid are taking days to
complete. One intersection is currently on 56% after 31 hours, and the
intersected shapefile only contains 26 features and 1 column of data,
although there will be 1,000,000+ features in the 250m² grid output.
Other datasets that will also need to be intersected onto the grid are
much larger (4,000,000+ features) as they were converted from rasters.
I have enabled "Render layers in parallel using many CPU cores" and
have created spatial indexes for the two layers and don't know how
else to speed up the processing. I'm running QGIS 3.10 on a PC with
8GB RAM and an i5 processor. Is the lack of processing power on my PC
the only reason the intersection is taking so long, or is there
another way to increase the speed of the intersection?
I'm performing the intersections by 'Vector > Geoprocessing Tools > Intersection'. With the Input layer as my 250m grid, and the Overlay layer as the shapefile to be intersected onto the grid.


texts:
I am trying to export and save a 3D map as a pdf in QGIS 3.10 (using the composer).

I am using the native 3D viewer and I am trying to understand how I can export and save it as a pdf.

I set my 3D map in the main interface then I created the print layout (composer).

I added the "new 3D map" but the map was not displayed in the composer (white map).

Anyone can help me please?


texts: Is this satellite image of a blackout real?

texts:
Puerto Rico is currently experiencing a massive blackout.  1.5 million homes without electricity.  There is a meme circulating with the satelittes of the carribbean before and during the blackout.

However, the skeptic in me things it might be a fake.  And is there any way to re-produce this ?

The blackout is obviously real and I hope they are well.


texts:
I'm planning to write some software to improve handling of OSM Notes, so I need them in postgis database.

Following the documentation I found there is notes dump on osm.org, but I can't find if there is some software to import this file into database...

Is there other option than writing my own parser?


texts:
Can someone help me fix some code that simply writes points into a featureclass?
It used to work in the older gp. syntax, but I'm having difficulties rewriting it in ArcPy for ArcGIS 10.0. In this example it was meant to create a 100m grid of points.
desc = arcpy.Describe("Grid_Extent")
Ext1 = str(desc.Extent)
Ext2 = Ext1.split(' ')
SXMin = int (float(Ext2[0]))
SXStart = int (float(Ext2[0]))
SYMin = int (float(Ext2[1]))
SXMax = int (float(Ext2[2]))
SYMax = int (float(Ext2[3]))

XMin = SXMin
XMax = SXMax
YMin = SYMin
YMax = SYMax
print str(YMin) + "    " + str(YMax)
print str(XMin) + "    " + str(XMax)
while YMin < YMax:
  while XMin < XMax:
     cur = arcpy.InsertCursor("Grid_100")
     pnt = arcpy.Point()
     pnt.x = XMin
     pnt.y = YMin
     feat = cur.newRow()
     cur.insertRow(feat)
     XMin = XMin + 100
  XMin = SXStart
  YMin = YMin + 100
del cur


texts: fit point with raster data figure out those points belong to, and add column and row to represent it in ArcGIS 10.2.2

texts:
I have an X-Y point data file, with which has latitude and longitude.
I'd like to be fit it with the raster data, then add column and row data on the X-Y point data file.
first i created the attribute table of raster data by using spatial analyst> Int, but the attribute table does not fit my data, one record of data represents many of raster value.

and there are two pics for reference.


texts: How to Project shapefile from NAD 1983 UTM Zone 12 to WGS 1984 UTM Zone 13N?

texts:
I have a question and I have a shapefile that is in NAD UTM Zone 12 and Datum is North American Datum of 1983.

What I would liket to reprojection it to NAD 1983 UTM Zone 13N and change the Datum to WGS 84 ?

I have tried different methods but cane out the same. it seems like the Datum doesn't change, is it ?

Should it be just one step to use the project to reproject to NAD83 UTM Zone 13 ?
or is there more than just one step to get it there ?

Currently I have 9.3.1 .


texts:
I have crated an imagemosaic store in GeoServer with a default TIFF image named snow_20091001.tif it is working fine. I can see the layer from layer preview.

But the problem is, as it is a timeseries layer, I have added another image snow_20091101.tif manually to the store. This image is not showing when I am requesting with the time. But the previously added image is showing fine.

I have not configured PostGIS database as datastore.properties as I want to use shapefile index by default.

should I update the store to get the later on added image?
If so then how can I do that?


texts: Batch process aligning multiple rasters in QGIS

texts:
I would like to know if there´s a way to run a batch process that consists in aligning (changing cell size from 10 to 20 in Sentinel 2 imagery) in QGIS 3.4?

I need to resample band #8 (resolution 10m) from several images to combine them with other bands with 20m cell size, so it would be annoying to do it individually for each image.

I think this would be possible programming it with Python console, but don't know so much Python to even consider it. What are other alternatives?


texts: raster2pgsql: queries on imported raster are NULL

texts:
I loaded a tif-file of some soil data into postgres with:

raster2pgsql -c -I -F -C -r -M -s 31467 -t 200x200 soil_file.tif gis.soil_map | psql -U user -d database -h localhost -p 5432

which worked perfectly fine. The tif itself shows data when imported in QGIS and also the the imported raster from my database shows its values in QGIS.

Here my problem:
But when I want to query my raster within my database the query is always empty:

SELECT rid, (ST_SummaryStats(rast, 1)).*  from gis.soil_map

and I have absolutely no idea what could cause this. The same procedure work fine with a different raster from a different source, so I think this might have to do with the file, but as I said, no idea what to look for.