texts: Combining big set of layers with npm+webpack and OpenLayers

texts:
I have a really big set of layers in OpenLayers 5.
I wonder how to split large source files into smaller sets and combine it via webpack.

style.js file about 30 items e.g.:

var s_al_timeout = function(feature, resolution) {
    var fGet = parseFloat(feature.get('last_read_timeout'));
    ...
            text: new ol.style.Text({
                   ...
            })
        })];
  },

vector source.js file about 30 items e.g.:

var vS_alarm_timeout = new ol.source.Vector({
    loader: function(extent) {
        $.ajax('/wfs_ant',{
            type: 'GET',
            data: {
                service: 'WFS',
                ...
                bbox: extent.join(',') + ',EPSG:3857'
                },
            }).done(ldFe_alarm_timeout);
        },
        strategy: ol.loadingstrategy.bbox
    });
var ldFe_alarm_timeout = function(response) {
    formatWFS = new ol.format.WFS();
    fT_alarm_timeout = formatWFS.readFeatures(response);
    vS_alarm_timeout.addFeatures(fT_alarm_timeout);
  };
function refresh_alarm_timeout(){
    vS_alarm_timeout.clear(true);
    vS_alarm_timeout.addFeatures(fT_alarm_timeout);
}

And how to use $.ajax loader in webpack?
(Loading jquery, good tutorial for ajax:
https://alexomara.com/blog/webpack-and-jquery-include-only-the-parts-you-need/)

Popup file also many lines code.
Basic code file (combine map and layers with source vector and style file).

I try with npm and webpack but I don't know how to import these smaller files...
I seek tips or examples.

Trying split code into: ./script/source.js + ./script/style.js

in main.js:

require ('./scripts/source');
require ('./scripts/style');

and in webpack.config.js add: entry: ['./main.js', './scripts/source.js', './scripts/style.js']

But no luck Uncaught ReferenceError: vS_alarm_timeout is not defined
and vS_alarm_timeout is name of the source layer in main.js.


texts: Openalayers : How to know map container id's from map object

texts:
After rendering multiple maps using openlayers , I want check which map is in which div .

 if (!this.previewMapLoaded) {
      this.mapService.loadMap('previewmap', 'preview', extent);

  if (!this.mainMapLoaded) {
      this.mapService.loadMap('mainmap', extent);

is there any method like ,

this.map.getContainer()

or something similar to this ?


texts: OpenLayers - Weird behaviour when a feature is zoomed in

texts: The problem is when I zoom on a feature inside OpenLayers with any browsers, at a certain zoom level the feature flip like you can see in those pictures


texts:
I am trying to use Custom regions (other than country, province or city boundaries - see picture below) to display data from Excel sheet on map using Excel 3D Maps (Excel 2016). I always successfully import small size (3 regions) SHP or KML file (I tried both). However, I cannot find how to use these imported custom region to display my data on the excel sheet.

I tried to google the answer in many forums, but mostly they refer to this link - https://docs.com/james-marshall/6909/custom-regions-walkthrough which is not working any longer.
Do you know how can I used imported custom regions to display my data in Excel 3D Maps?


texts: Why does the Clipper tool lack the mask layer option?

texts:
Fairly new at QGIS, but everything's gone well so far.

I'm running QGIS version 1.8 on a Mac (OSX 10.8) and GDAL 1.10, and other GDAL tools (like Merge and Georeferencer) work just fine.

When I try to use the Clipper tool to clip a raster image using a vector shp file, I don't see the dialog options that are shown on various forums (for example, here). There is no "No data value" control and under Clipping Mode I just have the option to clip to a rectangular extent. What am I doing wrong?


texts: Expression to calculate and sort data from several layers into one layer

texts:
I am trying to develop an expression whereby one layer can add data from 2 other layers and then rank them, is this possible? I have also tried the problem with using just 1 layer but I cannot work out an expression.

Example: I have 3 layers called "Tech", "Pol" and "Rank". All 3 layers contain a column 'Area' which has fields listing areas of a country. "Tech" and "Pol" both contain an integer column called 'T_col' and 'P_col' respectively and have fields containing data.

Problem: I would like the "Rank" column to add the fields in 'T_col' and 'P_col' and then sorting the order from least to most.

It's coming up with an expression that's confusing me, I don't know if it's possible to calculate data from other layers, hence why I don't mind using just the one.

I have created one layer with this columns and used the Expression String Builder to add up the 2 columns from "Tech" and "Pol". However, I am unsure as to how to include the result into the "rank" column. I tried using a simple code which is not recognised:

"rank" = "T_col" + "P_col"


texts: Units for radius in nn2() in RANN package

texts:
I am using the nn2() function within the RANN package to find nearest neighbors,  within a specific radius, of points identified by latitudes and longitudes.

What unit is that radius measured in?

I have looked in the RANN and ANN documentation but have not found the answer. An example using a subset of my coordinates in copied below.

------------------------ Example ------------------------------

    library("RANN")
    > #Data contains longitude and latitudes of points
    >   long<-c(-0.12541369, -0.06148541, -0.10533759, -0.06067756, -0.13908847)
    >   lat<-c(51.51735, 51.49540, 51.53120, 51.54869, 51.51602)
    >
    >   data<-cbind(long,lat)
    >
    >   #Setting radius
    >   #Here is my question -- what is the unit of radius?
    >   radius<-.05
    >
    >   #Identifying neighbors
    >   res <- nn2(data, k=nrow(data), searchtype="radius", radius = radius)
    >
    >   #Counts of neighbors
    >   count <- cbind(data,rowSums(res$nn.idx > 0) - 1)
    >
    >   #View output
    >   colnames(count)[3]<-"nn_count"
    >   head(count)
        long      lat nn_count
    [1,] -0.12541369 51.51735        2
    [2,] -0.06148541 51.49540        0
    [3,] -0.10533759 51.53120        3
    [4,] -0.06067756 51.54869        1
    [5,] -0.13908847 51.51602        2


texts: Order members of OSM multipolygon relations

texts:
Im writing an importer for OSM files. Now i'm importing the relations with multipolygoins.

The documentation says

The order of the relation members does not matter (but properly sorted member lists can help human editors to verify completeness).

Is there a pre defined algorithm to find the ways which form one closed polygon? Preferably in java


texts: Display longitude and latitude lines in CartoDb?

texts: I just started using CartoDb to develop some maps for my classroom.  I want to have it show longitude and latitude lines so I can give my students coordinates and have them plot them.  how do I set those to display?


texts: How to use the Tile Server to fetch latitude/longitude data

texts:
I have installed a tile server using the following link and my main purpose was to geocode as many times as possible. Initially I was using openstreet API to geocode but they have certain limits so they suggested me to build my own server. In my current server I have loaded the California data into PostgreSQL server and now want to use it as a geocoder. If you see their server running process :

  Testing your tileserver

  Now that everything is installed, set-up and loaded, you can start up
  your tile server and hopefully everything is working. We’ll run it
  interactively first, just to make sure that everything’s working
  properly. Remember to substitute your username again:

  sudo mkdir /var/run/renderd

  sudo chown username /var/run/renderd

  sudo -u username renderd -f -c /usr/local/etc/renderd.conf
  and on a different session:

  service apache2 reload

My server is also running without any error as you can see in the below picture.

How can I use it to extract latitude and longitude of my addresses?

There is no information regarding this on the link. My database contains the following table here and data is loaded. I want to extract latitude/longitude from it and pass as many queries as possible.

            List of relations
 Schema |        Name        | Type  |   Owner
  --------+--------------------+-------+------------
 public | planet_osm_line    | table | openstreet
 public | planet_osm_nodes   | table | openstreet
 public | planet_osm_point   | table | openstreet
 public | planet_osm_polygon | table | openstreet
 public | planet_osm_rels    | table | openstreet
 public | planet_osm_roads   | table | openstreet
 public | planet_osm_ways    | table | openstreet
 public | spatial_ref_sys    | table | openstreet


texts: QGIS error when open project when layer via accesses the database

texts:
I changed from QGIS 1.7.3 to 1.8.0. Problem is that I can´t open QGIS Projects, QGIS crashes when there are layers involved loaded via access-database connection. I used eVis.
What can I do?


texts: How do I merge two columns into one column steps?

texts:
When I save the table after I set up the classifcation and then ArcGIS save it as a INFO file and then you have two columns that you want to merge into one. Is there a better way to do that ? What I want to get the columns from FROM and TO merge into One column. These are the feet Elevation numbers.

Here is the screenshot


texts: Unable to library "rgdal" and "gdalUtils" after upgrading to macOS big sur

texts:
I just upgraded my laptop to macOS big sur, but then I could not library "rgdal" and "gdalUtils". It threw me an error:

Error: package or namespace load failed for ‘rgdal’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Library/Frameworks/R.framework/Versions/4.0/Resources/library/rgdal/libs/rgdal.so':
dlopen(/Library/Frameworks/R.framework/Versions/4.0/Resources/library/rgdal/libs/rgdal.so, 6): Library not loaded: /usr/lib/libpq.5.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/4.0/Resources/library/rgdal/libs/rgdal.so
Reason: image not found

It worked well under Catalina but not big sur.
Would anyone help me?


texts:
I am creating an app in Android that requires cached areas. I allow the user to cache an area of reasonable size. The server provides these tiles in a zip in the format /z/x/y.png.

I took a (very) naive approach and simply wrote a python script to grab the images from the localhost using apache2 with mod_tile (127.0.0.1/osm/z/x/y.png), save to a directory, then zip.

Under a load test, this failed terribly. Is there a more efficient way to create the png files locally? (Mapnik api and python?) Or is a queue for users an absolute necessity to prevent server overload?


texts: How to Draw an Arrow between 2 point for ARCGIS ANDROID?

texts:
I want to develop an android app where i need to draw a arrow line between 2 point.
I know how to draw a line between 2 point.
But can't get any idea to draw an arrow for the same.

private void drawPolylineOrPolygon(Point p1,Point p2) {
    Graphic graphic;
    MultiPath multipath = new Polyline();

    // Create and add graphics layer if it doesn't already exist
    if (graphicsLayer == null) {
        graphicsLayer = new GraphicsLayer();
        mapView.addLayer(graphicsLayer);
    }

    mPoints.add(p1);
    mPoints.add(p2);
    if (mPoints.size() > 0) {
        multipath.startPath(mPoints.get(0));
        for (int i = 1; i < mPoints.size(); i++) {
            multipath.lineTo(mPoints.get(i));
        }
        graphic = new Graphic(multipath, new SimpleLineSymbol(Color.BLACK, 4));
        graphicsLayer.addGraphic(graphic);
    }
}


texts: Reliably printing messages in ArcMap Python Console?

texts:
When finding a solution to a problem by exploratory programming in a REPL I find it very useful to use print statements to build a log and provide insights into application state and flow.

Unfortunately ArcMap's Python Console seems to go silent after calling some of the geoprocessing tools.

For example:

>>> print("test 1")
... arcpy.ExcelToTable_conversion(source_path, target_sheet, source_sheet)
... print("test 2")
...
test 1
>>>

While if I remove the call to the Excel To Table tool:

>>> print("test 1")
... pass
... print("test 2")
...
test 1
test 2

How can I reliably print to the console or otherwise work around this issue?

I am running:

ArcGIS Desktop 10.3.1.4959

I have read the following QAs on print or messaging in ArcPy but haven't found one that matches the use case of using the Python Console:

Getting print statements in Python script to print through a batch file
Viewing print text while running a script in ArcMap


texts: Convert a 2D list of numbers to a ImageCollection with constant values in Google Earth Engine

texts:
I have climate indices values as lists and I tried to make the lists into an imageCollection.
However, when I tried to use map function,
var climate_indices =  ee.ImageCollection.fromImages(
  years.map(function (y) {
    return months.map(function(m) {
      var monthID = m;
      var yearID = y;

      var dmiImage = ee.Image(dmi.get([yearID-2000,monthID-1])).rename('dmi').float();
      var meiImage = ee.Image(mei.get([yearID-2000,monthID-1])).rename('mei').float();
      var pdoImage = ee.Image(pdo.get([yearID-2000,monthID-1])).rename('pdo').float();

      var w = dmiImage.addBands(meiImage).addBands(pdoImage);
      return w.set('year', y)
              .set('month', m)
              .set('system:time_start', ee.Date.fromYMD(y, m, 1));

    });
  }).flatten()
);
print(climate_indices)

The system report:

"Array.get: Element 0 of list 'position' must not be null."

It seems that the m or y here is seen as Null.
Anyone could help with that?
https://code.earthengine.google.com/41c17638e32ab0d2c922f46ffb215ef6


texts: I have a kml file generated dynamically that I can view in google earth no problem. It shows a route for a journey. Is there a way to make this more 'printer friendly' so that I can print this of for driving on a road?


texts: ArcGIS, Edit Layer Extents with Python script

texts:
I would like to read and edit the Extent Values of each Layer in a MXD-file.

My code:

import arcpy

mxd = arcpy.mapping.MapDocument(r"D:\Work\myInFile.mxd")

for lyr in arcpy.mapping.ListLayers(mxd):

    if lyr.isFeatureLayer:

         # read
         print lyr.getExtent

         # write
         lyr.getExtent = ({XMin}, {YMin}, {XMax}, {YMax})

mxd.saveACopy(r"D:\Work\myOutFile.mxd")
del mxd

The getExtent method is described here But I'm not sure whether this is in any way the correct method.


texts: QGIS - Creating a new polygon layer from the space between other layers

texts:
I wonder if it´s possible with QGIS (2.18) to create a new polygon shapefile directly from the space between Another 2 different polygon layers:

What I would like to do is to fill the gap between the two layers with a feature of a third (new) polygon shapefile. It can be done digitalizing the borders, but If there is a way to do it automatically, I could save a lot of time.


texts: How to use centroid option in Field Calculator in QGis

texts: I want to use Centroid option in field calculator in QGis .How to access it?


texts: Calculating apportionment on the client-side in JavaScript map?

texts:
I have a set of census polygons (P1... P4) containing population information, and I'm building a tool using the ArcGIS Server JavaScript API whereby the user can draw an arbitrary shape:

I need to estimate the population of the arbitrary shape, by apportioning the values from the census polygons (no weighting is required, so it's acceptable to assume an even population distribution across the polygons).
Is this possible using JavaScript in the client, or will I need to perform the calculations on the server using the GeoProcessing framework?


texts: Sharing visualization with another user via CartoDB?

texts:
Using CartoDB, I would like to share a visualization with multiple users. (The visualization itself, not the resulting map.) I would like for each receiving user to be able to inherit the visualization in their own dashboard.

Sharing the tables loses the link between them and all the custom HTML. Is there a way to share a whole visualization, so that the recipient gets not just KML/GeoJSON, but the tables as a bundle plus the CSS and infowindows?


texts: QGIS: extract point features not in polygons

texts:
I have a layer of approximately 2M point features from which I need to create a second layer, only including the points that are not within (or bordering on) a set of polygons that are saved in another layer.
Can QGIS handle this? Extract by location seems to only include options if you want to keep the points that are within other polygons.
I'm using QGIS 3.14


texts: Summing four rasters to one suitability raster using Rasterio & GeoPandas in Python

texts:
I am trying to create a basic suitability raster from three vector sources and one raster source using Rasterio & GeoPandas in Python. I have already clipped and rasterized the vector sources to the raster extent.

All rasters contain nodata values. How do I combine all four rasters into one raster? I want to:

Keep nodata values only if all 4 rasters have nodata on the cell.
Replace nodata if 1 or more rasters contain data on the cell.

My current implementation does almost what I want, but replaces all nodata by 0 and will not write the result to a new raster.

import rasterio
import rasterio.plot
import numpy as np

# Merge the rasterized vectors

# Read raster bands directly to Numpy arrays.

with rasterio.open('water.tif') as src:
    water = src.read()
    print(water.dtype)

with rasterio.open('road.tif') as src:
    roads = src.read()

with rasterio.open('natura2000.tif') as src:
    natura2000 = src.read()

with rasterio.open('elevation.tif') as src:
    elevation = src.read()

suit_raster = np.zeros(elevation.shape, dtype=rasterio.int16)
for data in water, roads, natura2000, elevation:
    suit_raster += data

# Update metadata
kwargs = src.meta
kwargs.update(
    dtype=rasterio.uint16,
    count=1,
    compress='lzw',
    nodata=0
)

# Show resulting raster.
rasterio.plot.show(suit_raster)

# Write result to file fails?
with rasterio.open('a5_suit_raster.tif', 'w', **kwargs) as dst:
    dst.write_band(1, suit_raster.astype(rasterio.uint16))

This results in the following raster which is almost what I want as the nodata values are all replaced by 0 (or is this because it is not a raster yet and I am plotting an numpy array?):

Additionaly, I cant write the result to a new raster as I get the error message:

Source shape (1, 1, 1437, 1628) is inconsistent with given indexes 1

What am I missing here? How do I update the 'shape' in the new rasters? And how do I keep the nodata values?


texts: Join fields from multiple shapefile in a folder to one shapefile

texts:
I have 39 shapefiles in a folder with each shp having 368 attributes. Every shapefile has the same attribute name (FID, pointid, grid code and 365/366 others; depending on them being leap year).

I am using the code below by @Aaron in their answer to Join field repeatedly on multiple tables.

I wanted to know whether the code below joins all the attributes from every shapefile to one shapefile or every attribute from other shapefiles to each shapefile i.e. If I have 50 shapefiles numbered 1 to 50 and I want to join fields from all the 49 shapefiles to shapefile 1, what changes (if any) would I have to make to the code. I only want one shapefile with attributes from every other shapefile.

import arcpy

arcpy.env.workspace = r'C:\path\to\your\shapefiles_folder'

join_field = "DATE"
join_table = r'C:\path\to\your\jointable.dbf'
shps = arcpy.ListFeatureClasses()

counter = 1
for shp in shps:
    arcpy.JoinField_management(shp, join_field, join_table, join_field)
    print "%s of %s shapefiles processed" % (counter, len(shps))
    counter += 1

print "Processing complete."


texts: Generate straight lines between river confluences using ArcGIS Desktop?

texts:
I have the shapefile containing polylines that represent the river. I need to draw generalized straight line approximations of stream lines.

River lines have the following attributes:

river_id is a unique identifier;
down_id is the river_id of the downstream line;
down_node is the downstream node identifier;
up_node is the upstream node identifier;
type, indicates whether the line is a source, sink or intermediate line.

Any ideas how to do it using ArcGIS Desktop?


texts:
Sorry if this isn't the right place to ask this, I've tried looking around for support forums and have found none.

I had a question regarding the ToS of Google Maps/Earth, it can be found here: https://developers.google.com/maps/terms

Section 9.1.1a states that:

(a) Free Access (No Fees). Your Maps API Implementation must be generally accessible to users without charge and must not require a fee-based subscription or other fee-based restricted access. This rule applies to Your Content and any other content in your Maps API Implementation, whether Your Content or the other content is in existence now or is added later.

and Section 9.1.2b states:

(i) The rule in Section 9.1.1(a) (Free Access) does not apply if your Maps API Implementation is used in a mobile application that is sold for a fee through an online store and is downloadable to a mobile device that can access the online store.

Does that imply that if you created an android app that uses Maps API that costs money to buy, you're allowed to implement a subscription model? Is freemium disallowed under this?

Also, under the FAQ (found here: https://developers.google.com/maps/faq#tos_commercial), you're allowed to use a freemium model when it comes to posting?

"If you charge people to place information on your map (e.g. to list their homes for sale), but you display this information using the Google Maps API on a free part of your site, you'll also meet the Google Maps API Terms of Service."

For reference, I was planning to build a free-to-buy Map-view based app that allowed users to post things that would show up as markers on the map (using geolocation of course) for a duration and charge more to have it permanently placed with additional options (more info, e.g. a live update of a restaurant's seating capacity)


texts: Printing semi-transparent elements using ArcObjects?

texts:
I highlight some features with a semi transparent color via an ILayerExtensionDraw. When I print the ActiveView of the PageLayoutControl with IPrintAndExport the highlightning is not on the printout.

In the print method I get the printers HDc and save it to a static variable which the LayerExtension reads from.

  System.Windows.Forms.PrintDialog printDialog = new System.Windows.Forms.PrintDialog();
  System.Windows.Forms.DialogResult res = printDialog.ShowDialog();
  if (res == System.Windows.Forms.DialogResult.Cancel)
    return false;

  // ... assigning printer settings here...

  System.Drawing.Graphics graphics = printDialog.PrinterSettings.CreateMeasurementGraphics();
  MyLayerExtension.CurrentPrinterHdc = graphics.GetHdc();

  PrintAndExport.Print(docActiveView, docPrinter, _pageLayoutControl.PageLayout.Page, 1, iResampleRatio, null);

  graphics.ReleaseHdc();
  MyLayerExtension.CurrentPrinterHdc = IntPtr.Zero;

The LayerExtension reads the IntPtr and uses it to draw the highlightning to the printer, but it is not shown on the print out.

SimpleFillSymbol fillSymbol = new SimpleFillSymbol();
fillSymbol.Style = esriSimpleFillStyle.esriSFSSolid;
fillSymbol.Outline = new ESRI.ArcGIS.Display.SimpleLineSymbol();
fillSymbol.Color = Utilities.CreateColor(System.Drawing.Color.Khaki);
pDisplay.Filter = new TransparencyDisplayFilterClass { Transparency = 127 };
pDisplay.SetSymbol((ISymbol)fillSymbol);
pDisplay.StartDrawing(pDisplay.hDC, (System.Int16)ESRI.ArcGIS.Display.esriScreenCache.esriNoScreenCache);
if (CurrentPrinterHdc != IntPtr.Zero)
  pDisplay.StartDrawing(CurrentPrinterHdc.ToInt32(), (System.Int16)ESRI.ArcGIS.Display.esriScreenCache.esriNoScreenCache);
pDisplay.DrawPolygon(feature.Shape);
pDisplay.FinishDrawing();

The LayerExtension does get called on printing.

What did I miss?

As far as I understand the HDc now the drawing on the printers handle would only work, if I use the HDc to print later on again, which is not a real option.

Is there any other way to get the transparent (!) highlightning printed?


texts: Looking for a colormap for SRTM like OCM Landscape

texts:
In Quantum GIS there's an OpenLayers plugin. I would very much like to use the same colormap/scheme/theme used in the OCM Landscape layer and apply it to SRTM image I have.

I checked the the open cycle map website but didn't find any info regarding the color map they used so I wonder if anyone knows how to generate a similar colormap or QML file?

TIA.


texts: Calculation of fastest path with in network analysis by qgis 3.0

texts: I have a road network (with speed limit) and different points connected to the roads. I would like to measure the distance between several points along the roads. Basically I want to do shortest path and fastest path analysis, but I want to measure the distance and time between two points and also would like to get the results in an attribute table.


texts: Specify temporal domain subset in WCS/WPS

texts:
I am setting up the WPS module for GeoServer, which has worked well so far, except that all of our raster layers contain a temporal component to them, so I need to be able to specify the applicable date when I execute a WPS request. I can get the GeoServer WPS demo to give me a sample XML request, but it won't contain the temporal specification. All of my efforts to figure out how to specify this parameter have failed. How can I specify a date/time component in this WCS/WPS request?

POSTed URL: http://our-server.org/geoserver/ows?service=WPS&version=1.0.0&request=execute

Here is the sample XML:

<?xml version="1.0" encoding="UTF-8"?>
<wps:Execute version="1.0.0" service="WPS"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns="http://www.opengis.net/wps/1.0.0"
  xmlns:wfs="http://www.opengis.net/wfs"
  xmlns:wps="http://www.opengis.net/wps/1.0.0"
  xmlns:ows="http://www.opengis.net/ows/1.1"
  xmlns:gml="http://www.opengis.net/gml"
  xmlns:ogc="http://www.opengis.net/ogc"
  xmlns:wcs="http://www.opengis.net/wcs/1.1.1"
  xmlns:xlink="http://www.w3.org/1999/xlink"
  xsi:schemaLocation="http://www.opengis.net/wps/1.0.0
    http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd">
  <ows:Identifier>ras:CropCoverage</ows:Identifier>
  <wps:DataInputs>
    <wps:Input>
      <ows:Identifier>coverage</ows:Identifier>
      <wps:Reference mimeType="image/tiff" xlink:href="http://geoserver/wcs" method="POST">
        <wps:Body>
          <wcs:GetCoverage service="WCS" version="1.1.1">
             <ows:Identifier>my_layer</ows:Identifier>
             <wcs:DomainSubset>
                <ows:BoundingBox crs="http://www.opengis.net/gml/srs/epsg.xml#4269">
                  <ows:LowerCorner>-125.020833333333 24.0625</ows:LowerCorner>
                  <ows:UpperCorner>-66.479166666662 49.937500000002</ows:UpperCorner>
                </ows:BoundingBox>
             </wcs:DomainSubset>
             <wcs:Output format="image/tiff"/>
          </wcs:GetCoverage>
        </wps:Body>
      </wps:Reference>
    </wps:Input>
    <wps:Input>
      <ows:Identifier>cropShape</ows:Identifier>
      <wps:Data>
        <wps:ComplexData mimeType="text/xml; subtype=gml/3.1.1">
          <![CDATA[{"type" : "MultiPolygon","coordinates" : [bunch of coordinates]  }]]></wps:ComplexData>
      </wps:Data>
    </wps:Input>
  </wps:DataInputs>
  <wps:ResponseForm>
    <wps:RawDataOutput mimeType="image/tiff">
      <ows:Identifier>result</ows:Identifier>
    </wps:RawDataOutput>
  </wps:ResponseForm>
</wps:Execute>


texts: Risk of generating sampling points from Pseudo-Mercator projection

texts:
Is there any risk in using the Pseudo Mercator projection (EPSG:3857) to generate lat/long coordinates for locating sampling plots with a handheld GPS?

My understanding is that since it uses WGS-84 datum, there should be no issue -- but am also unsure as EPSG:3857 is an unrecognized projection and there might be idiosyncrasies I'm unaware of.

Is it necessary to reproject to EPSG:4326 or a UTM based SRS before deriving sampling point lat/long coordinates?


texts: Querying database based on map view using Leaflet

texts:
Currently I have a script where I query database based on an array of distances, increasing the radius  and stop the loop once I get some results. However I think it makes more sense in my case to query based on what is shown on the map, obviously within reasonable zoom level.
Is there a way to detect what radius I should use when a map loads at a particular zoom setting and how to capture it on map resize?


texts: Reducing a network on QGIS by merging some edges and deleting unneeded nodes

texts:
I have a network(nodes=7479, edges=9033) on QGIS that I want to reduce by merging some edges and deleting some nodes that I will not use for my calculation. Below a zoom on a part of my `network.

What I want to do is:

Keep the nodes that contain information (in the example the hubs H1, H2 and H3)
Merge the edges in one that doesn’t contain any needed nodes (between i1 and i2 / between H2 and i3 in the example)
Don’t merge the edges when there is an interaction of more than three edges (e1 and e2 will not be merged because i2 is an interaction point to e3 as well)

Doing it manually will take me a long time and I was wondering if there is an automatic way to do it under QGIS or PostGIS (I’m a beginner in PostGIS, I just use it to perform simple calculation like finding the closest distance)


texts: I am looking for an example where there would be multiple map divs containing leaflet maps. When one is panned I want the other one to pan or zoom with it so they are always in sync.


texts: Extracting Raster Values by Polyline End Points using ArcGIS Desktop?

texts:
I am looking for a way to extract elevations of end points for line data in ArcMap 10.2. I have a road dataset that I want to use as a Network Dataset in Network Analyst. I want to be able to set the elevation change from the beginning of the line to the end of the line.

So I can implement the elevation similar to what they have here in step 20.

The data available: Roads Dataset, 5m DEM


texts: Remove Collar from ECW File (Orthophoto Mosaic)

texts:
Maybe i'm missing a basic concept when it comes to manipulating/removing values from an RGB orthophoto mosaic.  Is it possible to completely eliminate the collar (black background) from an orthophoto mosaic that is in an ECW format.  I was able to do in a TIFF format but the file needs to be in an ECW format as it is very large.  I've had limited success, using FME, to accomplish this but the resultant file always has areas that are not removed.  Hope all this make sense.

I'm open to other formats that will work, but as long as it performes to the same level as an ECW.

I have access to FME and ArcInfo.


texts:
This is a duplicate of Launching Processing tool User Interface using PyQGIS. However, the answer provided is not correct for QGIS 3.4.1.

from processing.gui.CommanderWindow import CommanderWindow

results in a

ModuleNotFoundError: No module named 'processing.gui.CommanderWindow'

Anyone know the current syntax to launch a processing tool from pyqgis, so that I can call one from e.g. a plugin?


texts: How to resample a raster with gdalogr:warpreproject or gdalogr:translate with non-default method

texts:
I would like to resample a raster to multiple rasters of a certain amount of pixels in width and height based on a bilinear resampling method.

However, I am not sure if the available syntax allows to do this from the QGIS Python console.

This works fine:

processing.runalg('gdalogr:translate',{"INPUT":rlayer, "OUTSIZE":j, "OUTSIZE_PERC":False, "EXPAND":0, "PROJWIN":"%f,%f,%f,%f" % (xmin, xmax, ymin, ymax), "OUTPUT":resampled})

For the snipped above the default resample method (nearest neighbor) is used. According to the  gdal manual, the method can be changed with the -r flag, but from processing.alghelp("gdalogr:translate"), this option seems to be unavailable.

Therefore, I thought of using gdalogr:warpreproject instead, where the resampling method can be defined. However, now I cannot define the amount of pixels in width and height as indicated in the gdal manual, because the TS flag is not available according to processing.alghelp("gdalogr:warpreproject").

Optimal would be something like:

processing.runalg('gdalogr:warpreproject',{"INPUT":rlayer, "METHOD":1, "RAST_EXT":"%f,%f,%f,%f" % (xmin, xmax, ymin, ymax),"TS":"%i,%i" % (j, j), "OUTPUT":resampled})

Does anyone know how to solve this?


texts: Avoiding purple anomaly on imagery in ArcMap?

texts:
What is this purple anomaly on the imagery that we just received?
The only thing I have done processing wise is to build the pyramids when they first came into ArcMap. Other than that, I have not done anything.
I also should add that the purple disappears when zoomed in to an extent past 1:10000, and gets larger as you zoom out.


texts: Routing in QGIS with road restrictions layer - plugin search

texts:
I'm looking for a simple way (without PGRouting atm) to show all possible road connections from a starting point. The effect should be a new layer showing all the possible road connections. Something like Road Graph but without stating the end point (every end of the road should be the end-point)

I have a small layer of county roads, there are no more than 100 possible routs in it.

Second thing are the road restrictions - a point layer where objects are snapped to the road layer. If there is a restriction, then this point on the road should be the end-point.

So finally I'm looking for a result that will show me all road connections restricted to encountered objects from a specified layer.

Do you know any plugin that could do something similar to that?


texts:
Can JavaScript be included in a leaflet popup?

We have modified this  example

To this :-

var this_marker = L.marker([51.5, -0.09]).addTo(mymap).bindPopup(
 '
Hello
world
').openPopup();

This gives an error.

In our application we see the correctly formed HTML with script tags but the JavaScript does not run.


texts: Nothing happened when call function remove layer on leaflet

texts:
I'm tryng to call function for clear layer. But nothing happened,
using this

      Remove All

        <input id="removeAll" name="someSwitchOption001" type="checkbox" />

And this my script

    var map = new L.Map('map', {zoom: 8, center: new L.latLng([-2.9365327,  104.4950964]) });

  map.addLayer(new L.TileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png')); //base layer
  <?php foreach ($map_link->result_array() as $i) :?>

    var <?= $i['maplink_var']; ?> = new L.GeoJSON(<?= $i['maplink_var']; ?>, {
      style: function(feature) {
        return {color: feature.properties.color };
      },
      onEachFeature: function(feature, marker) {
       const p = feature.properties;
       p.title = 'p.Name';

       marker.on('click', function (e) {

         var idlink="<?php echo $i['maplink_var']; ?>";
         var aab=feature.properties.ID;
         var numlat =  e.latlng.lat;
         var nlat = numlat.toFixed(3);
         var numlng = e.latlng.lng;
         var nlng = numlng.toFixed(3);

         marker.bindPopup(''+feature.properties.Name+'	'+ nlat  +'	'+ nlng +'	');
       });

     }
   });
    function removeAllMarkers(){
      markers.clearLayers();
    }

    document.querySelector('removeAll').onclick=function(){removeAllMarkers()};
    map.addLayer(<?= $i['maplink_var']; ?>);

  <?php endforeach; ?>

is there an error in calling the Function ID? because there is no notification of an error, it's just that when I click nothing happens.


texts: Publishing tables from lots of different databases on GeoServer?

texts:
I have a pretty similar question compared to this one: Publish multiple tables from different PostgreSQL's schemas on GeoServer

The main difference is the amount of databases. Question above has only 4. I do have a lot more which will pretty much invalidate all the answers to that question.

So I will just repeat the above question changed in a way it matches my situation:

I have about 30 tables times 50 databases in PostGIS.
I know that every PostGIS store must be connected with just one schema/database.

The reason we have 50 databases is the multitenancy setup. I do not want to put two customers in 1 database.
Therefore the GeoServer workspace for every database also needs to be different.

What now happens is that the amount of connections to PostgreSQL (with PostGIS) will all get allocated, so that extra connections get blocked.

I know I can increase PostgreSQL's connection limit, but I'm not sure
that I want to do that.

What is the most efficient way to publish these tables from different databases (and thus schemas) on GeoServer?


texts: QGIS Zonal Stats Plugin - Python Console - compute one specific statistic

texts:
I think this is more of a syntax problem that I have here. But I am absolutely not able to figure it out.
On a different Linux machine I got the following working:

zoneStat = QgsZonalStatistics (polygonLayer, rasterFilePath, 'pre-', 1, QgsZonalStatistics.Mean())
zoneStat.calculateStatistics(None)

to just calculate the mean and then append it to the .dbf file of the shapefile.
The error I get is TypeError: 'Statistic' object is not callable.
I see whats the problem, but even after studying the API I couldn't figure it out.
What am I doing wrong here?


texts: Change line selection display in MapInfo

texts:
can someone help me with a MapInfo query. Is it possible to change the display MapInfo uses when selecting lines? Atm I can be often difficult to see selected lines easily as the lines I am using are red and when selected there is slight red hashing around the edges. Would it be possible for a line to change color when selected, so it is easily distinguishable from other lines around it?

Thanks,
Alan


texts:
When using the export function via Project -> Import/Export my labels do not appear in CAD afterwards. I checked the "Export as MTEXT" box and tried using different scales. But I cannot get the labels to be exported to the dxf-file. The polygons and lines are being exported just fine. Only the labels are missing.
I'm working with QGIS 3.10.4 and open my dxf-files with AutoCAD LT 2019.
Anyone an idea what might be wrong or how I can get my labels to CAD?


texts:
I need to get information about any occurrences of NoData in an elevation raster. Simply by looking at the raster it is not possible to determine if and where any holes of NoData are present, so a technical method is needed.

Primarily I would like to obtain polygons of any NoData areas in the raster (i.e. vectorization). Another option would be to obtain a 1-bit raster which simply indicates true/false for NoData, but vector features would be much better.

How can this be accomplished?

This Question is more or less unrelated to a specific software, though I prefer using free software like QGIS, GDAL/OGR etc.


texts: Converting.vtpk (from ArcGIS Pro) into Google Earth compatible file

texts:
I have already turned the vector data into a vector tile cached package. If I were staying in ArcGIS then this would be fine. But I am working with a client that needs to see everything in Google Earth. There is a network link available for the service I am using but it is very slow to load when it loads at all. I really want to make a local version of the layer. This is only for reference, no analyses being done with it. Ideally, I'd like to turn it into a KML, but then it would just be a bunch of squares that follows the index.
Are there any workarounds?


texts: How can I use Natural Earth's country data in TileMill without map tearing?

texts:
I am trying to import the ne_10m_admin_0_countries shp file from Natural Earth into TileMill but I get strange map tearing around Antarctica.

I tried through PostGIS first (my main motivation for using this dataset) but later experimented and just tried to import the shp file directly with the same result.

Does anyone have an idea what is going on and how to fix it?

This is with TileMills default country layer:

With the ne_10m_admin_0_countries shp file:

and with both of the layers showing:

(edit from comments below) The data looks fine in QGIS:

(2nd edit) It seems to come down to the following 2 points on Antarctica, but I am unsure how to fix it. I've increased the line-width to make the problem more clear.

Northern / left problem point (zoom 10):

Southern / right problem point (zoom 10):

(3rd edit) Okay so I tried reprojecting it from QGIS which just lead to QGIS crashing when I tried to save the shape file. I was trying to reproject it into EPSG:3857 / 900913:

+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over

However I was able to get QGIS to do on the fly reprojection to EPSG:3857 and that also looks a bit strange:


texts:
I found a code example for what I'm looking to accomplish at Creating conditional stacked labeling in ArcGIS Pro?

I want to display filter quantity and sizes for a school district per building in a stacked format, but not display a line if there is a null value in the field. I could use another value besides null if necessary. These are currently all text fields.

def FindLabel ([UNITID],  [SIZE1],  [QTY1],  [SIZE2],  [QTY2],  [SIZE3],  [QTY3],  [SIZE4],  [QTY4]):
if [QTY3] != "" and [SIZE4] == 'Null':
    return [UNITID] + "\n" + [QTY1] + " (" + [SIZE1] + ")" + "\n" + [QTY2] + " (" + [SIZE2] + ")" + "\n" + [QTY3] + " (" + [SIZE3] + ")"
elif [QTY2] != "" and [SIZE3] == 'Null':
    return [UNITID] + "\n" + [QTY1] + " (" + [SIZE1] + ")" + "\n" + [QTY2] + " (" + [SIZE2] + ")"
elif [QTY1] != "" and [SIZE2] == 'Null':
    return [UNITID] + "\n" + [QTY1] + " (" + [SIZE1] + ")"
else:
    return [UNITID] + "\n" + [QTY1] + " (" + [SIZE1] + ")" + "\n" + [QTY2] + " (" + [SIZE2] + ")" + "\n" + [QTY3] + " (" + [SIZE3] + ")" + "\n" + [QTY4] + " (" + [SIZE4] + ")"


texts: ERROR in R - it cannot support the vector

texts:
I did use the function crop and mean for 434 rasters in Rstudio. Each one is very big, it corresponds almost like 1/4 of Brazil.

Now I want to calculate the standard deviation between these 434 rasters images but this error appears.

I have 66gb of space but it seems that my computer will not process

sd_ndvi_caat_crop<-calc(ndvi_caat_crop, sd, na.rm=TRUE, aszero=FALSE)
**Error: cannot allocate vector of size 31.6 Gb**

What should I do?

Or if I use the function cellStats does it calculate in the same way? Like calculating the sd of each cell of each 434 rasters images?


texts: Create rotated point grid inside polygon

texts:
I want to create a rotated grid inside a polygon using a starting point and a rotation angle. I have started with the python script found here.

I have altered the original script to accommodate changes to QGIS 3.0 and introduced changes for the rotation and the loops. Obviously, something is amiss since the script is getting stuck in an infinite loop and I have to crash QGIS to stop.

Any idea where I went wrong?

Here is the script:

from qgis.core import *
from qgis.utils import iface
import math

# Set the spacing
spacing = 2.5
rot = math.radians(35.392)
# Set the inset
inset_x = 0
inset_y = 0

# Get the Coordinate Reference System and the extent from the loaded layer
layer = iface.activeLayer() # load the layer as you want
crs = layer.crs().toWkt()
ext=layer.extent()

# Create a new vector point layer
points_layer = QgsVectorLayer('Point?crs=' + crs, 'grid', "memory")
prov = points_layer.dataProvider()

# Create the coordinates of the points in the grid
points = []

for ft in layer.getFeatures():
    feat_geom = ft.geometry()
    # Set the extent of the new layer
    #xmin = ext.xMinimum() + inset_x
    xmin = 755358.66
    xmax = 755687.28
    ymin = ext.yMinimum()
    ymax = 3726718.02 # - inset_y
    #y = ymax
    #y = ymax
    xstart = xmax
    while xstart >= xmin:
        y = ymax
        x = xstart
        while y >= ymin:
            geom = QgsGeometry().fromPointXY(QgsPointXY(x, y))
            feat = QgsFeature()
            point = QgsPointXY(x,y)
            feat.setGeometry(QgsGeometry.fromPointXY(point))
            if feat_geom.contains(feat.geometry()):
                points.append(feat)
            x = x + (spacing * math.cos(rot))
            y = y - (spacing * math.sin(rot))
        xstart = xstart - spacing * math.cos(rot)

prov.addFeatures(points)
points_layer.updateExtents()

# Add the layer to the map
QgsProject.instance().addMapLayer(points_layer)


texts:
I am using  the following query to create a GeoJson response:

SELECT json_build_object(
    'type',         'FeatureCollection',
    'features',     jsonb_agg(feature)
)
FROM (
    SELECT json_build_object(
        'type',         'Feature',
        'id',           id,
        'geometry',     ST_AsGeoJSON(ST_ForcePolygonCW(wkb_geometry))::json,
        'properties',   to_jsonb(row) - 'id' - 'wkb_geometry'
    ) AS feature
    FROM (SELECT * FROM gis_states LIMIT 1) AS row
) AS features

The resulting data-set (https://pastebin.com/hvFQXUTr) does not validate at http://geojsonlint.com, even though I am using ST_ForcePolygonCW:

  Line 1: Polygons and MultiPolygons should follow the right-hand rule

Any suggestions on how to fix this?


texts: Qgis - raster values become integer when Polygonizing

texts:
When using the GDAL plugin, "Polygonize (raster to vector)" any values in the resulting vector layer is truncated to integer.

I have a raster showing windspeeds in squares of 500*500 meters, in the metadata-field i read that the lowest value is 2.5899999142 and the highest value is 12.6599998474.
Then when polygonizeing, the result layer only has values: 0, 1, 2, 3... and so on. No decimals.

I have googled the issue and found this: http://trac.osgeo.org/postgis/ticket/650 Don't know if it helps though.


texts: Can't create polygon in an editable layer in ArcMap 10.3

texts:
There is an editable polygon layer in ArcGIS 10.3
I can edit already existing polygons but I can't create new ones. The layer does not appear in the "Create Features" list.

I have another polyline layer in the same dataframe that I can edit and create new features, so it's not a Problem of ArcGIS.

Is there a possibility to find out if my rights are somehow restricted (regarding this particular layer)? Do you have any other reasons in mind why I can't create features?


texts: Sub-Query Using "NOT IN" (Selection Not Correct)

texts:
I am running into a bit of an issue with a query I am performing (for a void analysis).  I have two data sets, where I am trying to determine which Retailers are not within a certain geography.  When I use "SELECT * FROM PCA_RETAIL_AZ WHERE: Retailer  NOT IN ( Select Retailer From TEST)" I get results, but the selection also selects some of the retailers that are located within the TEST file.

Why is that?

I am not an SQL guru.  I can run this same process in MapInfo and it will work, but MapInfo is very slow in doing so.  I've attached screen shots of my results.

The image below, the selection includes just about everything from my "Test" file; so for example it selects Dillard's, when it should not as it is a part of my TEST data set.


texts: Domain List not populating during editing in ArcGIS 10.2

texts:
I have created  new field "Facility_Type" to the existing feature class and applied coded value domain. but during editing domain value is not populating.

You can refer the attached screen shot.


texts: Performing Weighted Buffer Analysis in QGIS?

texts:
I am running a 5 mile buffer analysis around a business location, with the objective to calculate the percent of high income earners ($200k+) within that buffer.

Normally, I would intersect the buffer with the surrounding census tracts and calculate a weighted sum for the percentage of high income earners.

But, in this scenario the business is located near the coastline, so about 40% of the 5 mile buffer intersects with ocean, and there is no census data.

This skews the weighted sum because now it includes a null value (a zero value). For example, the weighted sum is now (15% x 7%) + (25% x 5%) + (20% x 6.5%) + (40% x 0%) = 3.6% are high income earners.

3.6% is an incorrect calculation of high income earners. The real value is somewhere between 5% - 7%.

Is there a solution for this problem?


texts: Unknown Coordinate System on old drawing

texts:
I work with many old civil engineering documents, and occasionally I'll need to georeference one which has coordinates pairs listed at many given points but does not list which coordinate system these coordinate pairs refer to.  These are typically scans of the original drawing lacking any metadata except for what has been scanned.  I've always used the "brute force" methods as described by brenth here:
Identifying Coordinate System of Shapefile when Unknown?

My question though, is if I already know the approximate location and can easily find say lat,lon and I also have the original coordinate pairs, is there a tool out there that can eliminate the need for the "brute force" method, and speed things up for me?

Thanks


texts: Changing certain attributes and creating a new field for combined data

texts:
I have this combined dataset with building heights divided up over several columns ''Height'' ''Building_h'' and ''Building_L. My end goal is to combine them all in one new column. There are however, several problems:

All columns are strings. I am aware of the to_real() function, but it doesn't work as some of the values have 'm' behind it to indicate that they are in meters. How can I change them?
I already used regexp_replace( "height" , 'm.*', ' ')  in the field calculator to get rid of the 'm' behind meters and got those into a new field called 'without M', but now only the cases that had m are in this field. They are also still in the field they were originally in, so I still cannot apply the to_real().
I want to use with ''WithoutM'' field to add all the other values to as well.

How do I do this?

Then there is ''Building_l'' which has the number of levels per building. And so, this is a different way of expressing building height than ''height'' and ''building_h'' do. If I say, for example that an average building level is 3 meters; is there a way I can multiply the value for ''building_l'' by 3 and also put this into the ''withoutM'' field?
Last problem is related to the fact that several buildings have a value in more than one column. For example in ''height'' and ''building_l'', how should I handle this?


texts:
I am developing an application that collects data by drawing on the map different shapes.

I am usinf LeafletJS and ionic framework, when I test the application on the computer browser it works fine, but when I install it, run it on android device, everything is ok except the drawing controls, they dont work, I guess touch events are not supported by leaflet.draw, I am new to this world and I have no idea on what should be done to make the controls work on touchscreen device.


texts: Running IDW, but values are '<1' not 0.934 so they are Strings not Doubles

texts: I am trying to use some interpolation tools for analytical data of concentrations of Benzene for monitoring wells. A decent amount of our values for Benzene are '<1' (not 0.943 or 0.345) because of how our sampling works here. Therefore, when I convert my excel tables to points, it classifies my Benzene column as a string and I can't use it as the Z value field. Is there anything I can do so I can still accurately run IDW (or a different interpolation tool) using my Benzene concentrations?


texts: 'List indices must be integers not tuple' Error

texts:
I'm using an insert cursor to write rows to a destination feature class where the input Shapefile field names do not match the destination FC names.  To accomplish this, I'm trying to use the indices of the input shape field list to input to specific fields.  Running into a "List indices must be integers not tuple" error when executing and have tried all combinations of brackets, parentheses, etc.  I don't think I'm seeing the error right:

outfc = #the input shapefile from earlier in code
destsfp = #the destination featureclass from earlier in code

allrowvalues = arcpy.ListFields(outfc)
rowvalues = allrowvalues[[2],[3],[5],[6],[7],[8],[9],[10],[11],[12],[13],[14]]
#open insert cursor
cursor = arcpy.da.InsertCursor(destsfp,('SHAPE@X','SHAPE@Y','SHAPE@Z','GRADIENT','BEARING','HEIGHT_IN_METRES','WIDTH_IN_METRES','LENGTH_IN_METRES','DEPRESSION_DEPTH','SYMBOLOGY','FEATURE_NAME','FEATURE_DESC'))
#insert new rows that have the above fields
for row in rowvalues:
    cursor.insertRow(row)
del cursor


texts:
I'm trying to convert AutoCAD 3D data to OSM lossless, or close to lossless.

So far, the only way I can see it's possible is to convert from AutoCAD to SVG to OSM, according to OSM's WiKi.

Do someone have experience in using AutoCAD 3D data for OSM?

I'm going to use it in OSM3S, own hosted overpass-api.

I have the original data in MicroStation, so it's actually going from MicroStation to OSM.


texts: Randomly assign a value to a specificed number of rows in a feature class in ArcGIS

texts:
I have several feature classes, each with a million or so rows. In each of these feature classes I have an attribute ("STATE"), the value of which I want to randomly assign to one or another state (so represented as a binary - 1 or 0).

However For each of these feature classes, there are only a specific number of rows (events) that can be assigned 1. Does anyone have a quick means of taking this field (currently, for all rows [STATE] = 0), and randomly assigning x number of rows to be [STATE] = 1. Say, turn 25,000 of the million rows to be 1 rather than 0?

I have tried using cursor but I keep failing at it.


texts: How to encrypt vector tiles JSON response

texts:
I am using TileStache to serve vector tiles from Postgres and using Tangram to display these tiles by passing urlhttp://localhost:8080/composite/{z}/{x}/{y}.json in the data source. The response i get is in JSON format, which is what i wanted.

Now i just want to encrypt the JSON response so that it is not human readable at the client end and readable at server end but i don't know how to do it.

Can anyone help please?


texts: Extract OSM snapshots for any point in time from geofabrik osh.pbf files

texts: Has anybody successfully extracted OSM snapshots for any point in time from geofabrik osh.pbf files and convert them to shape files?  I need to extract data from 1 year ago to compare with current data in order to find changes in road network.  I was informed by Geofabrik that it's possible with programs like osmium-tools but I've had a hard time trying to get it installed on a windows machine.  Are there any other tools available for windows with this capability?


texts: Using a .bat file to run a QGIS python program

texts:
I have a python script that runs in QGIS that I would like to run without opening QGIS. The script is as follows:

QGIS_Zonal_Stats_osGeo.py

import sys
from qgis.core import *

QgsApplication.setPrefixPath("C:/OSGeo4W64/apps/qgis", True)
app = QgsApplication([], True)
QgsApplication.initQgis()

sys.path.append("C:/OSGeo4W64/apps/qgis/python/plugins")

from processing.core.Processing import Processing
Processing.initialize()
import processing

from qgis.analysis import QgsZonalStatistics

import datetime

today = datetime.date.today()
one_day = datetime.timedelta(days=1)
yesterday = today - one_day
yesterday_date = yesterday.strftime('"%Y-%m-%d"').lstrip("0").replace(" 0", " ")
yesterday_date_name = yesterday.strftime("%B_%d_%Y").lstrip("0").replace(" 0", " ")

rasterFilePath = 'C:/Users/bboyko/Desktop/precipitation_download/Daily_Rainfall/' + str(yesterday_date_name) + '.tif'

polygonLayer = QgsVectorLayer('C:/Users/bboyko/Desktop/precipitation_download/candidate_singlepart.shp',
'candidate_singlepart', "ogr")

rasterLayer = QgsRasterLayer(rasterFilePath, str(yesterday_date_name))

zoneStat = QgsZonalStatistics (polygonLayer, rasterLayer, 'rain_', 1, QgsZonalStatistics.Mean)

zoneStat.calculateStatistics(None)

And this is the .bat file I am using:

Launch.bat

SET QGIS=C:\OSGeo4W64\apps\qgis
SET PATH=C:\OSGeo4W64\bin;C:\OSGeo4W64\apps\qgis\bin;%PATH%
SET PYTHONHOME=C:\OSGeo4W64\apps\Python37
SET PYTHONPATH=C:\OSGeo4W64\apps\qgis\python;%PYTHONPATH%

python C:\Users\bboyko\Desktop\precipitation_download\QGIS_Zonal_Stats_Three_osGeo.py
pause

When I run the batch file this is the message I receive in a command prompt:

C:\Users\bboyko\Desktop\precipitation_download>python C:\Users\bboyko\Desktop\precipitation_download\QGIS_Zonal_Stats_Three_osGeo.py
  File "C:\OSGeo4W64\apps\Python37\lib\site.py", line 177
    file=sys.stderr)
        ^
SyntaxError: invalid syntax

Is the mistake coming from my python script or my .bat file, of from some other issue I haven't considered.


texts:
Is there a way to control the graphics card ArcMap 10.7 uses?
My Windows laptop has two graphics cards (stock AMD and NVIDIA GeForce). The default settings seamlessly switch between the two depending on program requirements, and I've never had any issues.
I just set up a docking station for my laptop so that I can have multiple extended monitors (Wavlink Universal Docking Station WL-US39DK1). It turns out that when my laptop lid is closed, the docking station gets locked-in on the basic graphics card (I've confirmed this in Wavlink's display manager) and I get the Error: LoadLibrary failed with error 126: The specified module could not be found. and of course ArcMap will not open. When the laptop lid is open, ArcMap loads fine and uses the NVIDIA graphics card. This is consistent with how
ESRI Technical Support describes the error.
My current workaround is to just disable my basic graphics card (in Windows Device Manager), as suggested in various Google searches, which forces the laptop to always use the NVIDIA card. But I think this is slowing things down and producing some latency in other programs. I'd rather have access to my basic graphics card  and ArcMap while keeping my laptop lid closed. The only way I can think to acheive this is to force ArcMap to use the basic card rather than the NVIDIA card. Is there a way to do that?


texts: deegree WMS incomplete ServiceException code="InvalidRequest"

texts:
I'm new in GIS and trying to explore WMS and WFS implemented by deegree [Version deegree-webservices-3.3.20]. I followed all the steps mentioned at http://download.deegree.org/documentation/3.3.19/html/installation.html for deployment on Windows (deployed on Windows 7 64 bit machine).

I'm getting a response for WMS request:

< ?xml version='1.0' encoding='UTF-8'? >
< ServiceExceptionReport xmlns="http://www.opengis.net/ogc" >
  < ServiceException code="InvalidRequest" >

which is incomplete response in itself.

I could see some error message in log file "localhost.2017-05-03.log":

May 03, 2017 3:21:52 PM org.apache.catalina.session.StandardSession writeObject
WARNING: Cannot serialize session attribute configManager for session AC90FBED92FB2432CD19E034F3469DAE
java.io.NotSerializableException: org.deegree.console.ResourceManagerMetadata2
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
    at org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1551)
    at org.apache.catalina.session.StandardSession.writeObjectData(StandardSession.java:994)
    at org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:523)
    at org.apache.catalina.session.StandardManager.unload(StandardManager.java:469)
    at org.apache.catalina.session.StandardManager.stop(StandardManager.java:673)
    at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4774)
    at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:924)
    at org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1319)
    at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1290)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:323)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1086)
    at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1098)
    at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:450)
    at org.apache.catalina.core.StandardService.stop(StandardService.java:587)
    at org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)
    at org.apache.catalina.startup.Catalina.stop(Catalina.java:648)
    at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:692)

For your information, I set-up feature from a shapefile. WMS request which I used is:
http://localhost:8080/services/wms?service=WMS&version=1.1.1&request=GetMap&Layers=MySampleLayer&SRS=epsg:4326&BBOX=-124.73142200000001,24.955967,-66.969849,49.371735&width=256&height=256&styles=&format=image/png&TRANSPARENT=TRUE

It would be very helpful if anybody can help me on this issue. I'm not able to move further just because of this issue :(

Same shapefile works perfectly in GeoServer with same WMS request.


texts: Filter out "incomplete" Sentinel-2 images in Earth Engine

texts:
Sometimes when using Earth Engine I got an incomplete image, is there a way to get the full image? Example:

The code that I am using is:

  var imageCollection = ee.ImageCollection("COPERNICUS/S2");
  var image_25 = ee.Image(imageCollection
    .filterDate('2016-05-01','2016-06-01')
    .filterMetadata('MGRS_TILE','equals','32VNK')
    .first())
    .select(['B2', 'B3', 'B4'])


texts: Incremental spatial clustering algorithm

texts:
I'm in search of a incremental spatial clustering algorithm. Here is my use case:

users create entries with an initial position
users may change the positions of existing entries

I now want to implement a decoupled service that provides clustering information of these data. The service will be notified each time a new entry has been added or an existing entry has been moved. What is a good clustering algorithm therefore? Ideally, it should scale well up to high amounts of data and if there's a trade-off between cluster quality and runtime complexity, I'm okay with degrading results, and eventually consistent results (stale results are okay for some time).

To summarize my requirements:

spatial clustering based on positions
incremental modifications on changes
add new positions
change existing positions
good runtime performance

Thanks in advance!


texts: Gdal doesn't recognise ArcMap 10.1 EPSG:3857

texts:
I have projected a geotiff to EPSG:3857 using ArcMap 10.1 (in Arc it is called “WGS_1984_Web_Mercator_Auxiliary_Sphere”). The coordinate parameters look correct, so why does gdal not recognise the coordinate system of this file? E.g. when I open it in QGIS it says "define this layers coord ref system".

Can anyone help? What can I do to make gdal recognise this coordinate system straight away?

To be more specific:

As read from gdalinfo,
the geotiff projection parameters as produced by ArcMap 10.1:

PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",
    GEOGCS["GCS_WGS_1984",
        DATUM["D_WGS_1984",
            SPHEROID["WGS_1984",6378137.0,298.257223563]],
        PRIMEM["Greenwich",0.0],
        UNIT["Degree",0.017453292519943295]],
    PROJECTION["Mercator_Auxiliary_Sphere"],
    PARAMETER["False_Easting",0.0],
    PARAMETER["False_Northing",0.0],
    PARAMETER["Central_Meridian",0.0],
    PARAMETER["Standard_Parallel_1",0.0],
    PARAMETER["Auxiliary_Sphere_Type",0.0],
    UNIT["Meter",1.0]]

vs GDAL's projection parameters:

PROJCS["WGS 84 / Pseudo-Mercator",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.257223563,
                AUTHORITY["EPSG","7030"]],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4326"]],
    PROJECTION["Mercator_1SP"],
    PARAMETER["central_meridian",0],
    PARAMETER["scale_factor",1],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext  +no_defs"],
    AUTHORITY["EPSG","3857"]]

GDAL's parameters have the EPSG authority embedded, while Arc's does not. i.e. Is there something I should do in ArcMap to get EPSG embedded?


texts: Projected Coordinate System for South Australia

texts:
I am calculating areas of polygons and distances between points in a small park in South Australia (~ 139.4 longitude, -34.3 latitude). All of these points are currently in GCS WGS 1984, and the polygons are all less than 1 square kilometer.

I am trying to determine the best projected coordinate system for these calculations, and I have come upon multiple options. I read that, for small local areas of the Australian continent, MGA is an ideal projection, so I am considering using GDA 1994 MGA Zone 54. However, I've also read that for area calculations, it is best to use an equal area projection, so I have also considered using GDA 1994 Australia Albers.


texts: ArcPy preventing copying files using Transfer Files tool

texts:
I am using ArcPy to calculate some areas in polygons.
At the end of my code, I want to copy my final files over to a DropBox folder using the Transfer Files tool. The following code moves the files across:
... do stuff
#This moves all files that start with deapsea_shares to dropbox
files = os.listdir(in_dir_temp)
for f in files:
    if (f.startswith("deepsea_shares")):
        arcpy.TransferFiles(f, in_dir)

print("Done!")

However when running the code, it returns error:

IOError: [Errno 2] No such file or directory: 'deepsea_shares.cpg'

However, when I run the above code in a separate python file, it copies them across normally with no error . This makes me think that ArcPy is somehow blocking the moving of these files through some lock mechanism because the file is clearly in the directory.
I also noticed that the deapsea_shares.shp file can be moved across (in the original code), but not the .cpg file, I have not explicitly tested other files yet.
Do you have any insight into this problem?
Edit: I made a mistake in original question, I was atually using this block of code:
print("Moving file to dropbox...")

sys.exit()
#This moves all files that start with deapsea_shares to dropbox
files = os.listdir(in_dir_temp)
for f in files:
    if (f.startswith("deepsea_shares")):
        print(f)
        shutil.move(f, in_dir)

This is what returned the error.


texts: Performance of ArcGISScripting and large spatial data sets

texts:
I am currently writing a python script using the arcgisscripting module to process a reasonably large data set (~10,000 records in total) normalised over a small number of tables, 8 in total.  The process consists of creating a feature based on coordinate tuples (x,y) and creating a graph (nodes and lines) using the relationships in the other 7 tables for guidance.  The final output is a personal geodatabase (pgdb/fgdb) with nodes and edges spatial data sets that visually represent the relationships.

My initial attempt was to use queries of the new geodatabase tables and SearchCursor record sets to populate link tables (InsertCursor) for the many-to-many relationships that occur.  This worked very well, except for the 15-20 min processing time.

Using the cProfiler module in Python, it was apparent that 'thrashing' a personal geodatabase when performing the search queries to populate the link tables with requests for cursors (Search and Insert cursors) caused the appalling performance.

With a little refactoring I have managed to get the processing time below 2.5 minutes. The trade off was partial construction of the geodatabase schema in code and limiting the requests for arcgisscripting cursors to InsertCursors once all relationships were collated.

My question is one of performance;

What techniques have people used to maintain reasonable compute times when working with large data set?
Are there any ESRI recommended methods that I've missed in my search for optimisation?

I understand the overhead incurred when creating a arcgisscripting cursor, particularly if it is from a personal geodatabase, though after a lengthy search for performance related answers from this site and Google I am under the impression that performance isn't at the forefront of peoples endeavours.
As a user of ESRI products, does one expect and condone these performance lags?

UPDATE

  After some work with this product I have accumulated a list of optimization techniques that have taken a process of converting spatial information from a propriety format to a geodatabase.  This has been developed for personal and file geodatabase.
  Tidbits:

  Read you data and rationalize it in memory.  This will cut your time in half.
  Create feature classes and tables in memory.  Use the feature dataset keywork 'in_memory' to use your memory as ram disk, perform your functions there and then write out to disk
  To write out to disk use the CopyFeatureclass for feature classes, and CopyRow for tables.

  These 3 things took a script that converted 100,000+ features to a geodatabase from 30 minutes to 30 - 40 seconds, this includes relationship classes.  They are not to be used lightly, most of the methods above use a lot of memory, which could cause you issues if you are not paying attention.


texts: How to deal with multitype data sources in QGIS?

texts:
Today I was trying to import a DXF to Qgis, the result is that qgis displays everything LINES and POINTS but it only displays options for the POINT objects.
When I try to export to a shapefile, it throws an error (Can't export LINES).
When I try to export to geojson, that's ok, it exports everything.

What I want is to separate POINTS from LINES so I can work with them. Is there any workaround or suggestion on how to do that?


texts: Copying fields from one layer to another in QGIS

texts:
I am new to QGIS. I need to create hundreds of shapefile layers with the same fields but different points and attribute values:

The first shapefile one I created with 12 fields (columns).
To create the second, I duplicated the first one.
Unchecked the first one to guarantee its safe.
In the attribute table, deleted all the points of the second since
the only thing important here is to keep the fields titles.
Start to map new points with its new attributes.

After click on save layer edits, all my points on the first layer are gone. I can not understand why the points and data on the first layer are being deleted.


texts: Merging feature class with field mappings using datum transformation?

texts:
I suspect that there is no easier way to do this, other than developing this as a two-step process with a temporary output (which seems somewhat wasteful). If I have to, I'll just create a temporary output and use the Project tool as a second step.

I have an ETL process (python script) that involves creating field mappings and merging data from our Enterprise SQL-Server Express database (in our local State Plane NAD1983 coordinate system) to a file geodatabase whose schema is in WGS1984 Geographic Coordinates. I've noticed that the output is close but not quite correctly aligned (it is "forced" into the coordinate system of the output gdb).

"Is there a way to use Merge (with field mappings) and somehow enforce a datum transformation (in my case WGS_1984_ITRF00_To_NAD_1983) in the same step?".

There is nothing in the "Merge" tool dialog indicating a parameter that would allow me to do apply a transformation. Similarly there is nothing in the "Project" dialog allowing me to add field mappings.

This is just a small snippet of code to show how I'm currently doing this.

# ID_PREFIX (temporary)
fldmap_IDP = arcpy.FieldMap()
fldmap_IDP.mergeRule = 'First'
fldmap_IDP.addInputField(input_lyr, "ID_PREFIX")
fieldmappings.addFieldMap(fldmap_IDP)

# END MAPPING FIELDS

print("Field Mappings are Complete ... Ready to Merge ...")
# FINALLY - DO THE MERGE
arcpy.Merge_management(input_lyr, out_fc, fieldmappings)

EDIT: I tried adding the transformation to the geoprocessing environment as suggested but (assuming I did so correctly), it did not help. The result was still off by about 3 feet (see my code below).

# FINALLY - DO THE MERGE
arcpy.env.outputCoordinateSystem = arcpy.SpatialReference("WGS 1984") # 4326
arcpy.env.geographicTransformations = "WGS_1984_ITRF00_To_NAD_1983" # from 2248
arcpy.Merge_management(input_lyr, out_fc, fieldmappings)`


texts: I want to know if it is possible to switch of the coordinate system in QGIS, because I want to use my own values like x,y,z (the results is a 3D-model and the x,y,z axis is represented in cm, so I do not use and do not need GPS coordinates). In the end it is like my own "local coordinate system".


texts: ArcGIS Online Web Map only showing OBJECTID for Feature Class

texts:
I published a series of Feature Layers to ArcGIS Online.  When I try to open the REST endpoint in my browser, it is showing ONLY the OBJECTID field for each layer, even though all of them have multiple attributes.

Why is it only showing one field and how do I resolve that?

EDIT: I should add that all of the feature classes are joined to non-spatial data in other tables.


texts: Proper Way to Load WMSLayer in ArcGIS JSAPI 4.12

texts:
I'm getting #load() Failed to load layer  TypeError: Cannot read property 'indexOf' of undefined error when I tried to load WMSLayer in my application.

I've tried several different WMS service URLs but with no positive results. The code from the official sample doesn't work either.

A similar question has been asked and someone suggested that using proxy might solve the issue, but implementing proxy seems to be a quite complicated process. Please note that the URL in the question has http instead of https like in my application, the error is different from what I'm getting as well.

Does anyone figure out what I'm doing wrong or anything I missed out?

Here's my code :

let wmsLayer = new WMSLayer({
    title: "WMS Layer",
    url: "https://ows.terrestris.de/osm/service",
    sublayers: [{
        name: "OSM-WMS"
    }]
});

var basemap = new Basemap({
    baseLayers: [wmsLayer]
});

var map = new Map({
    basemap: basemap,
    layers: [gridLayer, forceSymbolLayer, measurementLayer, sketchLayer]
});

var mapView = new MapView({
    map: map,
    zoom: initZoom,
    center: initPosition
});


texts: shp2pgsql drop database table option doesn't work if table doesn't exist yet

texts:
Context

I have a PostGIS database.

If I use:

shp2pgsql -I -s 4326 -d "my_shapefile.shp" myschema.vectordata \
| psql -h localhost -U username -d my_database -v ON_ERROR_STOP=1

To inject data from a Shapefile source, I got the error:

Shapefile type: Arc
Postgis type: MULTILINESTRING[2]
SET
SET
ERROR:  column not found in geometry_columns table
CONTEXT:  PL/pgSQL function dropgeometrycolumn(character varying,character varying,character varying,character varying) line 34 at RAISE
SQL statement "SELECT myschema.DropGeometryColumn('',$1,$2,$3)"
PL/pgSQL function dropgeometrycolumn(character varying,character varying,character varying) line 5 at SQL statement

If I remove the -d flag, it goes well.
So I guess that, as stated in the documentation;

-d     Drops the database table before creating a new table with the data in the Shape file.

it will drop the database table without checking if it exists before.
So in the case tables exist, it goes well, if not, it fails as stated before.

Question

How could I make it equivalent to somehow a drop "IF EXISTS" sql statement when dropping the database table prior to injecting new data from a Shapefile?

Informations;

"PostgreSQL 10.12 (Ubuntu 10.12-0ubuntu0.18.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0, 64-bit"

"2.4 USE_GEOS=1 USE_PROJ=1 USE_STATS=1"


texts: Multiple Ring Buffer in ArcPy Generates Single Ring

texts:
I'm running a simple multiple ring buffer using ArcPy. My goal is to generate a multi ring buffer for each pond in my dataset of 50,000. Here's the line of code:

arcpy.MultipleRingBuffer_analysis(pondsNearCrop, outBufferedPonds, "356.8;792", 'Meters', 'BuffDist', 'NONE', 'OUTSIDE_ONLY')

This results in each pond getting buffered twice to a distance of 792 meters. When I run the following line of code in the Python window in ArcMap, I get the expected results-- one buffer to 356.8 meters, one from 356.8 to 792 meters.

arcpy.MultipleRingBuffer_analysis("selectedPonds_Final", "out", "356.8;792", 'Meters', 'BuffDist', 'NONE', 'OUTSIDE_ONLY')

I can't understand why this works in ArcMap but not when using ArcPy. Has anyone else experienced this?


texts: ee.Algorithms.If result gives "not a function" error on relational method call (Earth Engine)

texts:
I am trying to filter an image collection by Quality Control bands. The quality control bands are named two different things ("QA" and "qaGpp"), and these names do not appear to within the collection with any inherent order, so slicing the Image Collection will not work.

Thus, I need to specify the correct band to be selected during mapping as follows:

//Load in Image Collection:
var TPP = ee.ImageCollection("UMT/NTSG/v2/LANDSAT/GPP")

var QC = function(image){
  var bandNames = image.bandNames();
  var hasQC = ee.Filter.eq(bandNames.get(1), 'QC');
  var ifElse = ee.Algorithms.If(hasQC,image.select("QC"),image.select("qaGpp"));
  return image.updateMask(ifElse.neq(255));
};

//Map QC mask to image collection:
var TPPMasked = TPP.map(QC);

//Yields the following error: ifElse.neq is not a function

An examination of a single Image within the collection reveals that ifElse is indeed an Image, which should be able to take a .neq method:

//Take arbitrary Image from collection and run the previously mapped function on it:
var testTPP = TPP.first();
var bandNames = testTPP.bandNames();
var hasQC = ee.Filter.eq(bandNames.get(1), 'QC');
var ifElse = ee.Algorithms.If(hasQC,testTPP.select("QC"),testTPP.select("qaGpp"));
print(ifElse, "ifElse");

//Here is the error:
print(ifElse.neq(255));

How do I correctly mask these Images such that all image with their respective QC bands that don't have a value of 255 are thrown out?

Thanks in advance for the help. Here is a link to the code in question


texts: Get the total distance from a point to the end of a linestring

texts:
I have a list of GPS coordinates that make up a bus route:

busRoute = [(x1, y1), (x2, y2), ... (xn, yn)]

I also have a point that may not be exactly on that route (due to GPS error):

currentLocation = (x, y)

Using Python, how can I get the total distance from the bus's currentLocation to the end of the busRoute?


texts: QGIS 2.18 to 3.0 change in raster values

texts:
I had a raster sent to me which had different values on the other person's QGIS, he's working with 2.18 and I'm working with 3.0.

he had to set a threshold based on his index of values but couldn't do that because of the distorted values.

I have no idea what caused this since his QGIS reported the true value only for each individual cell when queried and not for the entire raster.
has anyone come across this? is there a fix so that he can see the true values in his version?

EDIT 1:

the values are streched to minmax in contrast enhancment, the problem is he's seeing different values.


texts:
Looking for an image feed like that of Landsat 7 and 8. Anyone know of one?
Examples below:
https://landsat.usgs.gov/landsat/rss/Landsat7_C1.rss

https://landsat.usgs.gov/landsat/rss/Landsat8_C1.rss

btw, I am using these feeds to tweet out images that meet a set criteria.


texts:
QGIS 3.10.  I have a point dataset of bat records for a county. I want to show a separate page for each species (so multiple records per page) and the geographic extent doesn't change.
This seems more difficult than it ought to be and I feel like I'm missing something?   I've  looked at solutions (on SE & wider web) which are either not similar or are far more complex than this and I haven't been able to adapt these to my requirement.


texts:
I'm trying to conduct raster analysis in QGIS on a digital elevation model with a grid resolution of 5 cm. The disk size for the data set is 151 MB. When using default GDAL raster calculator it throws an error " Raster Calculator: Insufficient memory available for operation."

Can anyone suggest alternatives to QGIS raster calculator?

PS- I have tried using SAGA Grid calculator but on the import of the same dataset in SAGA, the software crashes.

The following are the hardware specifications of my desktop:

AMD FX6300 six core 3.5GHz

Installed RAM 4.0 GB (3.5 GB usable)

64-bit operating system

Raster info:

Driver
GDAL provider
GTiff
GeoTIFF
Dataset Description
E:\QGIS\practice_content\terrain_analysis_mining\new_files\DSM.tif
AREA_OR_POINT=Area
TIFFTAG_SOFTWARE=pix4dmapper
Band 1
STATISTICS_MAXIMUM=79.582763671875
STATISTICS_MEAN=52.49497241844
STATISTICS_MINIMUM=34.057125091553
STATISTICS_STDDEV=10.220585082683
Dimensions
X: 14249 Y: 26318 Bands: 1
Origin
408714,1.6928e+06
Pixel Size
0.05142,-0.05142
No Data Value
-10000
Data Type
Float32 - Thirty two bit floating point
Pyramid overviews
Layer Spatial Reference System
+proj=utm +zone=43 +datum=WGS84 +units=m +no_defs
Layer Extent (layer original source projection)
408713.6688200000207871,1691448.5592900000046939 :   409446.3524000000325032,1692801.8308500000275671
Band
Band 1
Band No
1
No Stats
No stats collected yet


texts: Adding vertices at a centerline node not working in QGIS3

texts: I've recently installed QGIS 3.4. Earlier today, my vertex tool showed a virtual node at the center of line segments (as it should with the new node tool). This is no longer showing while editing the same shapefile (although I can add nodes at the end of the polyline). It also doesn't highlight in red, as in the user documentation. Are there any settings I should check or troubleshooting ideas before I reinstall again? I did mess with the snapping options, but it doesn't seem to matter if I remove snapping.


texts: Error when adding WMS layer in OpenLayers from a geoserver

texts:
I try to add wms layer from geoserver:

var layer = new OpenLayers.Layer.WMS(name, 'http://'+ self.objSettings.ip + ':' + self.objSettings.port + self.objSettings.wms,
    {
        srs: 'EPGS:4326',
        layers: name,
        styles: '',
        transparent: true,
    },
    {
        isBaseLayer: false,
        singleTile: true,
        opacity: 0.8,
        visibility: true,
    }
);

But point appears at (0,0).

Gdalinfo of geotiff, which I use for creating a layer:

Driver: GTiff/GeoTIFF
Files: pkmanager_295557648395020263_undefined.TIF
Size is 299, 409
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
Origin = (45.163320799224309,39.151851082312362)
Pixel Size = (0.001392666663209,-0.000743564600941)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (  45.1633208,  39.1518511) ( 45d 9'47.95"E, 39d 9' 6.66"N)
Lower Left  (  45.1633208,  38.8477332) ( 45d 9'47.95"E, 38d50'51.84"N)
Upper Right (  45.5797281,  39.1518511) ( 45d34'47.02"E, 39d 9' 6.66"N)
Lower Right (  45.5797281,  38.8477332) ( 45d34'47.02"E, 38d50'51.84"N)
Center      (  45.3715245,  38.9997921) ( 45d22'17.49"E, 38d59'59.25"N)
Band 1 Block=299x6 Type=Byte, ColorInterp=Red
  NoData Value=0
Band 2 Block=299x6 Type=Byte, ColorInterp=Green
  NoData Value=0
Band 3 Block=299x6 Type=Byte, ColorInterp=Blue
  NoData Value=0
Band 4 Block=299x6 Type=Byte, ColorInterp=Alpha
  NoData Value=0

Url, which is called:

http://192.168.200.67:8081/geoserver/sf/wms?height=1024&width=1024&layers=sf:pkmanager_295557648395020263_undefined&request=GetMap&service=wms&styles=raster&format_options=SUPEROVERLAY:false;KMPLACEMARK:false;KMSCORE:40;KMATTR:true;&srs=EPSG:4326&format=application/vnd.google-earth.kmz&transparent=false&version=1.1.1


texts: Where can I get public transportation locations for USA

texts:
I am trying to find a list of all public transportation/transit locations like subway stations, airports, bus terminals and bus stops for USA. Only major transit locations are required, rural bus stops are not necessary. This will be used to provide the nearest transit stations at a particular place (for a buy/sell listing), similar to whwat Yelp did for its listings.

Yelp's Transit Details

Nearest Transit Station:
Haymarket Station - Outbound (Orange Line)
Haymarket Station - Inbound (Orange Line)
Congress St @ Haymarket Sta (191, 192, 193, 325, 326, 4, 92, 93)

Any suggestions? Does OSM have such information? Could OSM contributors have included the major transit locations in America, and is it currently at least comprehensive in the major cities?

And what do I have to do to clean the data before I can import it into PostGIS and QGIS/ArcGIS?


texts: Installing Lizmap Web Client on Windows - demo project don't appear

texts:
I followed the protocol from the url bellow*, in order to install Lizmap Web Client on Windows, but demo project don't appear.

What could be the problem?

*https://opengislab.com/blog/2018/7/7/updated-installing-apache-qgis-server-and-lizmap-on-windows-os


texts: ArcGIS Pro - My point feature class won't display respect the drawing order according to ObjectID field

texts:
I'm trying to share a point feature class as a web layer.  When I do the draw order of my points is opposite of what I expected.
It is my understanding that the draw order is based upon ObjectID and will draw the features with FID of 0 last and the last FID will be drawn first.
I want the features to be drawn as they appear in the contents window and I have sorted them, using the Sort Data Management Tool, according to how I want them to be drawn but they draw in the opposite order.
I then reversed my Sort and end up with the same draw order.
How can I get my features to draw in the order I want them to?
<img src="https://i.stack.imgur.com/q6PDZ.jpg" alt="Attribute Table
" />


texts: Function "Extract by Mask" in batch mode - just one resulting layer

texts: I would like to clip 25 raster layers with self-made polygon using "Extract by Mask" function. The problem is that I am still receiving just one processed layer, instead of 25 processed layers. Despite the fact, that I am working in Batch mode and I always upload all layers, which I want to clip.


texts: Python module not being loaded at QGIS 2.1x startup

texts:
I run a university module which gets students to install and use QGIS2.18 to learn about GIS. One particular student - screenshot below - downloads and installs the .exe file but the python module does not load on startup, denying her access to python plugins. The Plugins menu isn't even completed when the program is fully installed using the default settings.

80 other students have installed it with absolutely no problems.

So what's the problem here?


texts: ArcGis 10.2 returning an enum status of EsriLicenseNotLicensed

texts:
I have an old VS project that was using ArcGis for a map control. I now have 10.2 on my machine. code that I used previously to find & initialize the license no longer works. I know the enums changed I fixed that. But still returns an enumstatus of EsriLicenseNotLicensed. I did find that in 10.xx one should call

if (ESRI.RuntimeManager.ActiveRuntime == null)
    ESRI.ArcGIS.RuntimeManager.BindLicense(ESRI.ArcGIS.ProductCode.EngineOrDesktop);

But that is for .NET what do I do for C++?
In my code I call

esriLicenseStatus enumStatus = esriLicenseNotLicensed;
IAoInitializePtr pLicense ( __uuidof (AoInitialize));
esriLicenseProductCode eProdCode = esriLicenseProductCodeEngine;

        while( enumStatus != esriLicenseAvailable )
        {
            pLicense->IsProductCodeAvailable ( eProdCode, &enumStatus );

            if ( enumStatus != esriLicenseAvailable )
            {
                if (eProdCode == esriLicenseProductCodeEngine)
                    eProdCode = esriLicenseProductCodeEngineGeoDB;
                else if (eProdCode == esriLicenseProductCodeEngineGeoDB)
                    eProdCode = esriLicenseProductCodeArcServer;
                else if (eProdCode == esriLicenseProductCodeArcServer)
                    eProdCode = esriLicenseProductCodeBasic;
                else if (eProdCode == esriLicenseProductCodeBasic)
                    eProdCode = esriLicenseProductCodeStandard;
                else if (eProdCode == esriLicenseProductCodeStandard)
                    eProdCode = esriLicenseProductCodeAdvanced;
                else
                    break;
            }
        }

later I call

pLicense->Initialize ( eProdCode, &enumStatus );

which also fails with an enumStatus of no license


texts: Vector grid in QGIS3 - Can I change the order of row number?

texts:
When creating a grid (e.g. dx=15,dy=20) in GQIS 3 the first cell begins from the upper left corner and continues to the bottom of the grid  as shown in the picture below.

Is there any way to define the way that the id cells are located? Is there any plugin in QGIS? In fact, I want to begin from the lower left corner and continue to the east (as MapInfo does) as shown below.


texts:
I have two layers.

Layer one is a multipolygon layer (can be split to single polygons if needed).

Layer two contains points, lines and polygons.

Using layer one, I want to spatially filter layer two so that when I load this new layer into QGIS, I only see the features from layer two that intersect with layer one.

I am aware this is called a view in Postgres and I have conducted research on this, but unfortunately I do not understand any of the guidance or documentation. Is it possible someone can explain this in a simple fashion, or point me to some simple guidance? I am quite new to Postgres, so maybe need to understand some other basic concepts first?

Here are some crude drawings on paint to demonstrate what I'm trying to do:

Layer 1:

Layer 2:

Resulting layer:


texts: Flagging when point feature(s) covered by tables (made as graphics) using ArcPy?

texts:
I've set up data driven pages to create a series of maps, but I'm running into a problem which seems like it would be quite common!

I've made some tables (as graphics) using ArcPy and the technique described an Answer to another Question: Adding Table to Layout View using ArcPy?.

However, with a series of maps, sometimes these graphics will cover my points layer.

Does anybody know how to (at least) flag when a point is hidden by my tables?


texts: Drawing charts(pie or bar) on map Arcgis Api for javascript

texts:
I googled this for a long time now . I am looking for a way to draw or add charts on map in any way.
I am using DynamicLayer and can query on any field and any layer but the is no way to draw charts.
There is InfoWindow/MapTip but it needs clicking on the map and that is not what we are looking for because of the clicking and mouse over need.

Something like this.


texts: Why are "capture line" etc not available?

texts:
I have a question about QGIS which I just started using. I loaded a shp file and want to edit different elements, but the tool for drawing a new line or adding new points does not appear. I can add a new polygon but not just a line it seems (for example I want to split a polygon by drawing a line) does anybody knows how I can find/use these tools.Thank you very much for the help.

Hendrik


texts: Rendering raster with fine structure at low resolution in QGIS

texts:
I have a raster showing a map with a lot of fine-scale structure (water depths and rivers) in QGIS, and I'd like to make the structure visible when the plot is low resolution.
Up close, I have beautiful plots showing connected flow paths:

However, when I zoom out, the water appears pixelated and the flow paths and connections are completely lost:

Is there a way I can change the image rendering to make the water appear connected at any resolution?


texts: How to get SimpleFeatureStore from OgrDataStore?

texts:
we want to create a SimpleFeatureStore for modify features but not successful. we have used the following code:-

OGRDataStoreFactory factory = new JniOGRDataStoreFactory();
          Map<String, String> connectionParams = new HashMap<String, String>();
          connectionParams.put("DriverName", "MapInfo File");
          connectionParams.put("DatasourceName", "C:\\Users\\User\\1\\test.TAB");
          DataStore store =(DataStore) factory.createDataStore(connectionParams);
          SimpleFeatureSource featureSource = store.getFeatureSource("test");
          SimpleFeatureType schema = featureSource.getSchema();
          SimpleFeatureCollection fc = featureSource.getFeatures();

          SimpleFeatureStore store = (SimpleFeatureStore) featureSource;

It gives us an error.

org.geotools.data.ogr.OGRFeatureSource cannot be cast to org.geotools.data.simple.SimpleFeatureStore


texts: Geoserver 2.7 - 'Bounding Box & Lat-Long Data' fetching problem from Oracle Locator database

texts:
I have installed Geoserver 2.7 & connected my Oracle (Locator) database with available 'gt-jdbc-oracle-13.2.jar' extension.

During layer publishing containing fields like 'Geometry', it failed to fetch 'Native & Lat- Long Bounding box' informations.

I have published the same data on Geoserver 2.7 - from Oracle (Locator) using 'Configure new SQL view...' but after data publishing the map rendering time is more than normal (my Lan speeed is 1.0 Gbps).

However, my previous instance of Geoserver 2.5 - Oracle (Locator) combination does the above mentioned task nicely & is perfect for my Web based Map.
(Refer to the image below)

Kindly advice on how to publish data with geometry from Oracle (locator) database from Geoserver 2.7 environment...!


texts: Making grid with certain spacing between lines along X and Y axis using ArcGIS Desktop?

texts:
We are doing the research about applying remote sensed data on hydro logical model . After delineating, the river basin from DEM data using Argis9.3, We have to map the remote sensed data derived from products like PERSIANN. Our task now is to create the grid with the same resolution with the available remote sensed data( for example 0.25degree x 0.25 degree). and have a certain corner that matches with the obtained data.

Does anyone know how to deal with our problem?


texts: Extraction of contour lines starting from 0 elevation

texts:
I need your help regarding extraction of contour lines in QGIS. I am new to QGIS (in GIS actually).

I followed the tutorials on extracting contour lines from DEM (which I downloaded from cgiar.srtm) using qgis. Everything went well except that there is no contour line with 0 elevation. The contour lines started with the elevation of 10. I checked the DEM file and the minimum value is 0.

How do I set the QGIS so that the resulting contour lines starts with 0 elevation (and that there is a contour line with 0 elevation)?

Thank you very much for your help.

Jake


texts: how to draw a polygon in leaflet and add it to geojson file

texts:
I am working on a small project with leaflet. the goal of the project is to show a geojson file and updating it dynamicaly from the window of the web site. I have imported the geojson file to the map. here is the code i used:

var geojson;

geojson = L.geoJson(lotData, {
    style: style,
    onEachFeature: onEachFeature
});

Now i want to update the geojson file: i want to add a polygon to the file dynamically and to delete an other one from the file. The problem is that i have no idea how to do it.


texts: ArcGIS Pro 2.0.1 crashes 100% of the time when closing panels

texts:
I just installed it last night. I can reproduce this problem 100% of the time with the symbology panel and the attribute table panel (and sometimes happens when I open them too).

Only happens when in DirectX mode, it works perfectly in OpenGL but doesn't render as nicely.

I updated my graphics drivers and it didn't help. Any thoughts? It's pretty unusable right now.


texts: QGIS 2.18.13 Points at intersections have More Information with the ID than what is in the database fields?

texts: Created Point Feature Class at all street intersections. When looking at the database fields I only get two fields yet when i use the Info tool I get several paragraphs of information including the intersecting street names which I really need. Where is this extra information stored?


texts:
I am working on mapping trails and reroutes of those trails in West Virginia. I'm going out with a GPS and walking everything and then coming back to the office to project everything on a map(s). The only problem I am having is that some of my trails and reroutes are not connecting at their intersections.

Is there a way to fix this in ArcMap or ArcCatalog so that I don't have to keep driving to the trails and rewalk them (i.e. is there like a spray paint or pencil option).

I've been trying to play around with it for a few days, and it's been a few years since I have had any formal training, but no luck so far.


texts: Steps to update OpenStreetMap back and forth?

texts:
I have both a PostGIS database with OSM data imported, and the same data in a SHP folder.

By adding missing information to the downloaded OSM data, both in SHP and PostGIS, I'd be able to contribute with the project.

If I need to also update my server from an OSM periodical diff, which would be the correct sequence of tasks? (I'm assuming that there is new info in OSM to download and new info on my server to upload, and that would be happening regularly).


texts: What is Shapely library alternative in R?

texts:
I want to manipulate 2D geospatial geometries in R.

I am used to using Shapely in Python but I am a newbie in R.

Can you suggest Shapely alternatives for R?