texts: Get points within maximum distance from any point in GeoPandas

texts:
Given a set of points (with meters coordinates), I am trying to create lines between them. But I don't want to create lines of each pair of points, Iwant to create thoses lines if the distance between two points is inferior or equal to a threshold value (let's say 1000m).
And from there, I am quite lost. The distance() function only returns a GeoSerie of the points with themselves, so all my values are at 0.0.
I am also facing issues with the buffer() function, not knowing how to properly use the GeoSerie result once computed.
From what I tested so far:

intersection() returns a GeoSerie with only one reference,
sjoin does not work with GeoSeries
converting the buffer GeoSerie to a GeoDataFrame results in AttributeError: No geometry data set yet (expected in column 'geometry'

Any leads about how to achieve that?


texts: Select by location QGIS and PostGIS. Exception: unknown

texts:
Are there some limitations in feature number, while making spatial query in QGIS?

All my data is in PostGIS format. When testing with a small amount of features, it works perfectly, but with 1032862 polygon features only this error message returned.

  Uncaught error while executing algorithm
              Traceback (most recent call last):
                File "C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python/plugins\processing\core\GeoAlgorithm.py", line 203, in execute
                  self.processAlgorithm(progress)
                File "C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python/plugins\processing\algs\qgis\SelectByLocation.py", line 94, in processAlgorithm
                  index = vector.spatialindex(inputLayer)
                File "C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python/plugins\processing\tools\vector.py", line 220, in spatialindex
                  idx = QgsSpatialIndex(layer.getFeatures(request))
              Exception: unknown


texts: Spatial Reference is null in ESRI Silverlight Map

texts:
I am using ESRI's Silverlight API to display a map with one dynamic layer.  Occasionally (not always),  when that layer is initialized, the SpatialReference attribute will be null.  I'm not sure why this is, since this map service has a spatial reference set to WKID 102113.

Does anyone know why the SpatialReference would be showing up as null?


texts: Clipping raster using a vector 's extent in GDAL

texts:
I am trying to take a raster (landsat_tm.img) and clip it to the spatial extent of the vector (clip.shp).  My problem is that the band 1 values are being copied for all 7 bands.

    #import modules
    import numpy, os, ogr, osr, sys
    import gdal,gdalconst
    from gdalconst import *
    gdal.UseExceptions()

    #set working directory
    os.chdir(r'Q:\Personal\Exercises')

    #set drivers
    raster_driver=gdal.GetDriverByName("HFA")
    raster_driver.Register()
    vector_driver=ogr.GetDriverByName("ESRI Shapefile")
    vector_driver.Register()

    #define data sources
    fn="landsat_tm.img"
    vector_fn='clip.shp'

    #open data source
    raster_ds= gdal.Open(fn,GA_ReadOnly)

    #check if raster exists
    if raster_ds is None:
        print "Couldn't open."
        sys.exit(1)

    #get basic image info
    bands=raster_ds.RasterCount
    cols= raster_ds.RasterXSize
    rows= raster_ds.RasterYSize

    #get basic info on image coordinate and pixel resolution
    geotransform= raster_ds.GetGeoTransform()
    originX= geotransform[0]
    originY= geotransform[3]
    pixelWidth= geotransform[1]
    pixelHeight= geotransform[5]

    #open vector data source and read in extent
    vector_ds= ogr.Open(vector_fn)
    vector_layer = vector_ds.GetLayer()
    x_min, x_max, y_min, y_max = vector_layer.GetExtent()

    # Get vector x and y resolution info
    x_res = abs(int((x_max - x_min) / pixelWidth))
    y_res = abs(int((y_max - y_min) / pixelHeight))

    #get x and y offset
    xOffset=int((x_min - originX)/pixelWidth)
    yOffset=int((y_max- originY)/pixelHeight)

    #access bands in data source
    band= raster_ds.GetRasterBand(1)

    #transform image to array
    image_array=band.ReadAsArray(xOffset,yOffset,x_res,y_res)

    #create subset image
    subset=raster_driver.Create("subset.img", x_res, y_res, 7, GDT_Float32)

    #add data to blank subset image
    index = 0
    for i in range (bands):
        index = index + 1
        outband= subset.GetRasterBand (i + 1)
        outband.WriteArray(image_array, 0, 0)
        outband.FlushCache()
        outband.SetNoDataValue(-999)
        stats=outband.GetStatistics(0,1)

    #set geotransform
    transformation=[x_min, geotransform[1], geotransform[2], y_min,geotransform[4], geotransform[5]]
    subset.SetGeoTransform(transformation)

    #set projection
    subset.SetProjection(raster_ds.GetProjection())
    gdal.SetConfigOption("HFA_USE_RRD", "YES")

    #build pyramids
    subset.BuildOverviews(overviewlist=[2,4,8,16,32,64,128])
    subset= None

Update: For loop should look like this for anyone wondering.

    for i in range (raster_ds.RasterCount):
        i += 1
        inband = raster_ds.GetRasterBand(i)
        imgdata= inband.ReadAsArray(xOffset,yOffset,x_res,y_res).astype(numpy.float)
        subset_array= subset_ds.GetRasterBand(i)
        subset_array.WriteArray(imgdata, 0, 0)
        stats=subset_array.GetStatistics(0,1)
        subset_array.FlushCache()
        subset_array.SetNoDataValue(-999)


texts: How to find quantity in a certain attribute in a related polygon in ArcGIS

texts:
I have two polygons as below:
1.Polygon1 is the physical boundaries;
2.Polygon2 is the building inside the polygon1;
The polygon2 has an attribute called "household quantity" which is the amount shown in the picture.
So I want to fingure out the household quantity of polygon2 inside polygon1.Kindly provide a quick way to do the job in ArcGIS because the data has millions of buildings.thanks!

Example:
Polygon1,the first boundary has 1+2+3=6 household totally;
Polygon1,the second boundary has 5+9=14 household totally;


texts: Does IE9 support Openlayers-3 Fullscreen-Control?

texts:
Does Internet Explorer 9 support Openlayers-3 Fullscreen-Control?
When I run my project in IE9 it does not show the fullscreen control (ol.control.FullScreen), in every version of firefox i tried it worked well.

Is there support?

If not, is there a work around?


texts: QgsGeometry.length() giving wrong result?

texts:
I have a vector layer with Multilinestrings and used the field calculator to add a field ("length") with the calculated $length of each feature. I know the field values are correct. Now, if I calculate the length of the features with PyQGIS, I get different, wrong results. Does anybody know, what could be the reason? I don't know where to start looking for the error.

Code example:

layer = iface.activeLayer()
feature = next(layer.getFeatures())
print(feature.geometry().length() / feature['length'])

Result: 1.67


texts:
I make a form that has a textEdit wich stores the length of a line.
How it is possible to store the length of the new created line and put it in the textEdit, when form appears?


texts: Is there a way of cutting a raster map that is displayed in the GRASS GIS Map Display?

texts: I have a raster map that I generated from cropping/masking from a bigger raster map. It produced a map with only a portion of not null values. I only want to have a map that is zoomed in to the portion of not null values in order to save it into a PNG file. I only succeeded in setting the region (g.region) to the portion, but not cutting the map that only contains that portion.


texts: How I can read a shapefile with R. I have few errors with readOGR

texts:
I  have  a  problem   with   reading  my  shapefile. The  error:

Cannot open data source

In addition:

Warning messages:
1: In normalizePath(path.expand(path), winslash, mustWork) :
path[1]="D:/Pentru  Disertatie/De pe RRRRRRR/ro_judete_poligon": The
system cannot find the file specified
2: In normalizePath(path.expand(path), winslash, mustWork) :
path[1]="D:\Pentru  Disertatie\De pe RRRRRRR\ro_judete_poligon": The
system cannot find the file specified


texts: Inside buffer with attributes in ArcGIS?

texts:
How can I create buffers for polygons that:

a) lie only inside the polygon boundary, and
b) know who their parent is?

An example of where this is useful is First Nation Traditional Territories. There are overlaps all over the place and it’s nigh on impossible to sort out which is which, unless we leverage colour and/or pattern.

The Buffer Wizard is the usual way we’ve been creating buffers. It’s relatively fast and convenient and allows one to save the result in the .mxd as well as in the file system (the former means you don’t have to think about where to save it, and just get on with the job). Its major deficit though is that the buffers are dumb. They don’t know who they belong to or what their name is. In the example of FNTT, this means to draw Carcross Tagish FN differently from Teslin Tlingit Council and we have to create buffers twice, each time using selected features only. Suddenly no longer convenient. What is a better approach?


texts: I have phr1a and phr1b images (Pleiades) and I need to make atmospheric correction. First, I tried to do this by using Envi FLAASH. by the way, I tried also ERDAS atcor but there was also same conversion problem. I did radiometric correction but I couldn't do atmospheric correction because every time the software has the error of  ACC error:convert7. Does anybody have any idea how to overcome this problem?


texts: QGIS 3 unmet dependencies installation problem

texts:
I've researched many similar threads but could not find the right answer for me.

I want to install APT version of QGIS 3.10 on Linux Mint 19.2 Cinnamon. I've successfully added repository and made it signed according to official QGIS installers page

afterwards apt install qgis qgis-plugin-grass
throws in:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies.
 qgis : Depends: python3-qgis (= 1:3.12.0+28bionic) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

This happens after I tried:

apt autoclean
apt autoremove
sudo apt-get -f install

The problem persists. Any help will be much appreciated!

UPDATE

Okay the problem was likely in some corrupted packages from previous QGIS installation. I resolved the problem with aptitude:
sudo aptitude install qgis qgis-plugin-grass

It first destroyed some of these packages, suprisingly then ran it the second time and QGIS 3.10 was installed seemingly without problems.


texts: Extract the mean elevation from a raster by a mask with several spatial objects

texts:
I am working with a glacier and I want to get the Hypsometric curve of the elevation difference between two time periods. I divided the mask of the glacier by the contour lines (each 50 m) and now I want to extract the information of the raster with the elevation difference for each area that is between the contour lines.
My idea was by taking each one of the +100 polygons that are in the mask and exctracting the raster by each on of them, and then getting the statistic, but that seems like a very long step, and I have 24 more glaciers to analyse.
Does any one know a better way to do this using QGIS? Or also with R, but I am not so good in that last one.
I put an image with reference and with a part of the raster that was extracted.


texts: Is the PDF rendering engine in QGIS atlas reports the same as for single page reports?

texts:
I’ve recently created a set of atlas maps in v3.6 that display contours. When I render a single page as PDF  it obeys the rule based display settings (for index and intermediate contours).

If I run the same example as an atlas, all the line weights appear the same. The ‘rendered view’ that shows in the print composer after the PDF has renders shows the correct line symbology.

So I’m wondering if the atlas uses the same PDF renderer, or if there is some other step I’m missing in the atlas logic


texts: How to draw or edit curved lines in free GIS?

texts:
I'm searching informations about drawing simple curved arrow lines into free GIS like QGIS, in this problem data geometry is CIRCULARSTRING ( a type which exists in latest postgis version)

It seems GIS like QGIS doesn't actually support editing (and drawing?) of this type of geometry, so i'm searching a plugin like cadtools to draw this lines, but without transformation into simple LINESTRINGS, and try to using directly curve lines drawing function into QGIS API (or other free gis) , if it's possible ..

Any idea ? Thanks a lot!
SR.


texts: Calculating distance between pixel values on raster layers using QGIS

texts:
I am attempting to perform a proximity analysis to determine the distance pixel values on different rasters layers.  For example, one layer is roads (with all roads having a value of 1) and one is oil wells (with all wells having a value of 1).  I would eventually like to overlay all of the results to see which activities are in closest proximity, how close they are, and which general area within my analysis experiences the most pressure.  What is the best way to go about this?  Should I perform proximity analyses for each separate layer and then use the raster calculator to combine them?

I am using QGIS and am not too sure how to identify the "target pixel" within the GDAL proximity tool.

Any suggestions?


texts: Can I copy a PostgreSQL/PostGIS database to a file?

texts: I want to have a full copy of a PostgreSQL/PostGIS database from a server to my portable usb/hard disk and then transfer it into a new server that I will create. Is this possible?


texts: Attribute extraction from GeoJSON to symbolize - OpenLayers

texts:
Loading polygons from geoserver via OpenLayers using GeoJSON.  My plan is to symbolize using attributes in the GeoJSON.  I am struggling to access the attributes.  Any insight appreciated:

The geometries are drawing, so I know that the GeoJSON is being passed from the backend to the client.

Wrapped in an init() function and called on page load:

        map = new OpenLayers.Map('map', options);

        var protocol = new OpenLayers.Protocol.WFS({
        url: "http://osgeostack:8080/geoserver/fjtests/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=fjtests:counties",
        featureNS: "fj_tests",
        featureType: "counties",
        outputFormat: 'json',
        readFormat: new OpenLayers.Format.GeoJSON()
        });

        layer = new OpenLayers.Layer.Vector("GML", {
            isBaseLayer: true,
            //styleMap: new OpenLayers.StyleMap(style),
            protocol: protocol,
            strategies: [new OpenLayers.Strategy.Fixed()]
        });
            alert(layer.attributes) \\undefined
            alert(layer.features.length) \\ 0
            map.addLayer(layer)


texts: Problem import shapefile in PostGIS database

texts:
I am having a Polygon shapefile. When I try to import this shapefile in PostGIS some of the attributes in Geom Field is found empty. But in attribute table when I select that polygon it is visible in QGIS.

What is mistake I have committed?


texts: Converting Midpoint of Polyline into Point Feature using ArcPy?

texts:
I am trying to write a python script to determine flow direction on a water pipe network. I've used this script to find the mid point along each polyline, now i need to convert this data into a point feature class, which will become an arrow of flow direction.

I've tried saving it as a list but cannot convet the list to a point feature. Can anyone suggest ways to save the mid point locations as a point feature class?

  #FlowArrows.py
  import arcpy
  #setting the environment
  arcpy.env.workspace = "J:/PYTHON/Flow_Direction.gdb"
  #arcpy.env.overwriteOutput = True

  #Setting the containers
  Pipes = r"J:\PYTHON\Flow_Direction.gdb\Pipes"
  Nodes = r"J:\PYTHON\Flow_Direction.gdb\Nodes"
  MidList = []

  #Getting the mid point
  Cursor = arcpy.SearchCursor(Pipes)
      for i in Cursor:
      Midpoint = i.shape.positionAlongLine(0.50,True).firstPoint
      MidList.append(Midpoint)

  print ("done")


texts: Unable to populate required data in combobox

texts:
I am new in C#, I was given a VB code to migrate in C#. I have done most of it but not able to populate data in COMBOBOX.

On clicking the dropdown button, Combobox is blank, on clicking the blank box it pops up with message ( please select from layer list) which it is suppose on not selecting from populated layer list.

namespace AddIndReferenceImagery_C
//CLASS BEGINS
{
    public class DEM : ESRI.ArcGIS.Desktop.AddIns.ComboBox
    {
        // * CONSTANT DEFINITIONS
        private const int MAXNUMBER = 22;
        private const string pPath = "P:\\declared path

        // * CONSTRUCTOR
        public void New()
        {
            // *constructor new calls the sub OnFocus
        OnFocus(false);
        }

        protected override void OnFocus(bool set)
        {

            IMxDocument pMxDoc = ArcMap.Document;
            loadComboBoxOn();
            base.OnFocus(set);
         }

        public void loadComboBoxOn()
        {
            Clear();

            String[]imageryArray = {layer name  };

            int index = 0;
            for (index = 0; index<=MAXNUMBER;index++)

            {
               Add(imageryArray[index]);
            }
          } // END loadComboBox()

        protected override void OnSelChange(int cookie)
        {
            IMxDocument pMxDoc = ArcMap.Document;
            IMap pMap = pMxDoc.FocusMap;
            IActiveView activeView = pMxDoc.ActiveView;
            IMap map = activeView.FocusMap;

            loadLayer(Value);
            pMxDoc.UpdateContents();
            OnFocus(true);
            base.OnSelChange(cookie);
        }
        private void loadLayer(string inLayer)
        {
            IMxDocument pMxDoc = ArcMap.Document;
            IMap pMap = pMxDoc.FocusMap;
           IActiveView activeView = pMxDoc.ActiveView;
           IMap map = activeView.FocusMap;

                      if (Value == "Add dem Layers..." || Value == "" || Value == " Image is not available at the time")
            {
                MessageBox.Show("Please select a layer from the layer list");
            }

            else
            {
                IGxLayer pGxLayer = new GxLayer();
                IGxFile pGxFile = pGxLayer as IGxFile;

               string pLayerName = pPath + inLayer;

                pGxFile.Path = pLayerName;
                 pMap.AddLayer(pGxLayer.Layer);
             //   MessageBox.Show("pLayerName after AddLayer");

                test_Spatial_Ref_Layer(pGxLayer);
                pGxLayer.Layer.Visible = true;


texts: How to manipulate annotation text outline color in ArcEngine?

texts:
I can get the color of my annotation text like this:

IColor TextColor = lpLabelEngine.Symbol.Color;

How can I get / set the outline color?

Something like this, I want a black letter with a white outline, and the white outline is 3 pixels wide.


texts: Summarizing polygon area using another polygon in ArcGIS for Desktop?

texts:
I have a shapefile representing public/private lands in Montana.  This is a multipart shapefile where I've simplified attributes so that #1==private and #0==public.

Next I have a shapefile of counties for the state.  How could I easily summarize the total area of public vs private by county?

Do I need to rasterize and go about it that way?

I have an ArcEditor (Standard) and Spatial Analyst license.


texts: Crediting QGIS and source of map data in print

texts:
I am new to QGIS (3.4.12-Madeira installed) and have made myself a bit familiar with it the last few days. When creating maps for a printed hiking-guide, I would like to credit QGIS as well as the source of the underlying map data properly.

I have already read these existing Q&As about this topic:

Display credit in map composer?
Add basemap copyright in QGIS?
Dynamic copyright or layer credit in QGIS 3.4?
Showing OSM source acknowledgment on the map in QGIS?
Crediting OSM maps in QGIS

but my case doesn't quite seem to fit any of those cases:

I have installed the HCMGIS-Plugin, hence the most suitable source data for my purposes seem to be the ones available in the menu item "HCMGIS -> Base Map -> XXX" where XXX stands e.g. for "ESRI Shaded Relief" or "Stamen Terrain" or "F4 Map - 2D", etc.;  The reason I don't want to use OSM-basemaps, is that they contain too many things I don't want on my hiking maps as I want to keep them neatly readable. I basically just need shaded relief so you can see where hills and mountains are, with green coloring of forests, etc., and I'll add symbols/labels for major towns and POI's manually.
But unlike -for example- OSM-basemaps, the above-mentioned map sources do not seem to have any copyright attribution in their Layer Properties (the "Title" field in the "Attribution" under "QGIS Server" is empty). Just for purpose of demonstration, I have used in the attached examples "OpenStreetMap ODbL" as text string where the proper name of the data source should go.

So how do I find out who I should credit for the ESRI-, Stamen-, etc. basemap in such cases?
I don't need any automation of copyright info, as i will stick to one base map, one print layout and one scale for all my maps (I'll only move the displayed map area in the QGIS Print Layout, going along the hiking trails), and therefore I can enter the copyright notice as a manual text field in the Print Layout;

But I am unsure how to credit "the QGIS-Team". I had found a rather lengthy expression in a Q&A somewhere here. I'm sorry I can't find that Q&A anymore, but I had noted the expression and built it into a sample print layout (in my actual maps, there won't be any large water area, I selected this only for readability here).

This full string, however, is way too long from a point of view of map readability, as all my other maps will be half the width of this overview map. So, I shortened the expression a bit as shown in the second jpg.

Would the short version be sufficient for crediting "the QGIS-Team"?

If in any way avoidable, I'd prefer solutions not involving usage of the Python Console, as I am completely unfamiliar with it and the last time I did any "programming" was in university 35 years ago.


texts: Linking clusters and masks by a common identifier

texts:
In ArcMap, I have raster clusters with unique identifiers. Around each cluster I have masks.

Is there any way to carry each of the clusters' identifiers over to the attribute table of its closest mask?

I would like to be able to distinguish to which cluster each mask belongs.


texts: Correct algorithm to determinate if the user is really inside/outside a region

texts:
first time here.

I'm currently building a system that control the user GPS position in order to turn on/turn off some stuff inside user's house.

For example, if the user leave the house we must turn off heaters, when the user return home, the opposite.

The user, obviously, must set a radius (for example 2miles, the center of the circle is his house) that actually act as a geofence.

Now it comes the problem, how can I determinate if the user is really inside the geofence and not passing by?

At this time the logic that I actually implemented is the following (and I really think this is NOT the correct way):

Get all GPS points of the user of last 2mins.
Calculate the center of the bounds of the GPS points retrived and the distance from this to the geofence's center.
Check if the distance is more/less of the radius.

EDIT The problem that I am trying to resolve is this:

The orange dots are the GPS points of the user. He enter and after sometime, he leaves.


texts: Convert XYZ coordinates from EPSG:2231 to EPSG:3857 (WGS 84 Pseudo Mercator)

texts:
I have some ground control points (GCPs) collected using coordinate system EPSG: 2231 (Colorado North USft). I have the data as a CSV. I want to convert the X,Y,and Z coordinates to WGS84 Psuedo Mercator (EPSG: 3857), with the X and Y coordinates being in decimal degrees.
I have found the website EPSG.io which will convert the XY coordinates to Pseudo Mercator (Northing/Easting), which is a start, but how can I convert the Z coordinates?
It's my understanding there is something called a vertical reference system for coordinate systems, and that WGS84 Pseudo Mercator is specifically designated in meters. It's also my understanding that for coordinating Z coordinates between coordinate systems, I can't just do a simple feet to meters conversion. Could someone shed more light on this process/any free tools to perform this conversion?


texts: How to create a polygon (fixed width buffer) around a polygon in QGIS?

texts:
I have created a polygon in QGIS (in this case it describes a country's maritime baseline).

I need to create a second polygon whose boundary is a fixed distance from the original polygon. (in this case I need to create the territorial sea boundary, which lies 12 nautical miles outside the baseline).

I think geoprocessing tools>buffer is correct tool for this job? But I can't figure out what units QGIS uses for the buffer distance.

What should I enter in buffer distance to generate a 12nm buffer?


texts:
I have installed QGIS 2.18.16 under Linux Mint 18.3.

Opening QGIS about, I read that QGIS is compiled against GDAL/OGR 1.11.3, while from Synaptic I read gdal-data as version 2.2.2.

The problem that I encounter is that I need to use a certain CRS (in particular EPSG:6875) and this is not present in the list of available CRS, while reading online it seems that it is usually available.

How can I solve this?


texts: Standardizing data over time (not space) in ArcGIS Pro 10.8?

texts:
I am trying to standardise Standard Precipitation Index data and Vegetation Health Index data over time on a 0 to 1 scale. I was previously using the fuzzy membership function to standardise the data over space, but this was not reflecting the raw data appropriately, especially as the Standard Precipitation Index data has negative values which are of higher preference to larger, positive values.
I have tried the reclassify and rescaling functions but these have not proven to work either.


texts: How to connect "floating" model variable to the tool that uses the inline variable?

texts:
This question likely has a simple answer or the behaviour is by-design and is not worth fixing.

The simple model below uses an Expression to 'Select Layer By Attribute."  When this model is run, the expression will remain the same but the ID attribute value can changed based on user input.

Therefore I have exposed a string variable as a model parameter, and am using inline variable substitution to add the user's value in the query expression (the datatype of the [LeaseID] field happens to be a string and not integer/numeric).

I would like to have the "Lease ID" model parameter connected to the "Select Layer By Attribute" tool.  This is purely aesthetic and is not required for the model to run successfully.  I believe it would look better, be more intuitive, and be easier for new users of Modelbuilder to understand where the model parameter is being inserted into the tool.

I could just expose the Expression parameter of the tool as a model parameter...but then anyone running the tool would modify the whole expression and could cause unnecessary error(s).

Any thoughts on how to do this...I would prefer that the variable not be floating in free space. Thanks.

Full size image


texts: How to reduce pixels in polygons by calculating mean in Google Earth Engine?

texts:
I'm new at Google Earth Engine environment. I would like to create a time series chart with many large polygons but I get this error: Error generating chart: Error in map(ID=20191205T005916_20191211T151317): Image.reduceRegion: Too many pixels in the region. Found 25359892, but maxPixels allows only 10000000.
I would like to reduce these pixels by calculating a mean value for each polygon.
//Crear geometría para una región específica (Área de interés) a partir de coordenadas.
//De manera alternativa, se puede crear una capa de 'MultiPoint' o 'MultiPolygon' para el área de interés.
var roi = ee.Geometry.Rectangle([-12.9419, 32.6294, 42.0776, 64.7974]);

//Añadir unidades espaciales para el análisis de series multitemporales
//De manera alternativa: crearlos como 'MultiPolygon' o 'MultiPoint'.
var featureCollection = ee.FeatureCollection('users/kovcsdniel962/URAU_C_2018');
var styleParams = {
  fillColor: '00000000',
  color: '#232323',
  width: 0.5,
};

 var spatialunits = featureCollection.style(styleParams);
 Map.addLayer(spatialunits, {}, 'Urban Areas');

 //Filtrar los datos
 var filter = ee.Filter.inList('CNTR_CODE', ['IT']);
 var filteredArea = featureCollection.filter(filter);
 Map.addLayer(filteredArea, {color: 'green'}, 'filteredArea');

 var newroi = filteredArea;

 //Datos Sentinel 5P para NO2. Fecha 1.
 var N02 = ee.ImageCollection('COPERNICUS/S5P/OFFL/L3_NO2')
   .filterDate('2019-12-05', '2019-12-22'); //Selección de periodo temporal

 //Datos para columna NO2 Troposférico
 var SentinelNO2Tropo = N02
   .select('tropospheric_NO2_column_number_density')
   .filterBounds (roi);
 var NO2TropoData = ee.Image(SentinelNO2Tropo.median());
 var NO2TropoClip_date1 = NO2TropoData.clip (roi);
 Map.addLayer (NO2TropoClip_date1, {
   max: 0.0002,
   min: 0.0,
   palette: ["black", "blue", "purple", "cyan", "green", "yellow", "red"]},
   'NO2 Tropospheric Date 1');
 Export.image.toDrive({
   image: NO2TropoClip_date1.select("tropospheric_NO2_column_number_density"),
   description: 'NO2_Tropospheric_Date1',
   scale: 1100,
   region: roi});

 // Crear una gráfica para columna NO2 Troposférico.
 var chart = ui.Chart.image.series({
   imageCollection: SentinelNO2Tropo.select('tropospheric_NO2_column_number_density'),
   region: newroi,
   reducer: ee.Reducer.median(),
   scale: 30
  })
  .setOptions({title: 'Tropospheric NO2 over time. Date 1.'});

  // Representar la gráfica en la consola.
  print(chart);


texts: Merging two separate shapefiles into one shapefile

texts:
I have a problem with vector data tools/ merge vector layers using QGIS 2.18.0.

This is the procedure that I took:

I created some polygons on the base of an aerophoto image.

I merged these polygons into one bigger piece.

And now I want to merge these two layers into the layer the already exists and is the first one that I created (that one with smaller separate polygons).
My problem is, that after using the function merge vector layers, the result is same as it is in the original photo. The borders between the polygns are still there.

I don't know where I am making the error.

Is there any other option to delete the borders of the polygons, without having to save into a separate shapefile?


texts: WFS-T Edit using OpenLayers, Geoserver, PostgreSQL ("error performing insert")

texts:
I tried following the tutorials:
http://www.gistutor.com/openlayers/22-advanced-openlayers-tutorials/47-openlayers-wfs-t-using-a-geoserver-hosted-postgis-layer.html
and:
http://apps.who.int/tools/geoserver/www/wfs-t.html

With the following results:

the delete-function works, ergo I am able to alter my data in the postgres file.
when inserting or editing a polygon I always get the answer:

<wfs:FAILED></wfs:FAILED> </wfs:Status> <wfs:Message>Error performing insert: Error inserting features</wfs:Message>

or

<wfs:InsertResult>
<ogc:FeatureId fid="none"></ogc:FeatureId>
</wfs:InsertResult>
<wfs:TransactionResult>
<wfs:Status>
<wfs:FAILED></wfs:FAILED>
</wfs:Status>
<wfs:Message>Update error: Error occured updating features</wfs:Message>

I made a simple file, using only one kind of projection (EPSG:32647)- still, same problem. Where do I go wrong?!

My Postgres Data-Table:

gid - Integer, not null
fid - double precision
geom - geometry(MultiPolygon,32647)

Here is my code:

function init(){

//Save-strategy
var saveStrategy = new OpenLayers.Strategy.Save();

//empty map, bounds are test-layer bounds (EPSG:32647)
map = new OpenLayers.Map({
    div: "map",
    allOverlays: true,
    maxExtent: new OpenLayers.Bounds(
    653237.69439077,1519879.063165,655229.57939001,1520825.6733868
    )
    });

//WFS-Layer Test= editable data
var test = new OpenLayers.Layer.Vector("Editable Features", {
    strategies: [new OpenLayers.Strategy.Fixed(), saveStrategy],
    protocol: new OpenLayers.Protocol.WFS({
    url: "http://..../wfs",
    featurePrefix: 'testkf',
    featureNS: "http://.../testkf",
    featureType: "test",
    geometryName: "geom",
    })
});

map.addLayer(test);

//Toolbar:
    var panel = new OpenLayers.Control.Panel(
    {'displayClass': 'customEditingToolbar'}
    );

    var navigate = new OpenLayers.Control.Navigation({
    title: "Pan Map"
    });

    var draw = new OpenLayers.Control.DrawFeature(
    test, OpenLayers.Handler.Polygon,
    {
    title: "Draw Feature",
    displayClass: "olControlDrawFeaturePolygon",
    multi: true
    }
    );

    var edit = new OpenLayers.Control.ModifyFeature(test, {
    title: "Modify Feature",
    displayClass: "olControlModifyFeature"
    });

    var save = new OpenLayers.Control.Button({
    title: "Save Changes",
    trigger: function() {
    if(edit.feature) {
    edit.selectControl.unselectAll();
    }
    saveStrategy.save();
    },
    displayClass: "olControlSaveFeatures"
    });

panel.addControls([save, edit, draw, navigate]);
panel.defaultControl = navigate;
map.addControl(panel);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.zoomToMaxExtent();
}

Thanks for your help!!

Edit:
I use Geoserver 2.1.4 and PostGIS 2.0 for PostgreSQL 9.1


texts: ArcMap's "Join Field" tool takes so long when just "Joining" works instantly. Help?

texts:
I'm using ArcMap and I'm trying to write a script that automates a join and then does some reporting.

I'm not very experienced with joins and I'm running into a problem.
When I do a join manually (right clicking the shapefile and specifying the join) it does the join seemingly automatically.
However, when I try and do a "Join Field" in ModelBuilder it takes a really long time. Minutes.

Is there a different method of automating a join using python or Model Builder that runs faster?


texts: How can detect an 'end-of-file' error, using code, when using readLAS?

texts: While looping through my list of LAS files in a directory (I'm using readLAS to record warnings and errors for each file), at least one file gives an error message in the console window (i.e. ERROR: 'end-of-file' after 3355392 of 25918554 points). The error doesn't interrupt the loop but that file will be invalid. Is it possible to catch this in the code on the fly while reading the LAS file? Or does it have to be done after the loop finishes by reviewing message outputs in the console?


texts: Determining NDVI of polygon using ArcGIS Desktop?

texts:
I have calculated the NDVI of a city. Now I want to know how "green" every street segment in that city is. I therefore buffered 7.5m on every street segment. I then used the Zonal Statistics as a Table-tool, in order to get the statistical values for every buffered street segment. My workflow is therefore:

Calculate the NDVI and save it as .tif-file.
Buffer the street segments using a 7.5m buffer.
Use Zonal Statistics as a table to get the statistics of every polygon (the input polygons are the buffered street segments).

However when I look at my resulting statistical table, I see that I cannot use it. I thought about using the mean (with the idea of the "mean greenness of a street") but sadly I have there values out of the [-1,1] range of the NDVI (1,05 and 534,97 to be exact). The thing is also that I cannot explain that value 534,97, since in that polygon is not that much green.

Is there another way/approach to determine how "green" a city is?


texts: GeoWebCache (GWC) "crashes" while seeding Tiles from large orthoimage (TIF; >10GB, 1cm GSD) in Azure BlobStorage

texts:
Since three weeks we try to handle our large orthoimages (output agisoft/drones) in Geoserver. The orthoimages are approximately 10-15GB and have a ground sampling distance of 1cm. We have to host the images in UTM (EPSG: 32632/32633) and are not able to use a standard tile epsg (e.g. web mercator,etc.)
Therefor we created a gridset in UTM which works fine and also the tiling works fine with smaller geotiffs (~3-4GB). But trying to cache a monster (15GB TIF) will bust our system:
Now to our system:
We have a F16sv2 (16cores, 32GB Ram and Azure Files Disk) for our Geoserver in Azure for our tiles we connected the BlobStorage with the Plugin (works fine, too)
We tried different parameter of metatiling, different heap memory sizes of geoserver/gwc already -but it crashed!
So what actually happens...first it runs like hell! Either using 1 oder 14 treads! After the first minute we reach 10.000 Tiles of 130.000 Tiles...after 2 Minutes 17.000....and after a while it gets slower and slower and slower...actually after 2 hours it creates 1 tile per 30 minutes. The CPU usage is at 100%. The memory is normal.
The only way to stop this, is to delete the pod in our kubernetes service - just KILL it :-)
Has anywho have the same issues? We think yout using MapProxy instead and parallelize the seeding processes..
25 Nov 08:27:55 ERROR [geowebcache.GeoWebCacheDispatcher] - java.util.concurrent.TimeoutException http://_______._________.com/geoserver/gwc/service/wmts
25 Nov 08:27:55 ERROR [geowebcache.GeoWebCacheDispatcher] - Request failed
java.lang.RuntimeException: java.util.concurrent.TimeoutException


texts: Reclassified raster to separate polygons

texts: I have a DEM reclassified into 5 bands and I want to convert each classification into a separate polygon. Since, I have 5 classifications, hence 5 polygons will produced. Can I do this in ArcGIS?


texts: Why is Modelbuilder Raster Calculator only exporting black and white?

texts:
I am attempting to create in ArcGIS 10.3 a Modelbuilder code based partially on that in Using raster calculator in ModelBuilder to batch reclassify hundreds of rasters?  My code will run through 70+ rasters of different sizes, raster calc them from meters to feet, place them in a specific directory, and eventually iterate both a polygon from raster boundary, two separate contour maps, and add a field and an attribute to each of the polygon boundaries. However, I am encountering a problem in just creating the Raster Calculator iteration.

Here is my Modelbuilder as currently drafted:

Its code:

# Import arcpy module
import arcpy

# Load required toolboxes
arcpy.ImportToolbox("Model Functions")

# Script arguments
Test_Group = arcpy.GetParameterAsText(0)
if Test_Group == '#' or not Test_Group:
Test_Group = "N:\\Planning And Development\\Engineering\\Systemwide GIS\\Geodatabases\\Comprehensive\\Test Group" # provide a default value if unspecified

# Local variables:
Name = "USGS_NED_one_meter_x46y443_CO_SoPlatteRiver_Lot5_2013_IMG_2015.img"
feet__Name_ = "N:\\Planning And Development\\Engineering\\Systemwide GIS\\Geodatabases\\TestOutput\\feet_%Name%"
Raster = "N:\\Planning And Development\\Engineering\\Systemwide GIS\\Geodatabases\\Comprehensive\\Test Group\\USGS_NED_one_meter_x46y443_CO_SoPlatteRiver_Lot5_2013_IMG_2015.img"
Value = "USGS_NED_one_meter_x46y443_CO_SoPlatteRiver_Lot5_2013_IMG_2015.img"

# Process: Iterate Rasters
arcpy.IterateRasters_mb(Test_Group, "", "", "RECURSIVE")

# Process: Raster Calculator
arcpy.gp.RasterCalculator_sa("\"%Name%\" *  3.28", feet__Name_)

# Process: Parse Path
arcpy.ParsePath_mb(Raster, "FILE")

Here is the Raster Calculator setup (ignore the error message, that was after I ran through an iteration):

Output comes out like this:

Strangely if I run an individual instance of Raster Calculator, it comes out in greyscale as normal. However, with 70+ rasters I don't want to do one at a time especially since I want to automate other tasks after I have solved this error.

Where am I going wrong?


texts: Image segmentation error 999999 with NAIP in ArcMap?

texts:
I'm trying to do object-based image analysis on a portion of the NAIP 2016 aerial imagery for Washington (4-band, 8-bit unsigned).

Image: The NAIP file I'm using is accessed through a USDA server. To do this, I go into the Catalog sidebar, scroll down to GIS Servers, click "Add ArcGIS Server", and add the server URL https://gis.apfo.usda.gov/arcgis/services. The file I use is in the "NAIP" folder, called "Washington", which I drag into my Table of Contents.

Geoprocessing: I'm using the Segmented Mean Shift function on on a small portion of the NAIP image. The inputs are just the defaults, but set processing extent to the extent of a small polygon feature in a separate geodatabase. The path file for the image reads "NAIP\Washington". There is no way to link directly to the file (e.g. clicking the yellow folder next to Input Raster and navigating to the USDA server - the raster files don't appear). There are 4 bands, but the tool takes the first three by default. However, after running for a few minutes I get an Error 999999 and an incomplete output raster in grayscale.

I suspect the problem is my use of a server image. I'm not sure how to get around using a server since the entire NAIP file for Washington is 1.88 TB.

Does anyone have any idea what I could be doing wrong?


texts: Converting from EPSG 25833 to WGS 4326 using QGIS?

texts:
I have a layer of Brandenburg (Germany) in EPSG 25833 which I want to tranfrom to EPSG 4326. Similar to this answer to Transforming shapefile to WGS:84 (EPSG: 4326) in QGIS?, I set the CRS to EPSG 4326 and go to export / save as to save this layer in 4326.

Now once I try to overlay this layer with a point shapefile of hospitals in Brandenburg taken from OSM (which is in EPSG 4326 by default) they do not match at all.

What am I missing?


texts: Modeling Telecommunications Infrastructure in GIS?

texts:
I am looking for resources that will help me to model telecommunications infrastructure of a small town/campus in GIS.  Can anyone suggest where to look for:

A telecommunications GIS data model (I know ESRI created one)
Place on the web (e.g. forum, group) that this is being discussed or could be a helpful resource.


texts: QgsGeometry Polygon incorrectly interpreted as 'list'

texts:
I'm writing a QGIS plugin in which input data is multiple small polygons taken from an existing memory layer and merge it into one single polygon (not multi) and return it as memory layer.

However, when I try to set a geometry for the new feature (single one in new memory layer) I get TypeError: QgsGeometry.fromPolygon(unknown-type): argument 1 has unexpected type 'list'. Below is my code and comments.

vl is the old layer and vl_combine is the new one, just as pr_combine is the new dataProvider:

      newGeometry = QgsGeometry.fromWkt('GEOMETRYCOLLECTION EMPTY')

      for feature in vl.getFeatures():
          newGeometry = newGeometry.combine(feature.geometry())

      fet_combine = QgsFeature()
    > fet_combine.setGeometry(QgsGeometry.fromPolygon([newGeometry])) # <-- this is the line I get error in

      fet_combine.setAttributes(['just text'])

      pr_combine.addFeatures(fet_combine)

      vl_combine.updateExtents()

      ## Add prepared layer with transparency
      QgsMapLayerRegistry.instance().addMapLayer(vl_combine)
      vl_combine.setLayerTransparency(50)

So what I do:

check the print type(newGeometry) and what I get is <class 'qgis._core.QgsGeometry'>.
by print newGeometry I see <qgis._core.QgsGeometry object at 0x9db0680>.
finally I print newGeometry.asPolygon() and get a structure of [[(16.9102,52.4036), (16.9105,52.4038), (16.9098,52.4034), (16.9102,52.4036)]] (shortened, but should be clear)

I can't think of more ways to troubleshoot, the object seems to be of correct QgsGeometry type. I tried to put newGeometry without [ ] in the > line, but it didn't work too.


texts:
I created a shape file a while ago with several (20+ polygons) in it. I was wondering if there is a way to symbolize these polygons with unique symbols.

Basically all I actually want to do is color them differently from each other, and I don't think I can do this when they are all in one file.


texts: Creating new feature type with Geoserver REST API work but return error code 500

texts:
I'm using Geoserver REST API to create a new PostGIS feature type in Geoserver doing a POST to an url following this pattern http://localhost:8080/geoserver/rest/workspaces/my_ws/datastores/my_ds/featuretypes.json
and passing it data like this:
{'featureType': {'name':'my_featuretype_name'}}.
The post effectively create the feature type but is returning a 500 code error which mean:

Internal server error.

According to the official doc the returned code is supposed to be 201.
Looking in Geoserver log show me the following error:

INFO [org.geoserver] - Loaded feature type 'my_featuretype_name', enabled
ERROR [geoserver.rest] - :Resource named 'my_featuretype_name' already exists in store: 'my_ds'

The table already exist in my database but is not published as a layer in Geoserver.
What I want to do is to reproduce, with the REST API, the exact same action of clicking publish for an existing table in my database in the add new layer page of the Geoserver Web admin.
Am I doing something wrong?
Thanks a lot
Etienne


texts: Publishing Earth Engine App with restricted access

texts:
I am having trouble publishing Earth Engine Apps with restricted access.

The simple test app here works as expected when publicly accessible. However, if access is restricted to the membership of a Google Group, the link won’t load; instead it constantly tries to redirect to an address like:

https://www.google.com/url?sa=D&q=https://rsac_tim.users.earthengine.app/view/restrictedapptest&ust=1591356256714732&usg=AFQjCNGAQ7Gmk154EYzVPkM8m1WqC98FMg (in each loop the ust and usg values are different)

All that appears on the page is the message:

  Redirecting you to https://rsac_tim.users.earthengine.app/view/restrictedapptest.

This is the case in both Firefox and Chrome. The GEE source code is here. The Google Group specified is owned by me (same account used to create the GEE script).

Have others experienced this? Is there a solution?


texts: Isolating and exporting specific sections of a shapefile in QGIS?

texts: If I have a shapefile layer in QGIS showing the spatial boundaries of subsections of a larger area (e.g. counties within a state, or countries within a continent), how would I selectively crop out one section of that shapefile and export it as its own shapefile (e.g. only Germany if I have all of Europe)? I don't want to crop by drawing a custom polygon around borders myself, as it needs to be exact for each subsection. Can this be done with attributes somehow?


texts:
i want to add a marker on may map but i have to add pulsate class my marker like google map
jsfiddle

can anyone help me?
this is my code

 var vectorSource = new ol.source.Vector({
            //create empty vector
        });
        var iconFeature = new ol.Feature({
            geometry: new ol.geom.Point(ol.proj.transform([42, 28)], 'EPSG:4326', 'EPSG:3857')),
            attribute: {}
        });
        vectorSource.addFeature(iconFeature);
        //var iconStyle = isemri.turnBackDefaultMarkerStyle(data[i].isemriKaynagi.name)

        //add the feature vector to the layer vector, and apply a style to whole layer
        var vectorLayer = new ol.layer.Vector({
            source: vectorSource,
            //style: iconStyle
        });
        vectorLayer.getSource().getFeatures()[0].setStyle(iconStyle)
        vectorLayer.setProperties({ attributes: {}, type: "marker" });
        map.addLayer(vectorLayer);


texts: gdal_retile - Out of range band requested

texts:
I'm using gdal_retile to create ImagePyramid from a set of GeoTIFF images. I'm using following command:

gdal_retile.py -v -r bilinear -levels 8 -ps 2048 2048 -co "TILED=YES" -co "COMPRESS=JPEG" -targetDir F:/tiles --optfile F:/tileslist.txt

After couple of hours(source images are 320GB) I get following error message:

Traceback (most recent call last):
  File "C:\PROGRA~2\FWTOOL~1.7\bin\gdal_retile.py", line 940, in ?
    sys.exit(main(sys.argv))
  File "C:\PROGRA~2\FWTOOL~1.7\bin\gdal_retile.py", line 857, in main
    dsCreatedTileIndex = tileImage(minfo,ti)
  File "C:\PROGRA~2\FWTOOL~1.7\bin\gdal_retile.py", line 335, in tileImage
    createTile(minfo, offsetX, offsetY, width, height,tilename,OGRDS)
  File "C:\PROGRA~2\FWTOOL~1.7\bin\gdal_retile.py", line 467, in createTile
    dec.uly+offsetY*dec.scaleY)
  File "C:\PROGRA~2\FWTOOL~1.7\bin\gdal_retile.py", line 246, in getDataSet
    s_band = sourceDS.GetRasterBand( bandNr )
  File "C:\PROGRA~2\FWTOOL~1.7\pymod\gdal.py", line 654, in GetRasterBand
    raise ValueError, 'Out of range band requested: %d' % i
ValueError: Out of range band requested: 2

I tried to retile separately images that execution stops on, but then I get no error message. Everything works well, so my guess that it's something wrong with the source image doesn't seem to be valid.

Does anyone have any other ideas of what could be wrong or how I should troubleshoot the problem?


texts:
I have two layers in AGOL: a county boundary layer for Nevada I got from census.gov and geocoded points (which I dragged and dropped a CSV with addresses into AGOL).

Going to each layer's options, there is no option to filter. Upon doing a search on the issue I came across this:

"You can create filters on hosted feature layers, ArcGIS Server feature service layers, and ArcGIS Server map service layers that have associated attribute data; you cannot create filters on map notes or features imported from a file."

source: https://doc.arcgis.com/en/arcgis-online/use-maps/apply-filters.htm

Anyone know a way around this? I'm new to GIS in general.


texts:
So I have a spreadsheet that I'm trying to import into a GDB as a shapefile and then modify some fields with arcpy.AlterField_management(). The problem is that the field name has an accent mark (Dirección), and PyScripter says it can't find that field, even if I put # -- coding: utf-8 -- at the beginning of the script. I know the problem is the accent mark, because if I manually remove the accent mark in the original excel file, the script runs with no errors, but as soon as it has the accent mark, it says it can't find that field. Removing it manually is not an option because I want to use this for spreadsheets that have many accent marks and it would take forever to remove all of them manually. I already tried writing utf-8 at the beginning of the script and it still doesn't work and I don't know why. Do you know how can I solve this problem?

This is the line that gets the error:
arcpy.AlterField_management("Tabla", "Dirección", "STNAME", "STNAME")


texts: Spatial data not aligning after Define Projection?

texts: I have three shapefiles and two buffers made from two separate shapefiles. I was trying to do a spatial join and it kept coming up with an empty file even though there was clearly overlap. I realized that some of the shapefiles had different projections. I changed them all to NAD 1984 for zone 18 and I also tried WGS, and then GCS WGS, but two of the shapefiles and a buffer file are now unaligned with a shapefile and its buffer. They are all the same coordinate system and they aren't aligning when they were before I changed the coordinate system. Is there a way to change them back? The undo button just says "remove layer." Or suggestions to fix this? I don't want to start from scratch with the original data.


texts: How do I load Google imagery (online Google Maps) into AutoCAD Map 3D 2010 ?


texts: OSM Place Search in QGIS not working anymore?

texts:
We've used OSM Place Search plugin daily with QGIS 2.2, 2.6 and 2.8 and it's been great.

However, it stopped working last week for myself and several other inter-office users. We enter search text, hit the arrow button and nothing happens. No error, no spinning wheel, nothing.

Here's the syntax from the qgis extensions log:

2015-09-22T16:27:30 1   http://open.mapquestapi.com/nominatim/v1/search.php?format=json&q=maywood%20park&addressdetails=0&polygon_text=1

2015-09-22T16:27:30 1   expected string or buffer

Anyone else experiencing this or any ideas how to fix?

QGIS 2.8 x64 on Windows 7


texts:
I'm looking for a framework in Java or PHP to use it as backend for a mobile application. It should (if possible) implement REST services, geo functions for routing and CRUD services.

I found the Java framework GeoMajas, but I'm not quite sure to understand all it's functionnalities and for which type of project it should be used.

Any advices and ideas on which framework to use for this type of project ? Is GeoMajas a good one or isn't it designed for this case ?


texts: Secure Web Site with Non-Secure Mapbox Overlays

texts: We host a site that uses Mapbox.  We're testing running it as a secure(https) site and are getting errors within Chrome that it can't access non-secure data when coming from a secure site.  We are attempting to retrieve data from WMS and ArcGIS servers from our customers that are not secure and we have no control over.  What is the best method for retrieving the data from a secure site?


texts:
I am using apt-fast to install and upgrade QGIS-3 (2.99) under Ubuntu 16.04, which is a much faster method than the default apt-get. This works well until recently. I begin to get errors about SSL/TLS handshake failure (excerpts listed below). apt-get upgrade still works, but apt-fast upgrade consistently gives this error.

  12/20 10:29:14 [ERROR] CUID#106 - Download aborted.
  URI=http://qgis.org/ubuntugis-nightly/pool/main/q/qgis/libqgis-gui2.99.0_2.99.0+git20171219+70d61fd+24xenial-ubuntugis_amd64.deb
  Exception: [AbstractCommand.cc:350] errorCode=1
  URI=https://qgis.org/ubuntugis-nightly/pool/main/q/qgis/libqgis-gui2.99.0_2.99.0+git20171219+70d61fd+24xenial-ubuntugis_amd64.deb
  -> [SocketCore.cc:975] errorCode=1 SSL/TLS handshake failure: Error in the pull function.

  ...

  12/20 10:29:15 [NOTICE] Download GID#b992375f94b680b6 not complete:
  /var/cache/apt/archives/apt-fast/qgis-common_1%3a2.99.0+git20171219+70d61fd+24xenial-ubuntugis_all.deb

  ...

  Download Results: gid   |stat|avg speed  |path/URI
  ======+====+===========+======================================================= 5a2ca3|ERR |
  17KiB/s|/var/cache/apt/archives/apt-fast/libqgis-core2.99.0_1%3a2.99.0+git20171219+70d61fd+24xenial-ubuntugis_amd64.deb
  07ad77|ERR |
  15KiB/s|/var/cache/apt/archives/apt-fast/libqgis-analysis2.99.0_1%3a2.99.0+git20171219+70d61fd+24xenial-ubuntugis_amd64.deb

Does anyone know how to fix the problem?

(I've tried apt-get {autoremove|autoclean|clean} to no avail.)


texts: QGIS Plugin, ModuleNotFoundError: No module named 'pymysql'

texts:
I'm writing a plugin for qgis. In this plugin I need to query a db and I tried to use pymysql. When I try to install the plugin in Qgis the message error is: ModuleNotFoundError: No module named 'pymysql'. Pymsql is correctly installed and it usually works, and i'm sure that in the code I imported the module. This is the code part where I use the db connection. Is there a problem with my code or is it impossible to use pymysql in a Qgis plugin?

    retrive = "SELECT DISTINCT ID FROM `beni` Join relazioni ON beni.ID = relazioni.IDR WHERE relazioni.data="+dataInizio

    #database connection
    connection = pymysql.connect(host="localhost",user="root",passwd="",database="mydb",port=3308 )
    cursor = connection.cursor()

    if connection.open:
      #execute query
      cursor.execute(retrive)
      rows = cursor.fetchall()

      if not rows:
        self.iface.messageBar().pushMessage(
        'Success', "rows is empty", level=Qgis.Success)
      else:
        #create Qgis Expression
        seperator = ', '
        rowsString=seperator.join(rows)
        expr = QgsExpression( "id in ("+rowsString+")")
        cLayer = iface.mapCanvas().currentLayer()
        it = cLayer.getFeatures( QgsFeatureRequest( expr ) )
        ids = [i.id() for i in it]

        #select by ids and load style
        cLayer.selectByIds(ids)
        cLayer.loadNamedStyle(selectedStyle)
        cLayer.triggerRepaint()

    connection.close()


texts: How to add tools from Heron Mapping Client into Boundless SDK GXP template?

texts:
I am creating my first online map application using the Boundless SDK GXP template from OpenGeoSuite 4.8. I have been able to successfully edit the template to add in plugins and widgets from GXP, but am trying to figure out how to add additional functionality. Ideally, I would like to have a panel or box that lets the user search a WFS and zoom to the the feature they searched for.

I came across the FormSearchCenter tool from Heron Mapping Client (the Config.js for this tool is here) that has this functionality. However, I am unclear as to how to integrate it into the app.js I created using the Boundless SDK GXP template.

Does anyone know of any sites or tutorials I can look at to learn how to integrate this tool into my Boundless SDK GXP app.js? Or have any guidance on if this is possible? I've exhausted the Application Development with Boundless SDK GXP template tutorial and haven't come across anything online about this.


texts: Error message using sDNA Prepare Network

texts:
I'm preparing a road network using the sDNA Prepare Network tool on QGIS 2.18.28. My OS is Windows 10 64 bit.

I get the following error message:

Algorithm Prepare Network starting...
**********************************************************************
WARNING: sDNA ignores your selection and will process the entire layer
**********************************************************************
Running external command: "D:\Program Files\QGIS 2.18\bin\python.exe" "c:\Program Files (x86)\sDNA\bin\sdnaprepare.py" --im "net=D:/MEGAsync/lbm/nanjing_roads_project.shp" --om "net=D:/MEGAsync/lbm/qgis/sdna/nj_prepare.shp;errors=D:/MEGAsync/lbm/qgis/sdna/nj_prepare.shp" "start_gs=;end_gs=;xytol=;ztol=;action=REPAIR;nearmisses;duplicates;isolated;splitlinks;island=;data_absolute=;data_unitlength=;data_text="

sDNA sdnaprepare config: start_gs=;end_gs=;xytol=;ztol=;action=REPAIR;nearmisses;duplicates;isolated;splitlinks;island=;data_absolute=;data_unitlength=;data_text=
Loading DLL c:\Program Files (x86)\sDNA\\x64\\sdna_vs2008.dll
ERR: Traceback (most recent call last):
ERR:   File "c:\Program Files (x86)\sDNA\bin\sdnaprepare.py", line 4, in <module>
ERR:     commandline_integral_prepare("sdnaprepare")
ERR:   File "c:\Program Files (x86)\sDNA\commandline_integral_prepare.py", line 103, in commandline_integral_prepare
ERR:     dll = options.dll)
ERR:   File "c:\Program Files (x86)\sDNA\runcalculation.py", line 58, in runcalculation
ERR:     tablecollection1d = TableCollection()
ERR:   File "c:\Program Files (x86)\sDNA\sdnapy.py", line 215, in __init__
ERR:     self.dll=_dll()
ERR:   File "c:\Program Files (x86)\sDNA\sdnapy.py", line 38, in _dll
ERR:     __initialize_dll()
ERR:   File "c:\Program Files (x86)\sDNA\sdnapy.py", line 74, in __initialize_dll
ERR:     __dll_instance = windll.LoadLibrary(str(__sdna_dll_path))
ERR:   File "D:\Program Files\QGIS 2.18\apps\python27\Lib\ctypes\__init__.py", line 444, in LoadLibrary
ERR:     return self._dlltype(name)
ERR:   File "D:\Program Files\QGIS 2.18\apps\python27\Lib\ctypes\__init__.py", line 366, in __init__
ERR:     self._handle = _dlopen(self._name, mode)
ERR: WindowsError: [Error 14001] Ó¦ÓÃ³ÌÐòÎÞ·¨Æô¶¯£¬ÒòÎªÓ¦ÓÃ³ÌÐòµÄ²¢ÐÐÅäÖÃ²»ÕýÈ·¡£ÓÐ¹ØÏêÏ¸ÐÅÏ¢£¬Çë²ÎÔÄÓ¦ÓÃ³ÌÐòÊÂ¼þÈÕÖ¾£¬»òÊ¹ÓÃÃüÁîÐÐ sxstrace.exe
External command completed
ERROR: PROCESS DID NOT COMPLETE SUCCESSFULLY
Converting outputs
Loading resulting layers
Algorithm Prepare Network finished


texts: Query admin boundary from GeoNames API by lat/lon and admin level

texts:
I have a list of points (lat / lon coordinates) which represent centroids of admin boundaries for a given country and admin level, e.g. Afghanistan, admin level 1.
I need to get their GeoNames IDs (https://www.geonames.org/).

I know there is a dedicated API (https://www.geonames.org/export/web-services.html#countrysubdiv) to query admin data, but apparently it doesn't return GeoNames ID:

http://api.geonames.org/countrySubdivision?lat=47.03&lng=10.2&username=demo&level=2

This will return:

<geonames>
  <countrySubdivision>
    <countryCode>AT</countryCode>
    <countryName>Austria</countryName>
    <adminCode1>07</adminCode1>
    <adminName1>Tyrol</adminName1>
    7
    <adminCode2>706</adminCode2>
    <adminName2>Landeck</adminName2>
    <distance>0</distance>
  </countrySubdivision>
</geonames>

The question is: how can I get the GeoNames ID for a given admin level and lat/lon coordinates?


texts: How to get building elevation and levels

texts:
Is there any API or DataSet available to know the Building elevation and levels based on lat and long.
I need data for North America(USA)


texts: Is it possible to create shapefiles in ArcGIS and convert into SpatialNET?

texts: I'm looking at the prospect of working for a client who has implemented a SpatialNET solution. I have never used SpatialNET and primarily have experience with ESRI and Autodesk products. The client and Synchronoss (who owns SpatialNET) have both told me that the only solution is to purchase a SpatialNET license and VPN into their database. When I asked them about creating files in AutoCAD or ArcMap, they said it would not work. I find it hard to believe that the SpatialNET system is completely incompatible with them, especially considering that SpatialNET appears to be based off of AutoCAD. Anyone here have experience with this product?


texts: ShapeFile To GeoDatabase Conversion error

texts:
I wrote this python code and when i run it nothing happened and it's success

import arcpy

# Set environment settings
arcpy.env.workspace = 'C:/ShapeFile'

# Set local variables
inFeatures = ['New_Shapefile.shp']
outLocation = 'C:/ShapeFile/test.gdb'

# Execute TableToGeodatabase
arcpy.FeatureClassToGeodatabase_conversion(inFeatures, outLocation)


texts: Is there anything faster than cursor in ArcGIS Desktop to calculate records?

texts:
What is the most efficient (fastest) way to calculate records in a layer in ArcGIS?

Is there anything faster than the Cursor in ArcGIS?


texts:
I'm using the Python Console within QGIS 2.14.3 (MacOS). When I import matplotlib, it imports version 1.4.3 from '/Library/Python/2.7/site-packages/matplotlib-override/matplotlib/init.pyc'. I would like to update matplotlib to a newer version. How do I go about doing that so that QGIS will see it?

A related question: I have miniconda installed in a different location with matplotlib version 2.1.1. When I start python from a MacOS command line, import matplotlib imports from '.../miniconda2/lib/python2.7/site-packages/matplotlib/init.pyc'. Can I point QGIS to my miniconda install or would that be a bad idea?

I am trying to better understand how QGIS and python play together.


texts: Problems with raster to point operation in QGis 2.18.17

texts:
I tried to make points of IDW or Kriging interpolation.  From point csv-file I made .asc raster file, then I tried to make "raster value to points".At first QGIS wrote me about the error:

  ascii' codec can't encode characters in position 23-35: ordinal not in
  range(128) See log for more detail

I try to find my files and directories with names with non-English language. Then I try to write in python console:

import sys
reload(sys)
sys.setdefaultencoding('utf-8')

QGIS makes .prj file and then close "raster value to points" window without making shapefile.

Tell me please how solve this problem?


texts: Fast Offline OSM Routing Library to Replace MoNav (.NET)

texts:
I'm looking for a .NET replacement to MoNav. I'm currently calling a C++ MoNav DLL via COM and it works great--it's fast and memory efficient, and can both load itself and route across the country almost instantaneously. A pre-processed graph for a 5GB OSM file is only ~400MB, which is another plus as I do not need to distribute the source OSM files.  However, the COM dependency is a slight issue with certain customers' setups. Its turn-by-turn directions leave a lot to be desired as well.

So I was wondering if anyone knows of a .NET replacement? One that preferably used Contraction Hierarchies, has a low memory footprint, and can reliably route across the United States in under a second. That may be asking a lot, I know.

My searches have only turned up OsmSharp thus far, and while it looked promising initially, in practice the load times were abysmal for even pre-processed CH graphs (though I am still playing with it and tweaking parameters to try and resolve this).

Just wanted to know if anyone knew of a suitable replacement before I attempt to write a C++/CLI wrapper for the original MoNav library and spend a few days (weeks?) on a better turn-by-turn system. So far I haven't found one.

Thanks!


texts: Seeking free vector data on paved roads in Africa?

texts:
I have recently come across vector road data from the Africa Infrastructure Knowledge Program (http://www.infrastructureafrica.org/documents/list/roads). I found these data helpful for three reasons:

They are freely available
They cover most sub-saharan countries
Information on road surface (e.g. paved/unpaved, asphalt/gravel/earth) is available for all surveyed countries

Do these data have serious limitations, I should be aware of?

And if yes, could you recommend better data, which allow a comprehensive assessment of paved roads in Africa?


texts:
I want to use the GeoRSS from USGS, followed the a) add vector layer b) paste URL: https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_hour.geojson
and c) add

But I always get the error: "not a valid source"

I am missing something?
W10 enterprise /64bits + QGIS 3.6.0


texts: Using Phantom 3 Pro to capture aerial imagery for small site plans and derive DEM?

texts:
I am curious if this consumer UAV can be used to capture imagery for further processing to stitch seamless imagery and to use as input into stereo/photogrametry software to create reasonably accurate 3D point clouds in order to create surface models.

I have no experience with flying these crafts but am interested in obtaining one to add some extra perspective to my hobby photography.
At the same time I would like to be able to try capturing aerial imagery and extrapolating DEM for small 3D models and site plans if possible.

Can anyone share their experiences with this or the previous models using the default camera?


texts: Earth Engine Sentinel-2 atmospheric correction

texts:
I want to run some time series analysis on sentinel-2 data in EE for my master thesis. However the algorithms for Sen-2 in EE are scarce. The biggest issue is that there isn't any for atmospheric correction. I am extremely new to coding, and while I can handle myself with begginer level tasks, scripting a model-based atmospheric correction method is way out of my league.

So I am looking for a solution that would allow me to stick to EE instead of downloading huge set of images and processing them in sen2cor and in R.

So far I have considered following options:

from what I understoond, there is an option to load your own python libraries to EE (using docker??), there are python libraries for remote sensing including atmospheric correction methods so perhaps it would be possible to use one
scripting in EE code editor an automated version of DOS from Chavez (1988), the DOS correction returns suboptimal results and I would have to figure out how to automatically find the dark object value on a histogram
using this guy script for 6S correction and launching it using docker - this sounds promising but I didn't quite understand how dockers work and what they are - does using them mean the computations are done in EE or on my PC?
launching sen2cor in EE through docker - this is probably not doable on my level of experience, I've seen a topic here where a guy tried to do it and it seems it involves customizing docker environment and sen2cor to digest EE's metadata structure

Do you have any experience with Sentinel-2 in Earth Engine? What would you advice me to do?


texts: Gdal/OGR LayerMetaData not parsing its value

texts:
To start off with:

Using Gdal/Ogr compiled with Xerces to read a WFS

Reading from a WFS version 1.0.0

Compiler is QT version 5.4.1 ( C++ )

So I'm trying to get all the capabilities of a WFS via code, I'm having trouble with the hidden WFS getRequest called: WFSLayerMetaData. It gives me the elements of what I want, e.g. Title - Name - Abstract. But it will not send me the string's within these elements! I have no idea why, I've been reading the OGR doc's but nothing suggests a way of getting this data.

This is the WFS I'm trying to pull
http://demo.mapserver.org/cgi-bin/wfs?SERVICE=WFS&VERSION=1.0.0&request=GetCapabilities&

And I need to get the Spatial Spatial_Operators this WFS has as a string. In addition I need to get the Title, Name and Abstract of this WFS

<Service>
  <Name>MapServer WFS</Name>
  <Title>WMS Demo Server for MapServer</Title>
  <Abstract>
    This demonstration server showcases MapServer (www.mapserver.org) and its OGC support
  </Abstract>
  <OnlineResource>http://demo.mapserver.org/cgi-bin/wfs?</OnlineResource>
</Service>


texts: Create VRT from shapefile using a where clause

texts:
I am wondering if there is a way to create a .vrt using a shapefile, but specifying attributes through a where clause. I have made a .vrt from a sub section shapefile (pre selected the tiles and exported as a new file) using the following:

 gdalbuildvrt -tileindex fullpath output.vrt area4.shp

But I would like to not have to create new shapefiles based on selected areas, so something like:

 gdalbuildvrt -tileindex fullpath WHERE areaid = 4 output.vrt area4.shp

Any advice?


texts: No module named 'processing.core.AlgorithmProvider' in QGIS3

texts:
I am working on QGIS plugin bufferbypercentage.

# Import the PyQt and QGIS libraries
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from qgis.core import *

# Initialize Qt resources from file resources.py
from . import resources_rc  # lint:ok

# Import the code for the dialog
from .bufferbypercentagedialog import BufferByPercentageDialog

# Import the Processing libraries so we can add the algorithm to the Processing menu
from processing.core.Processing import Processing
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.parameters import ParameterVector
from processing.core.parameters import ParameterNumber
from processing.core.parameters import ParameterTableField
from processing.core.outputs import OutputVector
from processing.tools import dataobjects, vector
from processing.core.AlgorithmProvider import AlgorithmProvider

This gives me error:

  Traceback (most recent call last):   File
  "C:\PROGRA~1\SURVEY~1.0\apps\Python36\lib\code.py", line 91, in
  runcode
      exec(code, self.locals)   File "", line 1, in    File "C:/PROGRA~1/SURVEY~1.0/apps/qgis/./python\qgis\utils.py", line
  666, in _import
      mod = _builtin_import(name, globals, locals, fromlist, level) ModuleNotFoundError: No module named
  'processing.core.AlgorithmProvider'

I am testing it on qgis master 2.99

Is AlgorithmProvider removed? If yes then what is have to use.


texts:
Does anyone know how to count points within radius of another point when a time/temporal condition is met in QGIS?

I assume I need to create buffer zones, but I do not know how to then count occurrences within each buffer zone based on TIME or DATE and then export this to a csv file.

A more detailed explanation of the problem: I need to create a radius buffer zone around a fixed point (A house sale at a specific location on a specific date) and then count the number of interactions within that radius with a separate dataset (Airbnb reviews specified by date and location) - I'm looking to count the number of active Airbnb listings within a given radius of each house sale in the 12 months leading up to the sale date. I need to do this for 1,000s of sales.

I'm not sure where to start. Can QGIS solve this?


texts: If feature class is overlaped don't display its label

texts:
I've got 2 polygon feature classes, one with countries and one with sectors of the countries.
How can I prevent country labels from rendering if I have sector classes overlaping them.
So how can you stop drawing labels over other feature classes, rather then over other feature class labels.


texts: Which is the View.getResolution() units?

texts:
In OpenLayers v5, if I have a view defined like this:

var view = new View({
    center: [952014.59, 5571269.68],
    zoom: 8
});

, trying to get its resolution doing view.getResolution() outputs 611.49622628141.

How should I interpret this number?

Here is my problem: I am trying to figure out if the resolution of the view is greater/smaller than that found parsing the MaxScaleDenominator and MinScaleDenominator of this WMS. They are 500000 and 0 respectively for each layer.

However, the numbers from OL and the WMS seem to be in different units, and frankly I understand the ones coming from the WMS but not those coming from OL.

Can anybody help me understanding how should I handle this, in order to make these numbers comparable?

EDIT1

The main problem is that view.getResolution() seems to output values which are always the same regardless of the latitude.

Consider my output: 611.49622628141.

If you look at the equation presented at this link, the pixel scale (Spx) can be obtained by:

Spx = C * cos(latitude) / 2 ^ (zoomlevel + 8)

, where C is the equatorial circumference of the Earth (equal to 40075016.686 m). My zoomlevel is 8 and the latitude assumed by OL seems always 0 (equator). Indeed, if you do the calculations, you'll obtain eaxctly 611.49622628141.

So I guess that I should not trust the output from view.getResolution() to make my comparison, am I wrong? If I am not, this would be a good reason not to close this question, as it has very much to do with this specific method.

EDIT2

By the way, as far as I understand, following the answer in the duplicated question linked (making adjustment as per last comment (cm to m missing conversion), I am finally able to calculate the scale I needed from the view.getResolution() output, but the doubts I had (see EDIT1) still remain unsoved.

My calculation led me to:

map scale =
    pixel resolution (as per view.getResolution()) / screen distance per pixel (in meters) =
  611,49622628141 /   0,00028 =
    2183915

, so approximately 1:2 millions.

My doubt if .getResolution() output is accurate for any projection/latitude/(map size?) still is there...


texts: Switch classes on/off within shapefile in QGIS 1.8

texts:
Hei!

I got shapefile with 1800 points. They are classified by attribute in 10 classes. How can I display only 1 or 2 classes (like - switch on/off layer)?

It seems quite usual function, but I couldnt find such option in QGIS. The only solution witch I could figure out, is to make 10 different shapefiles for each class.

Thanks!


texts: Creating proportional symbol map in ArcMap based on two different layers (polygon and points) using ArcGIS Desktop?

texts:
I am using ArcGIS and I have a shapefile of Mongolia soums (equivalent to counties), and for each soum there is a sample size attribute associated with it. However, I also have a list of five cities with lat/lon; those cities also have a sample size attribute.

I want to create a proportional symbol map based on the sample size of both the soums and the cities, but I don't know how to combine points and polygons and draw proportional symbols collectively.  I don't really have a way to join these two datasets since they don't have anything in common. Is there a good way to do this?

An alternative I have is to create shapefiles for these cities, but I suppose that would be even more difficult?

For example, the CSV file is an example data:

I want to create a circle on top of each entry (either city or soum), the circle size represents the sample size column.  I have a set of shapefiles that are all the Soums, but there are a coupe of entries that are cities instead of Soums, I have the lat/lon but not a polygon, how would I do it in ArcGIS so that I can make a proportional symbol map with the following data?

As an example output, I would like something as the following, except that it's Mongolia and that the symbols are drawn based on both polygons and city coordinates in ArcGIS


texts: QGIS add CSV - only shows 2 points on map

texts:
When I add a delimited text file to QGIS, only two points show up (but there are 122 points in the attribute table). I've seen answers to this question here and here, but neither solved my issue.

Here's my process:

Start with Excel spreadsheet (I'm working on a Mac) and save as a Windows CSV.
In QGIS, add delimited text file. Select "CSV" as file format and point coordinates (lat and long columns in spreadsheet). Choose WGS1984 as CRS.
See screenshot for result- only two points show up, even though the attribute table shows the full dataset.

I've tried exporting the file as a shapefile, saving the CSV in different formats before importing it, and watching tutorials to make sure I'm doing everything correctly, to no avail. I have had this issue before, and could never solve it. Any feedback would be great. I'm using QGIS v. 2.12.


texts: Find the length of a road inside a polygon and a buffer

texts:
I'm a bit new to ArcMap but know the basics.
I have to find the lenght of roads(lines) innside my polgon and the buffer innside the polygon and the area the buffer is created around.
have one layer for roads for the entire map. Created two intersections, one for roads + my polygon and the buffer, the other for roads + polygon and the area i created my buffer around. By editing their symbols i can now see the roads. In the atribrute table "LENGHT" does not show the lenght of the roads, but some other values (loads of them have 1-2-3-4 identicals).
By clickin OBJECT TYPE for "roads" in the intersect layers, and calculate geometry, i get the lenght numbers, but i find no way to summarize them. The summarize option only gives a new table with the same numbers, and the statistic field is grey. I can use the "ruler tool", but thats quite heavy, since there is 174 road-pieces.
Any tips? how to proceed, should i not use intercet?


texts: Solar radiation analysis in ArcGIS (shade)?

texts: I was wondering whether the Area solar radiation tool in ArcGIS takes into account the effect of shadow by the topographic surrounding terrain. Besides, is there a way to undo this effect, so I can calculate the solar radiation reduction (%) due to topographic shadow for a certain DEM?


texts: Can't select geometry from Oracle DB using SQL

texts:
I'm trying to select the geometry field from an ArcSDE feature class in an Oracle 11g database (inside of a Python script via PyODBC). This is my query:

SELECT SHAPE FROM USR.FEAT_CLASS

This is giving me error ORA-24359: OCIDefineObject not invoked for a Object type or Reference, and I get the same for any other feature class. If I select another non-geometry field the query works fine, so I know it isn't a problem with the script or connection string. Has anyone else encountered this problem?

UPDATE:
I have ArcGIS 9.3.1 installed locally but I'm not using it here, so I don't think that's playing a role. I'm not sure which version of ArcSDE is installed since I don't have regular access to the server, but I believe it's 9.3.1 as well. The Python script is using PyODBC to communicate directly with the Oracle server.


texts: Create Layer of pixels with value higher than 0.3

texts:
I have code that suppose to calculte NDVI and calssify it according to the NDVI value.
I have tried to add a function that will create for me a new layer that will have only pixels with value higher than 0.3 but for some reason nothing happend.

This is my function:

//////try to create layers with the pixels in red
var PixelsCounLayers = listOfImages.map(function(img){
  var imageNDVI=image.select('NDVI');
  var grt03=imageNDVI.gt(0.3).selfMask().rename('0.3');
  var grt05=imageNDVI.gt(0.5).selfMask().rename('0.5');
  var grt07=imageNDVI.gt(0.7).selfMask().rename('0.7');

return image.set('grt03', grt03).set('grt05',grt05).set('grt07', grt07);
});

I have also tries another version:

for (var i in listOfNumbers){
  var imageNDVI=image.select('NDVI');
  var hotspot=imageNDVI.gt(0.3)
  .selfMask()
  .rename('hotspot03');
Map.addLayer(hotspot,{palette: 'FF0000'},i);}

But I have gotten error:

  0: Layer error: Image.select: Pattern 'NDVI' did not match any bands.

and this is link to the full code:
https://code.earthengine.google.com/f1b79ba01d16ebc343a35af8482f542d

I used the polygon of Osaka but you can use whatever polygon you want.

My end goal: to create and display new layer that contains only pixels with value higher than 0.3


texts: Extracting contour lines from ortophoto map

texts:
I am quite new to QGIS and need some help with this.

Basically I have the coordinates of a piece of land which I can find both through Google Earth and my country's mapping service website. I downloaded a .ECW file with an (raster) orthophotomap from the grid of rectangles of the country where  the property is located.
After this, I load this orthophoto as a raster layer and try to extract the piece of the map/aerial photo that actually contains the property by using Raster->Extract->Clipper.
The result I get here though is not a clipped portion of the original map because QGIS issues an error message which I do not understand why nor what to do about (see attached image), so I can't do the following step to extract the actual contours.

The coordinates that are used are directly input from the image in QGIS by dragging the cursor on the picture, so do not understand why the message about a negative width or hight.
Can anyone help?


texts: geopandas GeoDataFrame.to_postgis is showing AttributeError: 'GeoDataFrame' object has no attribute 'to_postgis'

texts:
I have this geopandas geodataframe which I want to write in the postgis/postgreSQL database.
I have followed the steps as shown here by the geopandas docs
https://geopandas.readthedocs.io/en/latest/docs/reference/api/geopandas.GeoDataFrame.to_postgis.html
I have the required library installed viz: SQLAlchemy, GeoAlchemy2, and psycopg2 (PostgreSQL Python driver)
But I am getting this error:

AttributeError: 'GeoDataFrame' object has no attribute 'to_postgis'

If somebody knows then, Please tell, how to rectify this.
Or what are the other methods to write/export the spatial data/geopandas data/ ESRI shapefile data to postgreSQL database?
The geodataframe was already written above this codeblock which I want to write in postgreSQL.
The code is as follows:
from sqlalchemy import create_engine

from geoalchemy2 import Geometry, WKTElement

import pandas as pd

import psycopg2

import geopandas as gpd

engine = create_engine('postgresql://postgres:imd123#@localhost:5432/abhilash')

shapefile_gdf_final.to_postgis(con=engine, name="table_name")


texts:
I’d like to use PROJ4J to project wgs84 lat lons to the Equal-Area Scalable Earth (EASE) 2.0 Grid.

It seems the EASE 2.0 grid uses the Behrmann projection which is just an Cylindrical equal-area projection that uses a 30 degree standard latitude.

with the following code:

final String paramString = "+proj=cea +lon_0=0 +lat_ts=30 +x_0=0 +y_0=0 +datum=WGS84 +ellps=WGS84 +units=m +no_defs";
CoordinateReferenceSystem crs = csFactory.createFromParameters("MyEase", paramString);

I get the following exception which I don’t know how to fix, other paramStrings do work for me:

[java] java.lang.IllegalAccessException: Class org.osgeo.proj4j.Registry can not access a member of class org.osgeo.proj4j.proj.Projection with modifiers "protected"

And with the following approach:

CylindricalEqualAreaProjection ceq = new CylindricalEqualAreaProjection(0, 0, 30);
ProjCoordinate input = new ProjCoordinate(-71.006, 42.363); // Boston Airport
ProjCoordinate result = new ProjCoordinate();
ceq.project(input, result);
String resultString = ProjectionUtil.toString(result);
System.out.println(result);

I get a result (-1217895, 27830839) but  when I overlay it in Arcmap on a layer/dataframe in the “World_Behrmann WKID: 54017 Authority: ESRI” it is way off the world map.

Lastly, if I change all the parameters to 0 in the construction of the projection this should result in the Lambert Cylindrical Equal-Area Projection.  When I project my coordinate and overlay it in Arcmap on layer/dataframe in the “World_Cylindrical_Equal_Area WKID: 54034 Authority: ESRI” projection the location appears about  17 km to the north east of the true location.

Any suggestions on how to get this working in proj4j or some other java based solutions?

Visit http://en.wikipedia.org/wiki/Cylindrical_equal-area_projection

Visit http://nsidc.org/data/ease/versions.html


texts: Merge same name shapefile of different folders

texts:
How to merge shapefiles of same name?

I have 100 folders and each folder has 100 shapefiles with the same name.  I need to merge all "school.shp" of each folder to one shapefile

I'm using ArcGIS 10.5, and I'm new to ArcGIS.


texts:
I have QGIS Server up and running and can successfully load WMS layers back into QGIS. I am attempting to set up the QGIS Web Client. Procedure: https://github.com/qgis/qgis-web-client

I am having difficulties with the install.

I run:

  cd /etc/apache2/sites-available/
  ln -s <path to apache-conf/qgis-web-client.conf> .
  sudo a2enmod rewrite
  sudo a2ensite qgis-web-client.conf
  sudo /etc/init.d/apache2 reloadad

My whole Apache server seems to die, WMS layers stop working through QGIS and localhost in browser brings up "Unable to connect".

qgis-web-client.conf file looks like this:

<VirtualHost *:80>
  ServerAdmin webmaster@localhost
  # Add an entry to your /etc/hosts file for qgis-web-client.localhost e.g.
  # 127.0.0.1 qgis-web-client.localhost
  ServerName localhost

  DocumentRoot /home/ben/qgis-web-client/site
  <Directory />
    Options FollowSymLinks
    AllowOverride None
  </Directory>
  <Directory /home/ben/qgis-web-client/site/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
  </Directory>

  ScriptAlias /cgi-bin/ /home/ben/qgis-web-client/cgi-bin/
  <Directory "/home/ben/qgis-web-client/cgi-bin/">
    AllowOverride None
    Options +ExecCGI -MultiViews -SymLinksIfOwnerMatch
    Order allow,deny
    Allow from all
    #Uncomment the next line to enable logging to a file
    #SetEnv QGIS_LOG_FILE /tmp/qgislog.txt
  </Directory>

  # optional rewrite rules

  # Forbid direct access
#  RewriteRule ^/cgi-bin/.*$ - [F]

  # Search with SearchPanel

  # sample search on layer 'Hello'
  RewriteCond %{QUERY_STRING} ^(?:.*)query=samplesearch&*(?:.*)$
  RewriteCond %{QUERY_STRING} ^(?:(?:.*)&)?colour=([^&]*)(?:.*)$
  RewriteRule ^/wms/(.+)$ /cgi-bin/qgis_mapserv.fcgi?map=/<path-to-qgis-server-projects>/$1.qgs&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&LAYERS=Hello&QUERY_LAYERS=Hello&FEATURE_COUNT=20&INFO_FORMAT=text/xml&SRS=EPSG:4326&FILTER=Hello:"colour"\ =\ '%1' [PT]

  # Rewrite /wms/mapname to qgis_mapserv.fcgi?map=/<path-to-qgis-server-projects>/mapname.qgs
  RewriteRule ^/wms/(.+)$ /cgi-bin/qgis_mapserv.fcgi?map=/<path-to-qgis-server-projects>/$1.qgs [QSA,PT]
  # Rewrite /maps/mapname to qgis-web-client main page. mapname will be extracted for wms calls in Javascript code.
  RewriteRule ^/maps/([^\.]+)$ /qgis-web-client/site/qgiswebclient.html [PT]
  # Rewrite /maps/* to qgis-web-client/site (e.g. /maps/gis_icons/mActionZoomNext.png -> /qgis-web-client/site/gis_icons/mActionZoomNext.png)
  RewriteRule ^/maps/(.*) /qgis-web-client/site/$1 [PT]

  ErrorLog ${APACHE_LOG_DIR}/qgis-web-client-error.log
  CustomLog ${APACHE_LOG_DIR}/qgis-web-client-access.log combined

</VirtualHost>

I tried editing my host file as line 3 suggests but it makes no difference.

Removing the symlink to qgis-web-client.conf repairs apache and server starts working again.

In addition, when it asks

  Check the QGIS libs are in your /etc/ld.so.conf path

I don't really know what I am checking. A little more info here would be great.


texts:
I am looking for a solution to connect a GPS-device on a COM-Port in QGIS 3 using Python. The GPS is working in the QGIS 3 GPS Gui as it should. As there are many changes between QGIS 2 and 3 the examples of accessing a GPS device with Python in QGIS 2 ( Connect / Disconnect GPS device via PyQGIS ) are not working for QGIS 3 anymore.

Examples of working code using the different GPS-classes form QGIS 3 are not available.

Using

from qgis.core import *
QgsGpsDetector.availablePorts()

results in a list of the available ports like:

[('internalGPS', 'Interes GPS'), ('localhost:2947:', 'Lokaler GPSD'), ('COM1', 'COM1: Kommunikationsanschluss'), ('COM6', 'COM6: Standardmäßgige Seriell-über-Bluetooth-Verbindung'), ('COM5', 'COM5: Standardmäßgige Seriell-über-Bluetooth-Verbindung'), ('COM4', 'COM4: ')]

By looking at the API at https://qgis.org/pyqgis/3.0/core/Gps/QgsGpsConnection.html the QgsGpsConnection should be the way to go. In QGIS 3 it is not possible to use a string for the port using QgsGpsConnection. It has to be QIODevice.
So I tried using

from qgis.core import *
from PyQt5.QtSerialPort import QSerialPort
port = QSerialPort("COM5")
QgsGpsConnection(port)

At this point I am stuck.
I used several ways of QgsGpsConnection() like

QgsGpsConnnection.connect(port)

con = QgsGpsConnection(port)
con.connect()

but I always recieve an TypeError: qgis._core.QgsGpsConnection represents a C++ abstract class and cannot be instantiated .

As I am new to Python in QGIS I do not know how to go on. My goal is to access the XY-Position and the accuracy of the signal.


texts: Read Qgis project entry without reading whole project

texts:
I'm trying to read only specific entries from qgis project in my qgis server plugin but the problem is that, the projects i'm reading from are usually big, with data from various different sources, loaded over vpn. Loading project from desktop takes few minutes. I need to read only specific entries from properties section.

Is it possible to read only properties without calling read method on QgsProject instance?

I think that read method causes reading all the data sources, which is opposite to what i want to achieve. I know that i could read project as plain xml file but still it would be nice to use qgis for that.


texts: Dynamic query to show XY coordinates as values in columns (FGDB)

texts:
I have a point FC in a file geodatabase.
I want to create a feature layer on the FC that has columns that show the X & Y coordinates of the geometry.
The values in the query would be dynamic; they would change if the underlying data in the FC was edited.

The result would be similar to what can be done with a query layer on
an enterprise/st_geometry geodatabase table—but for a file
geodatabase:
select
    p.*,
    sde.st_x(p.shape) as x,
    sde.st_y(p.shape) as y
from
    points p

Yes, I'm aware that we can't use SQL to access the geometry of a FGDB FC. I'm just using this as an example to demonstrate the functionality that I'm looking for.

Is it possible to do this for FGDB FCs in ArcGIS Desktop 10.7.1 or ArcGIS Pro (any version)?


texts: OL3 gwc background layer does not align to gridset, works in OL2

texts:
I'm using GeoServer 2.10.1 and its built-in GeoWebCache and am trying to use a cached background layer in a custom gridset with a local epsg to work in a simple Ol3 app:
proj4.defs("EPSG:3010","+proj=tmerc +lat_0=0 +lon_0=16.5 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +axis=neu +no_defs");

var projection = new ol.proj.Projection({
    code: 'EPSG:3010',
    extent: [-2138120,3880750,2396422,8973750] //Matches GWC gridset
  });

var wmsSource = new ol.source.TileWMS({
    url: 'http.../geoserver/wms',
    projection: 'EPSG:3010',
    params: {'LAYERS': 'basemap', 'tiled': true, 'version':'1.1.1'}
  });

var wmsLayer = new ol.layer.Tile({
    source: wmsSource
  });

var view = new ol.View({
  resolutions: [4200,1399.9999999999998,560,140,55.9999999999999,27.99999999999996..], //Matching GWC gridset
  center: [151423.169, 6908747.899],
  extent: [-2138120,3880750,2396422,8973750],
  zoom: 1,
  projection: projection
  });

var map = new ol.Map({
  layers: [wmsLayer],
  target: 'map',
  view: view
  });

This produces a map with a fuzzy, "zoomed out" look at every zoom level (but the tiles returned actually look good and view.getResolution reports the correct resolution). GWC says "does not align to gridset" for every getMap.
If I let OL calculate the zoom levels the base map looks fine.
If I use
url: 'http...geoserver/gwc/service/wms'

instead I get http 400 bad request on the getMap requests.
The base layer is used as a background map in an ol2 app defined in the same way, i.e extent and a series of resolutions, and it works well.
What is required in OL3 to make use of a cached background layer?


texts: How to extract impervious areas from Landsat data?

texts:
I'm working with multi-temporal datasets from Landsat (Landsat 8 & Landsat 7 & Landsat 5) and I tried to extract impervious areas, more exactly urban areas, but I can't obtained results very close to reality (accuracy was approximately 80 % by using reference point in Google Earth).
I used supervised  classification: SAM & Maximum Likelihood, then logical classification (between SAVI + MNDWI + NDBI) but I can't obtained very good results. I used bands: Red, Green, Blue, NIR, MIR, SWIR 2.
How I can extract urban areas from different Landsat image? What methods would you me recommend ?


texts: QGIS error when importing .asc LIDAR data

texts:
First let me say that I am novice in GIS department. As archaeologist I had only some courses 8 years back when i was still studying.

Now, the problem:

When I try to import .asc as raster layer I get this message:

  ngridded dataset: At line 3, X spacing was 0.000000. Expected >0 value

I know this is a problem because "Cells with same Y coordinates must be placed on consecutive lines"

But my format viewed in Notepad++ is like this:

426000.78;55000.15;562.24
426000.78;55001.15;562.22
426000.78;55002.15;562.20
426000.78;55003.15;562.30
426000.78;55004.15;562.21
426000.78;55005.15;562.21
426000.78;55006.15;562.27

And my question - How do I change it to readable format. Any quick solutions?


texts: I wonder if there is a way for me to access the google traffic in my Earth Engine code so it shows up on my map? I've only seen pure javascript which I don't know how to implement in Earth engine.


texts: Include Python Script with ArcObjects Addin

texts:
I'm building addin for 10.1 and need a method (ConvertToMSD) that's only available in ArcPY. I've figured out out how to execute a python script from an ArcObjects addin:

Calling arcpy/python from .NET?

Now I want to figure out how to include that Python script within in build addin. If it's not included in the addin then I have to tell the user to download the Python script and go drop it in folder x/y/z which isn't very user friendly.

Is this possible?


texts: How to add Google,Bing map layer as a Base map in uDig?

texts:
I'm working on uDig, a Desktop GIS Viewer. Which is fantastic except, I can't add Google or Bing Mapping services to my application.

I searched through their(uDig's) mailing list and found reply which says it's the issue of Licencing! But I personally think that if other GIS viewers like QGIS can provide such functionality, then why it's not available for uDig.

Well if anyone have any kind of trace regarding this issue then please help me out. Even any useful guidelines regarding the new plugins development which will able add the Google map as base layer are also much appreciated.

Thanks in Advance.


texts: Installing QGIS Server 3.4 on Windows 10

texts:
I'm trying to install QGis Server 3.4 on Windows. Apache says "500 Internal Server error" and if I execute qgis_mapserv.fcgi.exe, I get this:

(something along the way "can't find entry point for procedure foo in dll bar")

I installed it via OSGeo4W, selecting Desktop->qgis-ltr v3.10.3-1 (which fires up nicely), Libs->fcgi v2.4.1-2, and Web->qgis-ltr-server v3.4.15-1

In case it's some use, here's my PATH:
C:\OSGeo4W64\bin;C:\OSGeo4W64\apps\qgis-ltr\bin;C:\OSGeo4W64\apps\grass\grass78\lib;C:\OSGeo4W64\apps\grass\grass78\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\WBem;c:\OSGeo4W64\apps\qt5\bin. Those grass references are about and old QGis Server 2.18 installation, which I totally wiped.


texts: OpenLayers: How to shift zoom level content for ol/sourceXYZ about one zoom level

texts:
The Swisstopo WMTS service assigns specific raster map content to specific zoom levels:

....
16: 1:25'000 Raster map
15: 1:50'000 Raster map
14: 1:100'000 Raster map
....

Here is a code example.
Compared to other map source the result is an extremely inflated map content. Just compare the font size of text contained in these maps: Swisstopo to IGN.
How can I load the Swisstopo ol/sourceXYZ by shifting the content about one zoom level? The result would be then:

....
17: 1:25'000
16: 1:50'000
15: 1:100'000
....


texts: Adding attribute table into layout with PyQGIS 3

texts:
According to the latest official QGIS 3.X API reference there is a class that should insert attribute table of a layer. I tried to do it, but got an error.
Here is a piece of code I used:
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from qgis.core import *
from qgis.gui import *

project = QgsProject.instance()
manager = project.layoutManager()
layout = QgsPrintLayout(project)
layout.initializeDefaults()
layout.setName('console')
manager.addLayout(layout)
itemMap = QgsLayoutItemMap.create(layout)
tbl = QgsLayoutItemAttributeTable.create(layout)
layer_attr =  QgsProject.instance().mapLayersByName(u'buildings')[0]
tbl.setVectorLayer(layer_attr)
layout.addLayoutItem(tbl)

And after the last line I get an error

TypeError: QgsLayout.addLayoutItem(): argument 1 has unexpected type
'QgsLayoutItemAttributeTable'

Can't understand why it is happening because QgsLayoutItemAttributeTable logically should be supported by layout methods.
Main things in my code were taken from this question.


texts: Import Time-Dependent Raster Pyramid into Geoserver

texts: I have a set of geotiffs (think Landsat for example). I want to create a tile server that shows landsat's footprint overtime. How do I import these geotiffs, so as to create a time dependent WMTS with geoserver? Ideally, I would like to make a WMTS similar to https://wiki.earthdata.nasa.gov/display/GIBS/GIBS+API+for+Developers .