texts: Pearson correlation of two 1D array in Earth Engine

texts:
This GEE documentation addressed the correlation chart of two bands over a region.

// Define an arbitrary region of interest.
var sanFrancisco = ee.Geometry.Rectangle([-122.45, 37.74, -122.4, 37.8]);

// Load a Landsat 8 image.
var image = ee.Image('LANDSAT/LC08/C01/T1_TOA/LC08_044034_20140318');

// Get a dictionary with band names as keys, pixel lists as values.
var result = image.reduceRegion(ee.Reducer.toList(), sanFrancisco, 120);

// Convert the band data to plot on the y-axis to arrays.
var y1 = ee.Array(result.get('B5'));
var y2 = ee.Array(result.get('B6'));
// Concatenate the y-axis data by stacking the arrays on the 1-axis.
var yValues = ee.Array.cat([y1, y2], 1);

// The band data to plot on the x-axis is a List.
var xValues = result.get('B4');

// Make a band correlation chart.
var chart = ui.Chart.array.values(yValues, 0, xValues)
    .setSeriesNames(['B5', 'B6'])
    .setOptions({
      title: 'LC8 TOA B4 vs. {B5,B6}',
      hAxis: {'title': 'B4'},
      vAxis: {'title': '{B5,B6}'},
      pointSize: 3,
});

// Print the chart.
print(chart);

My question is how to get the value of their correlation? For example how to apply the ee.Reducer.pearsonsCorrelation() in this case?


texts: Understanding Add Surface Info Tool (Average Slope) vs Slope Tool?

texts:
What is the difference between the values calculated using the slope tool vs the slope option in the add surface information tool?

I am making a map that displays watershed slope (using the slope tool) and want to also show stream slope (using add the add surface info tool) but not sure if the calculated values are saying the same thing.

Add surface info tool (average slope bit):
http://pro.arcgis.com/en/pro-app/tool-reference/3d-analyst/add-surface-information.htm

Slope tool:
http://desktop.arcgis.com/en/arcmap/10.3/tools/spatial-analyst-toolbox/how-slope-works.htm#ESRI_SECTION1_C81D5590295342FF8C730744027A96C6

Here is an image showing the terrain slope and three oddly colored streams with their slope data (bottom left corner, first three rows):

Here is another pic of only landscape slope:


texts: pairwise (linear) distance between points of the same shapefile

texts:
Given a set of points representing villages stored in a .shp file, is there a way to compute the pair-wise distance (Euclidean) between them? What I would like to come up with is a sort of symmetric matrix to be further analysed statistically.

I am using ArcGIS 10.1 with an Advanced license.


texts:
I'm trying to map (using ArcMap 10.6.1) some climate change data and I'm not entirely sure how to classify the raster datasets. For this work I am focusing on four different climate change scenarios:

-2040 RCP 2.6
-2090 RCP 2.6
-2040 RCP 8.5
-2090 RCP 8.5
(RCP is epresentative Concentration Pathway and relates to greenhouse gas emissions, the lower the number the better....)

I'm focusing on things such as temperature + precipitation changes in any of the above four scenarios.

How should I classify this data?

Should I have the same number and range of classes for any given scenario using Manual classification, or should I use Equal Interval for each of the given scenarios?

My gut feel is that values should remain the same over the four different scenarios, however in the RCP 2040 it then becomes difficult to highlight any changes. I also am wary of adding too many classes (trying to stay below 5, 7 max) as things start looking a bit too complicated the more classes that are added.


texts:
A little off the beaten path...: Denmark has built a 1m:1block Minecraft World using real GIS data. Here's the home page, in Danish: http://gst.dk/emner/frie-data/minecraft/, and an ArsTechnica overview.

How did they do it, and how might others do the same for their home-land/country/province/county/city/backyard?


texts: How do I control rendering order of items in composer?

texts:
Alternative formulation of the question is:

Is there any other way apart from the order of adding items to the canvas of setting the rendering order>

The problem is that I want to change the map which was added first and the legend overlays the map so when I delete and replace the map the legend is underneath it.


texts: filtering multiple dates and then merge specific dates together

texts:
I have to filter dates for the working days of the month: "January 2020" and then I have to find the mean value of the working days.
 var collection = ee.ImageCollection('COPERNICUS/S5P/OFFL/L3_NO2')
    .select('tropospheric_NO2_column_number_density')
    .filterDate('2020-01-01', '2020-01-03');

How can I make the code for this?


texts: When trying to merge several raster files I get the message: /bin/sh: gdal_merge.py: command not found.  I am running QGIS version 3.2.0 on a Mac mini, Catalina 10.15.5. The raster files are geotif LIDAR files.


texts: Finding"NoData" area/percentage using ArcGIS Desktop?

texts:
I have a RGB raster that has been processed to remove cloud/shadow coverage and then put in a mosaic with other RGB rasters to fill in the missing gaps.  Unfortunately all the gaps have not been covered, so I have "NoData" areas.

I need to find either the area of those gaps or the percentage based on the entire area of those gaps.

I was recommended to convert my raster to a polygon, but I continue to get a general error message, One of more dropped items were invalid and will not be added to the control.

I thought this error had to do with having multiple values for one cell (RGB), so I converted it to a single band grey scale using the following method: Convert raster to polygon.  However, I still get the same error.

How might I go about this process?


texts: Did GDAL 2.0 change how Python creates ESRI Shapefiles?

texts:
The migration guide for GDAL 2.0 says:

  C++ API:

  OGRSFDriverRegistrar and OGRSFDriver are now deprecated. Use
  GDALDriverManager
  and GDALDriver instead.

I have only ever used GDAL Python bindings, so I'm not sure how or if this affects any code I write. I used to create ESRI Shapefiles like this:

driver = ogr.GetDriverByName('ESRI Shapefile')

Is this related to an OGRSFDriver? I tried to do

driver = gdal.GetDriverByName('ESRI Shapefile')

Which returns a driver but does not have any CreateDataSource binding in it.

Is it correct to continue to use the ogr.GetDriverByName('ESRI Shapefile') convention for GDAL 2.0+? If not, what should I use?


texts:
I am trying to zoom in to individual points, but when I do they disappear and I am not sure why.

These points were shot in arbitrarily, I have not projected them onto anything as of now.


texts:
I want to display popup with the data item, such as: name, coordinates, stationID, Attribute.

But my code has some problem that can't run.

    <link rel="stylesheet" href="https://unpkg.com/leaflet@1.5.1/dist/leaflet.css"
          integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ=="
          crossorigin="" />

This is my GeoJSON:

https://sta.ci.taiwan.gov.tw/STA_Rain/v1.0/Things?$expand=Locations&$select=name,properties&$count=true


texts: Adding GeoPandas Dataframe to PostGIS table?

texts:
I have a simple GeoPandas Dataframe:

I would like to upload this GeoDataframe to a PostGIS table. I have a Database setup with the PostGIS extension already but can't seem to add this Dataframe as a table.

I have tried the following:

engine = <>
meta = MetaData(engine)
eld_test = Table('eld_test', meta, Column('id', Integer, primary_key=True), Column('key_comb_drvr', Text),
                 Column('geometry', Geometry('Point', srid=4326)))
eld_test.create(engine)
conn = engine.connect()
conn.execute(eld_test.insert(), df.to_dict('records'))


texts: Loading and using 600k+ entities (from Oracle DB) in QGIS?

texts:
I'm new to QGis and working on some land register's datas.

I tried to load an Oracle spatial layer, but with more than 600k rows, it took a very long time to process, when it didn't crash.

After the layer has loaded and cached, I'm able to work with, but I'd like to find a solution to use it without waiting 10 minutes or more (with a good computer).

Is there a way to generate an approximative tile system wich would load datas on the fly, depending on the actual view boundaries and scale ?


texts:
I would like to find out why my interface is different from the tutorial one? I am using the free plan which the tutorial is based on. How do I access the same interface or has this changed?

Here is my interface

Tutorial Interface

https://www.youtube.com/watch?v=mKF5JuKRZp4&t=133s


texts: Displaying numerical values as symbols on 3D map in ArcMap or ArcScene?

texts:
I have a point shp theme with fields Lat, Long, Altitude (m), and Number.

The Number field – is a numerical parameter of each point (Lat, Long)
The Altitude field – is the elevation of each point (Lat, Long) above the surface.

Is it possible to put the Number field on a 3d map (with z= Altitude)?

(I want to put a numerical value to each point (maybe by size of its symbol) and then - elevate each point on its alititude).

Any idea is it possible or not, or how I can try to do it would help.

I use ArcGIS10, so try to find this possibility in ArcMap and ArcScene.


texts: Loading Grass 7.0 vectors in QGIS broken?

texts:
Running QGis 2.8.1 in Win7 (64bits), installed through OSGEO4W.
When trying to load a Grass 7.0 vector file in QGis, the program will simply crash without any notice. I can load old Grass vectors though. Is this happening with anyone else? I could not find any posts about problems with loading grass 7.0 vectors


texts: Opening/closing an MXD that uses "production mapping" for dynamic tables in Python

texts:
I am currently working on a project that requires using a python/arcpy tool to allow a user to create a map series report PDF. Without getting into much detail, the tool is used when in ArcCatalog or ArcMap where the user uses the interface to select the appropriate parameters. The tool generates a PDF report that includes a title page, table of contents, map series, and various summary reports.

The tool generates a lot of temp files behind the scenes in order to generate the report. Since the user may run the tool several times while in an ArcMap session, these files need to be deleted, so no locks can remain on them when the tool is completed. I had no problems with the locks being removed, until I added a dynamic table to the map series MXD that uses the "production mapping" extension.

The table updates for each map page based on the features of interest on each map page. Once I added this table, the features in the map series mxd are locked in the file geodatabase even after the python tool ends (and I made sure that the mxd variable is deleted).

So my question is why won't the MXD "close" now that I added this dynamic table? Thanks for any help.


texts: Removing Esri text formatting tags in QGIS?

texts:
I have got a shapefile that contains ESRI formatting tags in the column I want to use for labeling the layer in QGIS. The following is an example for a label of one feature (3 Labels in different colors for one feature):

<CLR red='110' green='110' blue='110'>ST-SUD-VL-03-1</CLR>
<CLR red='0' green='92' blue='230'>ST-SUD-XX-03</CLR>
<CLR red='110' green='110' blue='110'>ST-SUD-XX-02</CLR>

As far as I know there is no support for inline styling in QGIS yet: https://github.com/qgis/QGIS/pull/2856

As it is not possible to use these tags for coloring the labels I would like to get rid of the tags to have a clean column that just contains the text that should appear on the map.

I know how to use 'replace' in the expression builder but haven't found out how use wildcards.
For example i want to delete all <CRL> ***</CLR> -Tags but as the color-values are not static I cannot use a static replace-expression.

Any idea how to extract everything between the three opening- and closing- <CLR>-tag?


texts: How to convert all tables from FGDB into CSV using OGR2OGR?

texts:
I am trying to convert tables in FGDB to CSV formats.
I have 40 or more tables though by the way.

This is the code that i used and it seemed to work fine

ogr2ogr -overwrite -progress -f csv "D:\NGII_Emap\-al.csv" "D:\NGII_Emap\input_table.gdb"

however, when I see the results only the first file's name is -al.csv and the other csv files are as same as the FGDB tables.

I want all the output names as same as in the FGDB tables

What did I do wrong?


texts: access attribute values in OpenLayers2 rules

texts:
I have a web GIS where I use OpenLayers. I'm trying to make a FOR loop to generate a series of rules for my POI layer.
I have tried just like that:

http://pastebin.com/CTuiWd4V

My problem is that i cannot access attribute values of my layer in 3 parameters that I need: 'title', externalGraphic, and value.
Anybody can help me do that?


texts: Alternative to Symmetrical Difference (Analysis) in ArcGIS for Desktop?

texts:
I am trying to create a buffer that includes the green buffer where it is not intersected by the purple buffer (Purple buffer is mostly under the green buffer).

I don't have the symmetrical difference tool available to me.

Heres a screenshot:

https://www.dropbox.com/s/gbkcxqw3iux3l8o/Screenshot%202014-12-03%2012.00.56.png?dl=0


texts: How to import an Access database to GeoDjango?

texts:
I'm a I've just inherited a pile of institutional geodata that's stored in an MS Access database.  I need to pull that data out into a format that I can work with in GeoDjango--so I'm OK with shapefiles or exporting it directly to a more useful database (mysql or postgres).  What's the best way to do that?  I'm a GIS newb, so I'm hoping there's an easy solution here.

I can get access to an ArcGIS install to work with the data if necessary.


texts: I need to be able to draw a polygon in the field while the landowner is there to approve it.  Is there an app that is easy to use so all of the field hands can operate it? I also need to be able to export the file to be used in the equipment used to spray.


texts: Completely brand new to GIS - Help picking technology from the pros

texts:
I'm new to GIS and need to learn for an internship. I've been reading a lot and now need help picking technologies to use... particularly the map serving technologies.

Project requirements -

Free
Web Based Service
Able to display layers/features over Google Maps/Bing Maps
Able to select individual features/layers (Seems like open layers does this?)

e.g. select individual/multiple points/polygons

Works on 64 bit Red Hat
Compatible with PHP, PostGIS (seems like they all do)

What I've narrowed it down to so far...

GeoServer - Seems to be the easiest to learn and install. Not sure if I can use Google Maps with it though. Maybe with a WFS? Most questions tagged on this site.

MapServer - Seems tricky to install on 64 bit. (No MapTools FGS yet for 64 bit) 2nd most questions tagged on this site.

MapGuide - Looks cool and has cool features but it looks "youngest" and the documentation is behind so it might be hard to get things going fast. (by the time the internships over.) Least most tagged.


texts: Transfer metadata related to Image overlay in Google Earth pro from one system to another?

texts:
I have been working on Google Earth pro desktop software and have overlayed many JPG images over it.

Every time I close and open the software again, the images remain intact in there correct positions so most probably some meta data is being stored by the software to control the position,size and other aspects related to Overlayed images.

Now I want to shift to some other Machine (new laptop) but I don't want to set the positions, size and rotation angles of all the overlayed images again in my new laptop.

Is there some easy work around such that I can transfer all this information to my new laptop easily.


texts: creating a st_contains query with geographies not geometries

texts:
I'm trying to find all the geography points that are contained in a geography polygon, let say all the traffic lights within a given city or neighborhoods,

how can i convert this working st_intersect query to work with contained and remain with geographies not geometries

select count(*) from table1
where table1.UniqueID in (
SELECT table1.UniqueID
FROM table1 INNER JOIN table2 ON ST_Intersects(table1.point, table2.polygon)
where table2.UniqueID = 2);


texts: The extraction of the Sentinel-1 backscattering coefficient

texts: I want to do some calculations with the backscatter coefficient of the Sentinel-1 satellite. Do I need to filter the raw data（using mean or sigma Lee) on GEE?


texts: Using python to query a field in a layer in ArcMap 10.6

texts:
I am trying to query a field in a layer but it fails converting the nvarchar value '65N' to data type int. Is there a way I can prevent it from converting and simply just run a query and print the results?

Runtime error
Traceback (most recent call last):
File "<string>", line 7, in <module>
RuntimeError: Underlying DBMS error [[Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Conversion failed when converting the nvarchar value '65N' to data type int.] [NEO_1.SDE.P_Meters]

Python Code

import arcpy

fc = 'Database Connections\SDE.sde\NEO_1.SDE.P_PipeSystem\NEO_1.SDE.P_Meters'
field = 'SYSTEMNUMBER'

#systemList = ["9", "10", "12", "13", "21", "22", "27", "27A", "27B", "27C", "30", "31", "33", "34", "35", "36"]

cursor = arcpy.da.SearchCursor(fc, (field, "SYSTEMNUMBER"), """"SYSTEMNUMBER" = 009""")
# For each row print the
for row in cursor:
    # Print the name of the gas systems
    #
    print(row[1])
    result = arcpy.GetCount_management(fc)
    print('{} has {} records'.format(row, result[0]))


texts:
I have some fields calculations and I want to create a pyqgis plugin using my expressions but I get Unexpected errors. For example if I do my task using field calculator in QGIS then it works, if i use the same expression in QGIS modeler it works again but does not work when using the same expression in pyqgis.
I dont know why because I use the same expression.

Here is the pyqgis code :

outputs_QGISFIELDCALCULATOR_6=processing.runalg('qgis:fieldcalculator', outputs_QGISFIELDCALCULATOR_5['OUTPUT_LAYER'],'mynewfield',1,10.0,0.0,True,'left( "field1", strpos( "field1" ,'_')-1)',None)

and I get syntax error.

that is from model export and in the model working nice.

Finally i try advanced python field calculator but that now work for me.

If I use value=left( "field1", strpos( "field1" ,'_')-1) then I get error no module left. If i use value='left( "field1", strpos( "field1" ,'_')-1)' then I get this error -


texts: Attribute Values not showing when running a query

texts: The attribute values are not displayed for the 'Model Number' field when running a query yet the attributes are stored in the attribute table(When I say all unique, nothing comes up)!!


texts: This is probably a very simple question - but opening up ArcGIS, the measure tool is unhighlighted, how do I make it so it is visible? Am I missing turning on an extension or something?


texts: Is it possible to style the QGIS Message Bar using QSS?

texts:
I'm developing a GUI theme for QGIS 2.12 using QSS (QSS is very similar to CSS, but for styling Qt widgets). This is new functionality introduced in 2.12 Pisa. So far, results have been encouraging!

I want to style the QgsMessageBar. As you can see here, the default message area is tiny, so you need to scroll for anything longer than a few lines. I'd like to make it deeper.

I tried adding this to my .qss file

QgsMessageBar {
    background-color: red;
    height: 100px;
}

This has no effect. It's valid QSS - if there were errors, styling would break down. I've also tried to style QgsMessageBarItem (which is the widget which contains the actual message).

I see it's possible to style QFrame (which QgsMessageBar inherits from). Here, I've added some padding and a thick black border - there's a lot of QFrames :) I want to style the message bar only, and leave the other QFrames alone.

After some experimentation I found this, which nearly works...

QFrame QFrame {
    height: 100px;
}

However, this seems to have an odd side-effect; it opens up a new Map Composer window in the background (!)

Any idea how I can do this?

(QGIS 2.12.2 Pisa; Ubuntu Tahr 32 bit)


texts: I have more than 3 attributes to add to pie charts in QGIS, so I need a patterned fill e.g.dots, lines. Using a grey scale gives white, black and grey but using different shades of grey doesn't work Any suggestions?


texts: How can you parameterize ColorMapEntry in a style?

texts: Is is possible to parametrize ColorMapEntry in a style. I want to be able to specify different values for "quantity" in ColorMapEntry when I request a raster layer?


texts:
I have a lot of points with a GPS tracker and I need to simplify them.

I create view (location_view) in PostgreSQL (with PostGIS):

 SELECT location.id,
    location.added,
    location.latitude,
    location.longitude,
    location.pulse,
    location.speed,
    location.device_id,
    st_makepointm(location.latitude, location.longitude, (location.id)::double precision) AS point
   FROM location;

I used SQL:

SELECT st_simplify(st_makeline(d.point), 0.0001) from location_view d

And next I got LineString value and brought line to the map. But LineString сontains only coordinates. I need date in point.

How to add date to Point/LineString?


texts: ST_Difference on linestrings and polygons slow and fails

texts:
I am trying to create a new table of linestrings with their existing attribution that are "different" to some polygons and am struggling to get a working PostGIS query.

I have a table of linestrings (~130,000) that intersect polygons (~13,0000 which are valid), I created this table using ST_Intersects.

The query I originally tried to use was

CREATE TABLE new_lines AS SELECT
l.id,
l.value
ST_Difference(l.geom, p.geom)::geom(LineString, 27700) as geom
FROM
lines l,
polygons p;

This query ran for several hours and then failed due to GeometryCollection or MultiStrings, so had to amend my query to:

CREATE TABLE new_lines AS SELECT
l.id,
l.value,
ST_CollectionExtract(ST_Multi(ST_Difference(t.wkb_geometry, p.geom)), 2)::geometry(MultiLineString, 27700) as geom
FROM
lines l,
polygons p;

Whilst that was running I thought I would try the identical task in QGIS using "difference" and that successfully completes in 42 minutes giving me the results I expected.

The problem is that the Shapefile it creates is over the 2Gb limit hence needing to get a working PostGIS query.

I have also tried the other SQL found here: Trouble using ST_Difference to remove overlapping features and here Difference between two layers in PostGIS. So i tried this:

CREATE TABLE new_lines AS SELECT COALESCE(ST_Difference(l.geom, p.geom), l.geom) As geom
FROM lines l
LEFT JOIN
polygons p;

But both give me some good results but they do not seem to apply ST_difference to all the lines which is really confusing.

Am sure this should be easy to do but cannot understand why my first query is taking so long and two why these other solutions only partly work.

EDIT1:

So I amended my query to the following:

CREATE TABLE new_lines AS SELECT
row_number() over() AS gid, g.*
FROM
(SELECT
l.value
ST_CollectionExtract(ST_Multi(ST_Difference(a.geom, b.geom)), 2)::geometry(MultiLineString, 27700) as geom
FROM lines a, polygons b
where st_intersects(a.geom,b.geom)) g;

Which successfully ran in around 20 minutes, however, not all the lines are clipped to the polygon boundary. Some are some are not.

I have checked that all geometries are valid and that there are no duplicate features in either dataset.

So am very confused.


texts: Does anyone have a shapely install for python "dummies" guide?

texts:
I have read both questions in regard to installing shapely on a Mac (OS Mountain Lion) and haven't been able to figure it out.  I'm not familiar with python syntax and am just trying to get shapely installed so I can use the polygonizer plugin in QGIS.

I download and untar shapely to my downloads folder, but then I have no idea where to put it.  I tried to put in some of the script from How to install shapely for python 2.6 (Mac) NOT 2.7? and http://tumblr.pauladamsmith.com/post/17663153373/howtoinstallgdalshapely, but all I get is "SyntaxError: invalid syntax" when I paste it into the QGIS python console.  Example of something I tried:

      cd -> '/Users/blablabla/Downloads/Shapely-1.2.17'
        File "", line 1
          cd -> '/Users/blablabla/Downloads/Shapely-1.2.17'
              ^
      SyntaxError: invalid syntax
      LDFLAGS=/Library/Frameworks/GEOS.framework/Versions/3/unix/bin/geos-config --libs
        File "", line 1
          LDFLAGS=/Library/Frameworks/GEOS.framework/Versions/3/unix/bin/geos-config --libs
                   ^
      SyntaxError: invalid syntax
      CFLAGS=/Library/Frameworks/GEOS.framework/Versions/3/unix/bin/geos-config --cflags
        File "", line 1
          CFLAGS=/Library/Frameworks/GEOS.framework/Versions/3/unix/bin/geos-config --cflags
                  ^
      SyntaxError: invalid syntax
      python setup.py install
        File "", line 1
          python setup.py install
                     ^
      SyntaxError: invalid syntax

If someone has a basic explanation of what I'm supposed to be doing, it would be greatly appreciated.


texts: OpenGeo Client SDK set up for Windows 7 - what is ant path?

texts:
I am relatively new at this and so these questions may seem a little basic to most.
I have installed the OpenGeo Suite which includes the Client SDK on Windows 7.
I have also installed JDK6.

But I am not sure how to proceed with the following:

"This machine also requires Apache Ant installed and on the path. To verify this, type ant -version at a terminal prompt."
What is meant by 'on the path'?
And do I install Apache Ant binary or Source?

"The instructions below assume that you have added the bin directory of the Client SDK to your system path. This will allow you to run the suite-sdk command from anywhere on your file system."
What exactly is meant by system path?

Thanks in advance for any suggestions!


texts: Extracting source code from R functions in RStoolbox

texts:
I am trying to access the underlying code to the tasseledCap function in RSToolbox in R, but have been unable to view some of the, I think, internal functions.
Specifically, in the tasseledCap function, I am wanting to see what .TCcoefs and .paraRasterFun do.
I have looked at the source code on github, but can't quite find it. Does anyone know how to access this code?


texts:
I want to change the field type of a varchar to a date, but being synchronized does not leave me. The text format is 2018-01-01T14: 00: 00Z

When I try to change it in sql it gives me a bug:

ALTER TABLE executed_def_2018 alter column horafinejec type date;

And when I synchronized, I would pass it back to text. I wanted to know the best solution


texts: My location never changes on map even if i change the lat/long in the code

texts:
Location never changes, even with changed lat/long location.

Can someone suggest to me what needs to be done?

var geojsonObject = {

  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [
          -1.0107421875,
          5.703447982149503
        ]
      }
    }
  ]
};

var vectorSource = new ol.source.Vector({
  features:
  (new ol.format.GeoJSON()).readFeatures(geojsonObject, {dataProjection: 'EPSG:4326'})
});

var vectorLayer = new ol.layer.Vector({
  source: vectorSource,
  // style: styleFunction
});

var map = new ol.Map({
  layers: [
    new ol.layer.Tile({
      source: new ol.source.OSM()
    }),
    vectorLayer
  ],
  target: 'map',
  controls: ol.control.defaults({
    attributionOptions: /** @type {olx.control.AttributionOptions} */ ({
      collapsible: false
    })
  }),
  view: new ol.View({
    center: [0, 8.34],
    zoom: 5
  })
});


texts:
I'm making a map of Japan in QGIS which will span UTM zones 54 and a small part of zone 53 (central and North Honshu). I'm using Natural Earth raster and shapefile datasets with some WGS84 based location points plotted on, but would like to set a projection that represents the distances between points relatively accurately across the whole map (also giving an accurate scale bar).

Would just using Japan UTM zone 54 for the project CRS be suitable, or would someone be able to direct me towards a more suitable projection and how to implement this in QGIS?


texts: How does ArcGIS choose colors when adding layers?

texts:
Adding new map-able layers to a project automatically assigns a color. I haven't yet figured out according to which criteria or setting ArcMap choose which color to select - to me they appear to be always different and somewhat random.
So I'm curious if anyone knows where this is defined and how it can be manually set.

I found this related post which hints that it might be defined through a color scheme - maybe even a random one?

Tl;dr: Does someone definitely know

which color scheme does ArcGIS 10 use by default
where can I change this setting


texts: Extracting all points within buffer on either side of boundary using QGIS?

texts:
A boundary runs through the buffer shown. I am attempting to extract all points within the buffer on either side of the boundary, distinguishing which side of the boundary the points are on.

Is there an easy way to do this using QGIS?

I have 27 buffers in total and over 3000 points fall within these buffers so 'extracting by location' and then sorting visually is not feasible.


texts: Error while converting WGS84 => Albers-Siberia by ogr2ogr

texts:
While converting from one geosystem to another polygons crossed by 180 meridian left got split into eastern and western parts. Tool used - ogr2ogr library.

Initial geosystem - WGS84, target - Albers-Siberia. Desired projection is shifted from Greenwich to the center of Siberia. So splitting each Chukotka region polygons (the far eastern ones in Eurasia) by two is needless. But conversion doesn't eliminate this artifact.

Is there a way to fix the problem?


texts:
First of all, I am very new to the GIS world, so bear with me if the question is stupid.

I am using ArcGIS and here's what I try to accomplish:

I have a feature class (let's call it Areas) storing polygons with some extra data (name, id etc).
If I create a layer and publish this as a MapService, I can use it in my .NET application (or in the browser via REST) to display a layer containing all the Areas.
In my app, I can even do filtering (with LayerDefinitions) to only display a certain area at a time.

What I would like to do is (within the ArcGIS server, so that it is reflected on all clients) have one layer for each of the Areas in the feature table.

So the REST directory in a browser would display:

Layers:

Areas

Area 1
Area 2
Area 3

And I would be able to see the same structure in a TOC and control visibility on/off on each of the Areas.

The "projection" of turning every feature into a separate layer must be dynamic, so that if I add another Area, it would automatically become a new layer (IE no configuration or republishing the MapService).

Is this possible within ArcMap? Can I code it in Python and have it run inside the MapService somehow? Do I have to write a SOE ? Or isn't it possible at all (only on the client side)?


texts: Finding intersections on line using ArcPy?

texts:
I have a line feature class in ArcMap, as shown on the picture. This is a simple line layer, that was previously generated with extend to line tool.

Now I would like to know the coordinates of the intersections. I would like to get it via python, because I need to integrate this step to a script tool.


texts: Count intersections of lines with polygon

texts:
I got a dataset of streets, which are displayed as line segments. In another, independent dateset I have roundabouts as a point geometry.

Starting from these datasets, I want to count the number of streets which lead to the roundabouts. I would start to make a buffer around the point-geometry of the roundabouts and afterwards intersect the buffer-polygon with the streets.

But how can I count the number of streets, which intersect with the buffer?

QGIS 2.6.0


texts: How to add a KML from Google Map to OpenLayers2?

texts:
I would like to add this KML-link from Google Maps to an OpenLayers Layer instance.

The following code is not working:

var layer = new OpenLayers.Layer.GML("KML",
    "https://maps.google.de/maps/ms?authuser=0&
      vps=2&hl=de&
      ie=UTF8&
      msa=0&
      output=kml&
      msid=203149634091768565111.0004cf65c9b03cc8ae76c",
      {
        format: OpenLayers.Format.KML,
        formatOptions: {
          'extractStyles': true
        }
});


texts:
I'm trying to use a toolbox created by someone at Esri to help with the creation of bivariate choropleth maps.

I'm not sure, though, how to import the toolbox and the other files so that I can use them in ArcGIS Desktop.

I downloaded and registered the renderer just fine. The author gives the link to the zip file with the geoprocessing tool but does not give directions on how to add the tool to ArcMap.

Here is link to the blog where I found out about this method:

https://blogs.esri.com/esri/arcgis/2015/09/15/making-bivariate-choropleth-maps-with-arcmap/


texts: WMS getfeatureinfo() giving incorrect result

texts:
I am using openlayers and Geoserver. I have created a base layer using OSM and then added wms layer topp:states. I want to show a world map and on that show US states. I have added onclick functionality to get feature info. However, when I click at any states, it gives incorrect state name or no result. This further worsens when I zoom in/zoom out or change the scale.Here is my code:

CSS:

#map {

            position: relative;
            height:1000px;
            width:1400px;

            float:left;
            margin:0px ;
        }

Script:

 var bounds = new OpenLayers.Bounds(
           -180,-90,0,90
        );

        format = 'image/png';

        var options = {
             controls: [],
            maxExtent: bounds,
            maxResolution: 0.22563114453125,
            projection: "EPSG:4326",
            units: 'degrees',
            displayProjection: new OpenLayers.Projection("EPSG:4326")

        };
        map = new OpenLayers.Map('map', options);
        layer = new OpenLayers.Layer.OSM("Base OpenStreet Map");
     states = new OpenLayers.Layer.WMS(
            "NA states", "http://localhost:8080/geoserver/wms",
            {
                layers: 'topp:states', styles: '', transparent: true,  format: 'image/png'
            },
            { isBaseLayer: false, singleTile: false,displayOutsideMaxExtent: true, ratio: 1,yx : {'EPSG:4326' : true} }
        );
       map.addLayers([layer,states]);

Code with call to getfeatureInfo:

       map.events.register('click', map, function (e) {
                            document.getElementById('nodelist').innerHTML =   "Loading... please wait...";
                            OpenLayers.Request.GET({url:"http://localhost:8080/geoserver/wms",params:{
                                REQUEST: "GetFeatureInfo",
                                EXCEPTIONS: "application/vnd.ogc.se_xml",
                                BBOX: bounds.toBBOX(),
                                 SERVICE: "WMS",
                                INFO_FORMAT: 'text/html',
                                QUERY_LAYERS: [ map.layers[1].params.LAYERS],
                                FEATURE_COUNT: 50,
                                Layers: [map.layers[1].params.LAYERS],
                                 WIDTH: map.size.w,
                                HEIGHT: map.size.h,
                                x: Math.floor(e.xy.x),
                                 y: Math.floor(e.xy.y),

                               }, success:setHTML});
                            OpenLayers.Event.stop(e);
                       });

It may have to do with bounds or extents,but that's just my guess.


texts: Created coded domain that didn't eliminate excluded entries

texts: While working on a geodatabase, I created a coded domain that was designed to restrict a "Sp_Code" (species code) field to an approved list of ~80 species. I loaded data I knew had bad species codes that shouldn't be accepted under the domain's rules. However, I still found those entries in the feature class after I loaded the data. I double checked to make sure the domain was acting on the correct field. Did I miss something? Was there a domain conflict management process I missed or still need to complete?


texts:
I have a very large JSON file made up vector polygons, I want to use GDAL ogr2ogr to clip the JSON polygons and convert the AOI into a shapefile.

I see this can be done by ogr2ogr -f "ESRI Shapefile" <output>.shp <input>.json -clipsrc llx lly urx ury

However I do not know how to use GDAL commands... is it done via CMD or python terminal?

I have QGIS 3.0.3 installed, and GDAL downloaded as a .zip (extracted now) on my desktop.

can someone explain to process to execute this command?


texts: ArcGIS Server and Oracle SDO Geometry Interop - It Can't Be This Slow

texts:
I have an ArcGIS Map Server Map Service connecting to an Oracle 11G instance via Direct Connect.  There is no need for ArcSDE since our application doesn't need versioning, replication, or any other of the doo-dads that ArcSDE provides.  All we want to do is plot some dots on a map.

The Oracle table(s) have a SDO Geometry column containing only point geometry types.  I have implemented a spatial index, validated geometries, optimized tolerance...etc.  However, the rendering performance of a layer pointing at SDO Geometry column is awful - 15-20 seconds to render 10k points with very simple symbology.  I have actually found that using an event layer using raw x,y values is faster than using SDO geometry columns.

I will admit that I am more knowledgeable of MS SQL and PostGIS - but I've been pretty thorough in making sure I am doing good by Oracle.  I am hoping someone with more experience using Oracle SDO Geometry in their map services can provide more guidance - are there maybe a few gotcha's I'm missing.

UPDATE (Per Vince's Request):

Spatial Index SQL:  CREATE INDEX  ON "SGSDWADM"."SERVICELOCATION"("GEOMETRY") INDEXTYPE IS MDSYS.SPATIAL_INDEX

USER_SDO_GEOM_METADATA row:

Describe Output:


texts: Calculating the percentage cover of multiple polygons

texts:
I am creating a habitat map for a woodland dependent species. I have multiple woodland polygons. Across the landscape the density of woodland varies widely and I would like to show that difference. I think the best way to show this would be with a raster grid, with cell colour relating to the percentage cover of woodland within that cell.

How do I convert polygons into a raster grid showing percentage cover?


texts: QGIS: How to avoid using coalesce() in GPKG query layer for correct type casting?

texts:
I  query the following layer via DB Manager:
select fid, geom, cast((field2*100/field1-100) as double) as dev from table

field1 and field2 are integers and have NULL values. Now in the DB manager's result window it looks fine but when loaded as layer QGIS reads the column as string. Adjusting the query with coalesce():
select fid, geom, coalesce(cast((field2*100/field1-100) as real),0.0) as dev from table

QGIS reads the column as real.
select fid, geom, coalesce(cast((field2*100/field1-100) as real),0) as dev from table

QGIS reads the column as integer.
Now I know there's this answer I consider to be a workaround  for visualization and I don't want to filter NULL values beforehand since this snipped is supposed to be part of larger query involving all rows.
Why on earth does it need the coalesce function for a correct typecasting? I thought having NULL values in an attribute table something totally normal for QGIS? Or do I have to redefine 'NULL' as NULL again? Why is this stuff that incompatible?


texts: Getting error message in QGIS field calculator?

texts:
I have used an equation within the field calculator, that has previously worked in an older version of QGIS, I am currently using QGIS 3.6.2 the equation being:

(atan((xat(-1)-xat(0))/(yat(-1)-yat(0)))) * 180/3.14159 + (180 *(((yat(-1)-yat(0)) < 0) + (((xat(-1)-xat(0)) < 0 AND (yat(-1) - yat(0)) >0)*2)))

This is the answer found on a previous question within this forum that helped me to achieve the angle of each line within a layer. However I keep getting the error evaluation message using the newer version of QGIS saying...

  An error occurred while evaluating the calculation string: Cannot convert 'inf' to double.

What does this mean?


texts:
I'm working on PostGIS 2.3, PostgreSQL 9.4

I have two tables : point and multilinestring, and in the context of a consistency control routine I created many queries. One of them is about checking that the points are not isolated (ie not connected to the lines). But for some reason, even if in QGIS I, in my sense, properly snap the lines on the point, it seems there is a problem with the geometry since I do not get the expected results of the query. Here is the query (for simplification purposes, I just try to get the id of the lines that touches the points).

SELECT DISTINCT point.id, line.id FROM point
    LEFT JOIN line ON st_touches(line.geom, point.geom);

I tried some other queries to try and understand what is happening, and if I change st_touches to st_intersects with a st_buffer on the point geometry, it works. I also tried to simply get the lines that touches each other (since they should do so at the location of the points), but here again I do not get the expected results.

I also tried to st_linemerge the lines (since it is needed for the st_startpoint et st_endpoint functions) but again without satisfying results.

My projection systems are identical.

Would anyone have an idea on what could be the problem ?

I could provide the datas I am using, but I don't know how since there is some geometry (and therefore sqlfiddle is not an option).


texts: Using ArcPy to zoom to selected feature?

texts: Is there a way to zoom to the extent of a selected feature using the ArcPy module in ArcGIS Desktop 10.


texts: How to change two rasters to have the same dimension?

texts:
I am new in QGIS 1.8 and have the following problem. I have extracted two raster files (land_cover.asc and soil.asc) using a polygon of my study area (area.shp). Apparently the raster dimensions are slightly different (1261:1264 vs 1259:1261) even though they are both supposed to be the same (since were extracted based on the same shapefile).

What would be the better way to do these two rasters with the exact same dimension in QGIS.


texts:
I want to run this expression; Note that it should be raised to power1/3.
'[Band5*(256-Band4)*(Band5-Band4)+1]"^"(1/3)',  {

And I'm getting this error;
Image.parse Expression: Expression parse error at character 0:
'[Band5*(256-Band4)*(Band5-Band4)+1]"^"(1/3)'
 ^.
Is my expression correct?


texts: Calculating the length of the network lines inside polygon in QGIS 2.10.1

texts:
I am working with 2 datasets:

delineations of the neighbourhoods
traffic network.

This is how they look:

I would like to calculate the length of the roads per neighbourhood (polygon). As you may expect some of the roads are in more than one neighbourhood so what I have to do first is "cutting" them at point where they are crossing with polygon boundaries. I have tried to use intersect tool but it did not work. I always got empty file as an output. The projection I am using is RD New (for both files) so it should work. Any ideas how can I achieve my goal?

When I have roads cut I would calculate the length of every line and afterwards  sum these lengths up per neighbourhood. Is it a good way to do it?


texts: Relating input data to output data in GRASS in QGIS 3

texts:
In QGIS 3 there are a number of useful vector tools available via GRASS functions. However, the output of many of these only contain 'cat' attribute in their output.

For example, if I run the routing tool v.net.allpairs, it outputs a number of routes in an input vector line layer that connect all the input points in an input vector point layer.

But since the only attribute in the output line routes are 'cat' and to and from 'cat', it's difficult to fetch attributes of the original input points (for example if I want to transfer a flow magnitude between two points in a network to the route line connecting them).

So, how do I best make sure that vector input to GRASS either keeps its original attributes in the output, or has unique id(s) that can be used to retroactively rejoin the original attributes?


texts: GeoNetwork not displaying all harvested metadata with Dublin Core schema

texts:
I have a GeoServer 2.6 installed with the CSW plugin.  I can make a call to GetRecords using the standard ISO19115/19139 schema and see all of the metadata.  My main interest here are keywords that I am manually adding to a layer.  When I change the output schema to Dublin Core (outputSchema=http://www.opengis.net/cat/csw/2.0.2), everything looks good... the keyword values all show up as  elements.  All other metadata is properly populated... abstract, references, description, type, creator, etc etc.

Using GeoNetwork 2.10.4, I harvest my GeoServer CSW.  When I call GetRecords using the ISO schema, everything looks just as it does on GeoServer.  All of my metadata is present.  However, when I change the output schema to Dublin Core, almost all of the metadata disappears.  A single Record element only contains an identifier, date, BoundingBox, and URIs to my WFS and WMS.  All of the other metadata has vanished.  If I create a brand new metadata record from within GeoNetwork using the Dublin Core template, it shows every dublin core field, regardless if it's populated or not.  My request looks like this:

geonetwork/srv/eng/csw?service=CSW&version=2.0.2&request=GetRecords&typeNames=csw:Record&resultType=results&elementSetName=full&outputSchema=http://www.opengis.net/cat/csw/2.0.2&constraintLanguage=CQL_TEXT

Does anybody have any idea why the GeoNetwork Dublin Core output schema isn't showing much of the data that does appear in the ISO output schema for my harvested data?


texts:
I'm busy working on a project and I have orthorectified and atmospherically corrected SPOT5 images. We now need to create a point shapefile and then extract the spectral value of the cell at that point.

I am struggling with extracting spectral values. We are using PCI geomatica and/or ArcGIS in our processing. Is there a way of doing this on either one of the softwares?


texts: Raster file statistics in R (stars and raster package) don't match gdalinfo

texts:
I'm trying to read a gridded binary file in R using read_stars. Comparing the stats from stars package to the stats from gdalinfo, I could see differences in min/max values. Below is the sample code.

library(stars)
library(sf)
library(tidyverse)
library(fs)
library(raster)

url <- 'ftp://ftp.wpc.ncep.noaa.gov/pwpf/conus_2.5km/2.5kmpwpf_72hr/2.5kmprcntil_72hsnow_90pt_latestf072.grb'
file <- 'snow.grb'
download.file(url, destfile='snow.grb')

snow.stars <- read_stars('snow.grb')
snow.stars %>% as_tibble() -> snow.stars.tibble
snow.stars.tibble %>% summary(mean=mean(snow.grb, na.rm=T), min=min(snow.grb, na.rm=T), max=max(snow.grb, na.rm=T), sd=sd(snow.grb, na.rm=T))

# snow.raster = raster('snow.grb')
# cellStats(snow.raster, stat='min', na.rm=T)
# cellStats(snow.raster, stat='max', na.rm=T)

with gdalinfo the stats are (gdalinfo -mm -stats snow.grb)
Minimum=-0.000, Maximum=0.910, Mean=0.043, StdDev=0.115

The min/max values returned by gdalinfo are matching with qgis as well.

with stars, I'm getting these.
max: 0.917, min: -1.17e-6, sd: 0.106 and mean: 0.0384

What am I missing?


texts: OpenLayers 4 - select and highlight feature by attribute not working

texts:
I am working on a web app using OpenLayers 4.6.5, with a WFS layer from PostgresSQL via GeoServer 2.5.

I first click and use forEachFeatureAtPixel to get all the feature names at a given location. Then I populate a popup at that location with the list of names (each name is clickable as a  element).  Then I want to highlight the specific feature by clicking on its name in the popup, by first iterating through the feature list in the layer and searching by the chosen name, then using Select to highlight the matched feature in the map.

Everything seems ok until the last step, where I am getting odd results. When there is only one feature at that location, the feature highlights when clicked (not when I click the link in the popup as desired), and the highlight does not clear when I click another feature.  If there is more than one feature link in the popup, the selected feature will highlight for a brief moment, then the highlight is gone.

The code snippet is below. (note that 'event' in the code refers to map features that are street events, not to js events)

var select = new ol.interaction.Select({
            style:function(feature, resolution){
                var select_geom_name = feature.getGeometry().getType();
                return select_styles[select_geom_name];
            }
        });

        map.addInteraction(select);

    $('.this_event').click(function(){ // class of <a> links in popup - feature names
        select.getFeatures().clear(); // doesn't seem to do anything ?

        var selected_text;
        var selected_features = [];

        selected_text = $(this).text(); // from links in popup- gets name of feature
        selected_features = select.getFeatures();

        var feature_list = layer.getSource().getFeatures();
        for (var f=0; f<feature_list.length; f++) {
            if(feature_list[f].get('eventname') === selected_text) {
                console.log("match: " + feature_list[f].get('eventname'));
                selected_features.push(feature_list[f]);
                console.log(selected_features.length); // undefined
            }
        }

    });


texts:
I work with QGIS 2.14 and I want to create a map of road network showing the slope of each road with at least this scale: <3%; 3-5%; 5-7%; 7-9%; >9%.
I already have a vector layer of roads and the DEM.
However, calculating the slope directly using the DEM data is not correct given that all my roads do not have the same direction as the direction of the slope. When I implement this step, some of my roads that are fully flat are referenced as being steep, although it follows the contours of the hill without climbing or descending.

I am absolutely not used to work with GRASS or any solution where coding skills are required.

I know that the website OpenRunner provides a solution but the categories are 0-5%, which is not precise enough for me.


texts: Using point sampling tool in Mapinfo Vertical Mapper?

texts: I have series of points in Mapinfo. I need to extract elevation from a DEM for these points in Mapinfo. I point sampling tool in Qgis to do this . Unfortunately I don't have access to Qgis and need to do it in Mapinfo. I know that i need to do it in vertical mapper but unfortunately can not find it.


texts: Exporting route from QGIS Roadgraph plugin?

texts: I've created a route with qgis roadgraph plugin, and I want to create a  shapefile (line) from this. I've tried with export, and save as .shp, but the new shapefile doesn't show the line!


texts: How to let users download data from Geoserver?

texts: I'm looking for a way to let user download data made visible to him from Geoserver. I was thinking about using WFS for this purpose, but I don't know how to make it authenticated/secured? Do I have any other option?


texts:
I am trying to download Landsat 5 tile on USGS explorer from the  Landsat Collection 1 and Landsat Collection 2 dataset in order to do temporal analysis.
However, in Africa, I can only retrieve a few images between 1984 and 2002 (approximately one every two year). In other continent such as Europe, I can access all images (every 14 days).
Is it a USGS issue, or can I get the data somewhere else ?
PS : I am posting my issue here because custserv@usgs.gov has not answering to me.


texts: Is it possible to decrease detail level (decrease file size) in Spatialite OSM export?

texts:
I currently use Spatialite exports from OSM data (together with Google maps like styles by Underdark) which are very useful for me as the files are easily portable with the project and I do not need Internet connection.

However, sometimes the result is a huge file - for example, my current area:

ogr2ogr -f "SQLite" -dsco SPATIALITE=YES -spat 14.20622 50.57070 17.32913 48.81776 Jeseniky.db czech-republic-latest.osm.pbf

results in about 1.7 GB file which loads slowly even on powerful machines. In fact I do not need so much detailed map data for common use.

Is it possible to create similar Spatialite file from OSM data, but with data reduced to equivalent of 1:100 000 or  1:50 000 scale?

It would be perfect and I suppose I could have whole country in such detail level for common use and sometimes only would export "full detail" area as I currently do.

is it possible?

thanks


texts: Extract time series from .nc files for many locations simultaneously

texts: I would like to extract the time series from a NetCDF file for several points (lat, lon, combinations). How could I do that, so that the  lat lon values are read each time from a .csv file?


texts:
I am using QGIS 1.9 master with Ubuntu 13.04. I tried to use the SAGA hydrology tools in sextante today and it said they did not appeared to be installed. I checked and sure enough SAGA was indeed installed.

I did some searching and found out I need to update SAGA to version 2.1. I added the unofficial ppa (ppa:johanvdw/saga-gis) and ran sudo apt-get update and tried to install. I get a message telling me it is already installed. So I uninstalled 2.0.8 and tried again. It just reinstalled 2.0.8. I tried targeting the install sudo apt-get install -t saga-gis saga. it told me there was no saga-gis. I opened the synaptic package handler to choose the packages manually and nothing shows up their either. However, when I look at the software and updates section I can clearly see the added repository and according to the launchpad site their is a raring version. Here is a picture showing synaptic.
Any ideas??


texts: ggplot2 plots polygons with wrong topologies

texts:
I'm trying to plot polygons in R using ggplot2. In GRASS, QGIS and normal R the map renders fine, but ggplot2 seems to have some kind of topological difficultes I can't explain. With normal R it looks like this:

library(rgdal)
library(ggplot2)
regions <- readOGR(dir, layer)
plot(regions)

And with ggplot2:

ggplot() + geom_polygon(data=regions, aes(long, lat))

To add to the confusion, gplot2 is connecting polygons that have absolutely nothing to do with each other - Iceland to Ireland, for instance. How can I fix the plot?


texts: Manipulating Sentinel-1 SAR Imagery to get Pixel Information

texts:
For S1 SAR imagery data, how would I go about accessing the data of individual pixels? I need to analyze pixel intensity based on their lat and lon coordinates. I know this information is viewable in SNAP, but I need to analyze a lot of information, so I need a way to do this in python. I'm looking through the pyroSAR documentation but nothing seems to discuss this issue.

This is the file I'm starting with.
S1A_IW_GRDH_1SDV_20190911T225046_20190911T225111_028980_034973_7D9E.zip


texts: OSGeo4W does not add bin directory to Windows PATH

texts:
I am trying to run the following shp2pgsql cmd using the OSGeo4W shell:

shp2pgsql -s 4269 -g geom_4269 -I -W "latin1"
"tl_2012_states" staging.tl_2012_states |
psql -h localhost -p 5432 -d dvdtwo -U postgres

but I am getting the following error:

'shp2pgsql' is not recognized as an internal or external command, operable program or batch file

I have tried updating the environment variable path to include the PostgreSQL\9.5\bin, but that hasn't worked.

What should I try next, or what do you think my problem is?

I am using, PosgreSQL 9.5, QGIS 2.18.5, PostGIS 2.0


texts: Loading water layer from webpage maps-for-free.com into QGIS?

texts:
I have loaded the relief map from https://maps-for-free.com/ using plugin QuickMapServices. The process is as follows: in my data_sources folder (C:\Users\PC1.qgis2\python\plugins\quick_map_services\data_sources), I created a new folder called freemap_relief and inside that folder I saved a notepad file named metadata.ini, and then typed in this notepad file these following lines:

  [general]
  id = freemap_relief
  type = TMS
  is_contrib = True

  [ui]
  group = Freemap
  alias = FreemapRelief
  icon = freemap.svg

  [license]
  name = CC0
  link = http://creativecommons.org/
  copyright_text = unknown state
  copyright_link = http://www.maps-for-free.com
  terms_of_use = http://www.maps-for-free.com

  [tms]
  url = http://maps-for-free.com/layer/relief/z{z}/row{y}/{z}_{x}-{y}.jpg
  zmax = 19

Then I restarted my QGIS, and clicked on Web > QuickMapservices > Freemap > Freemaprelief:

And then the map was successfully loaded:

However, the relief map at https://maps-for-free.com/ has water layer and some other layers like street, admin, crop, sand, etc. but the map loaded to QGIS has no layer at all.

I just want to add only the water layer, but how do I do that?

My QGIS version is 2.18.21 running on Win10 x64 bit.


texts: I am using QGIS 2.18 and I have approximately 7000 road records,give or take, which require 850 of the records to be renumbered and I can not have duplicates values in the OIRID field. I need to start the record value inn the OIRID field at 6593 and sequence each record by 1 to the end to ensure I do not have any duplicates I am not having any luck with this task.  I need help accomplishing this.


texts: osm2pgsql: Import data in custom projection

texts: I have osm-file and I want to import it to the postgresql via osm2pgsql with custom projection EPSG:20022. I look to the help and found out any keys like -E EPSG: but when I try to do with it I get the data in SRID=4326. Is there a way how to fix it?


texts: Do I necessarily need coordinates for spatial prediction?

texts:
Commonly, it is stated that spatial prediction is the same as spatial interpolation, i.e. the estimation of values based on the observations' location:
y ~ lon + lat
Others state, that spatial prediction is more general than spatial interpolation, allowing also for other covariates:
y ~ lon + lat + x1 + x2
My question is: Do I really need the coordinates as covariates in order to have a spatial prediction model? For instance, isn't the following model also a spatial prediction model if the covariates x1 and x2 are "spatial", meaning that they have some relation to space (like measuring the distance to a certain feature or the amount of greenspace within a certain buffer):
y ~ x1 + x2
If yes, wouldn't this make basically every model using real-world data a spatial prediction model?


texts: Difference between adding spatial layer from MSSQL through "browser" and "add MSSQL table"

texts:
So I am trying to pinpoint the difference of adding layers from MSSQL Database that contains spatial layers like geography and geometry.

I have noticed that when adding from the browser it retains it in one layer meaning that the spatial layers are all in one file so both geometry and geography are in one layer while adding a spatial layer from add MSSQL layer on the side panel breaks my layer into four namely polygon,multipolygon,points,and another polygon and each layer has a specific spatial layer.

I was just wondering if anyone notice that and why it does that. Further what is the best way to upload your spatial layer data from Databases.


texts: Where to find ready to use automate shadow detection algorithm?

texts:
I am searching for an algorithm to make a shape file of every shadow in Landsat image (30 meters per pixel). I need to classify lakes at the image, but territory is very mountainous and shadows are classified as lakes.

Found some article but i haven't found this algorithm as a code.

http://www.asprs.org/a/publications/pers/2001journal/july/2001_jul_833-839.pdf

It would be perfect if you give me a link to ready to use algorithm (as a code or executable programm). It would be even greater if this code will be made for Arcmap or ENVI.


texts:
UPDATE: The SQL below works fine. My problem was a newbie mistake in using the Python psycopg2 functions to execute it. So I think I should just delete this question.

ORIGINAL QUESTION: I have a large number of possibly overlapping rasters and need to be able to sample all those that intersect a point at that point.  My first attempt was to create a single table containing all of the rasters, and query as such:

SELECT ST_Value(rast, 1, ST_MakePoint(-122.0, 38.0))
FROM table_name
WHERE ST_Intersects(rast, ST_MakePoint(-122.0, 38.0));

This returns a value for one raster, but not all of the intersecting rasters. It seems that a single raster coverage table is not designed to be used this way.

Is the proper approach to create separate tables, grouping together non-overlapping rasters?

What is the best strategy?

I am hoping to keep everything in a single table if possible.  I am pretty new to PostGIS and SQL.


texts: How to delete multiple columns in the QGIS processing model?

texts: I made the union of two tables I want to erase some columns. How can I do this automatically?


texts: Creating Origin Destination Matrix from Station Locations

texts:
I am attempting to create an origin destination matrix in python for all of the London Underground Stations. I have the station name and the lat, lng of its location. It is in the following csv format

Station Lat Lng
Abbey Road  51.53195199 0.003737786
Abbey Wood  51.49078408 0.120286371
Acton   51.51688696 -0.267675543

I wish to turn this list of stations into a matrix of all possible combinations of these stations. So, for the example above, I would like to achive:

O_Station   O_Lat   O_Lng   D_Station   D_Lat   D_Lng
Abbey Road  51.53195199 0.003737786 Abbey Road  51.53195199 0.003737786
Abbey Road  51.53195199 0.003737786 Abbey Wood  51.49078408 0.120286371
Abbey Road  51.53195199 0.003737786 Acton   51.51688696 -0.267675543
Abbey Wood  51.49078408 0.120286371 Abbey Road  51.53195199 0.003737786
Abbey Wood  51.49078408 0.120286371 Abbey Wood  51.49078408 0.120286371
Abbey Wood  51.49078408 0.120286371 Acton   51.51688696 -0.267675543
Acton   51.51688696 -0.267675543    Abbey Road  51.53195199 0.003737786
Acton   51.51688696 -0.267675543    Abbey Wood  51.49078408 0.120286371
Acton   51.51688696 -0.267675543    Acton   51.51688696 -0.267675543

Obviously, at this point I will need to cancel out the 0-0 combinations.


texts: Forcing users to select input from specific geodatabase using ArcPy?

texts:
I am trying to write an ArcPy script tool to simplify the spatial join tool for users. In particular, I want to:

1) Let user choose the target feature class.

2) Let user choose the output feature class name and location.

3) BUT force the users to choose between two particular feature classes (Districts and Countries) as the join feature class, which are stored in the workspace/folder that I would be sharing with the users.

Is number 3 possible? If so, how? I'm envisaging a dropdown list in the script tool interface, and they choose one of the two feature classes as the input. I have found some help pages that seem to come close to what I need but I can't quite get there. E.g. Limiting feature class parameter to specific geodatabase? - but in this example and others the input for the second parameter is based on the first, which is not the case for me.

My script so far is below. I have added "listFCs = arcpy.ListFeatureClasses()" because I feel like I'll need it but not sure how. I'm assuming I need to either edit "joinFC = arcpy.GetParameterAsText(1)", or change something in the script tool Parameters and/or Validation tabs, but I'm just not sure what.

I'm very new at this.

# This script creates a new "Country" or "District" column, using a Spatial Join,
# and populates it for each feature based on the district/country.
# Users can choose whether Country or District is the input.

import arcpy
import os
arcpy.env.workspace = os.path.dirname(os.path.realpath(__file__)) + "\Add Country or District Column\Districts_Countries.gdb"

arcpy.AddMessage("Workspace: " + arcpy.env.workspace)

# Get a list of all Feature Classes in the workspace - this should just be countries and districts
listFCs = arcpy.ListFeatureClasses()

# User input for the file that will have the extra field populated
targetFC = arcpy.GetParameterAsText(0)

# User input for the shapefile/FC that will be used to populate the extra field - i.e. Country or District
joinFC = arcpy.GetParameterAsText(1)

# Split the file path string for joinFC, so that the FC itself can be used in the final AddMessage statement
splitjoinFC = joinFC.split("\\")

# User input for the name and location of output file (input FC + column from joinFC)
outFC = arcpy.GetParameterAsText(2)

# Split the file path string for outFC, so that the FC itself can be used in the final AddMessage statement
splitoutFC = outFC.split("\\")

# Perform the spatial join
arcpy.SpatialJoin_analysis(targetFC, joinFC, outFC)

# Delete the extra fields that were added to the outFC during the spatial join
arcpy.DeleteField_management(outFC, ["Join_Count", "TARGET_FID", "GlobalID_1", "Shape_Leng", "Shape_Length_1"])

arcpy.AddMessage("\n" + splitjoinFC[-1] + " field added to " + splitoutFC[-1])


texts: Spatialite in .NET Application - AccessViolationException was unhandled

texts:
I am trying to use Spatialite in a .NET application using the System.Data.SQLite provider.  Interestingly enough, everything works as expected except an error gets thrown at the very end when the connection is closed.  The specific error is "Attempted to read or write protected memory.  This is often an indication that other memory is corrupt."  The same thing happens if I wrap this function is a using statement.  If I remove the conn.Close() it still bombs out.

Any ideas?

try
            {
                conn = new SQLiteConnection(connectionString);
                conn.Open();
                cmd = conn.CreateCommand();

                cmd.CommandText = @"SELECT load_extension('libspatialite-2.dll');";
                cmd.ExecuteScalar();

                cmd.CommandText = "SELECT AsBinary(Geometry) AS WKB from country";
                rdr = cmd.ExecuteReader();

                while (rdr.Read())
                {
                    //do work
                }

            }
            catch
            {
                // error handling here
            }
            finally
            {
                if (!rdr.IsClosed)
                    rdr.Close();

                rdr = null;
                cmd = null;
                conn.Close();
                conn = null;
            }


texts: List of polygon neighbours with field calculator in QGIS 3

texts:
I'm using QGIS 3.16 Hannover. I've got a hexagon grid layer and I want to create, with the field calculator, a new field with the id's of the surrounding polygons. I've adapted the following expression from this tutorial:
aggregate( layer:='grid',
           aggregate:= 'concatenate',
           expression:= "id",
           filter:= touches($geometry,geometry(@parent)),
           concatenator:=', ')

But it returns an error
An error occurred while evaluating the calculation string:
Could not calculate aggregate for: id

Why is that?


texts: Error when loading WFS layer. Missing coordinate reference system

texts:
I am trying to load several layers from:
http://idesc.cali.gov.co:8081/geoserver/wfs?

In the window "Add WFS layer" appears EPSG:6249, but after adding appears a second window, "CRS selector", where I cannot find this ID.

If I click on "Cancel" I always get this error for all layers:

Download of features for layer idesc:mc_comunas failed or partially failed: Server generated an exception in GetFeature response: org.opengis.referencing.NoSuchAuthorityCodeException: No se ha especificado ninguna autoridad para el código "". El formato esperado es normalmente "AUTORITÉ:NOMBRE". No se ha especificado ninguna autoridad para el código

How to import this CRS?


texts: Error in Symbol Selector Sample for ArcGIS Engine?

texts:
I am stuck at running this ArcGIS Engine Sample code, when I get:

  COM EXCEPTION WAS UNHANDLED BY THE USER

I'm looking for any working example of Symbol Selector.

I'm working on XP SP3, ArcGIS 10.1 and ArcGIS Engine 10.1


texts: pg_dump on tiger.loader_platform not having any inserts

texts:
I am trying to backup the tiger.loader_platform" table. There are three rows in the table.
I have tried this command on the same same database under the public schema and I am getting insert statements in the outputted sql file "loader.sql"
However when I try it on the tiger.loader_platform I don't get any insert statements.
pg_dump  --table="tiger.loader_platform" --data-only --column-inserts MYDATABASE > loader.sql

The contents of the file is
--
-- PostgreSQL database dump
--

-- Dumped from database version 13.0 (Debian 13.0-1.pgdg100+1)
-- Dumped by pg_dump version 13.0 (Debian 13.0-1.pgdg100+1)

SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;

--
-- PostgreSQL database dump complete

Any idea why I am not getting the insert statements when I go pg_dump on the tiger.loader_platform table?


texts: QGIS Vector layer stretched across entire map

texts:
I have a weird problem.
I've imported the vector layer with extends between 2 hemispheres near international date line. It means the map bounds in QGIS.
Unfortunately instead of having the object split by 2, where one part goes east of International Date Line, and another one west of this line, I have it stretched across the entire map. Moreover the nodes seems to be mirrored. It means, that the polygon isn't where it should be, but everywhere outside of it bounds.
Is there any chance to make this object right?

The blue one is correct, the pink one incorrect


texts: Returning distances in meters from Near (Analysis) tool of ArcGIS for Desktop?

texts:
I'm trying to write a python program that returns the distance from each point in a set to the nearest road.

Specifically, I was looking for any points within 10 meters of the roads.

Both sets of data use WGS84 coordinates.

Near_analysis runs just fine and returns the right results when using "10 Meters" for the radius option, but the distances returned are in degrees, and I want them in meters for further analysis.

I know I can use a different projection and get the meter measurements I am looking for, but if Near_analysis can search for a radius that is measured in meters, why can't it return results in meters?


texts:
I am using easybutton plugin for leaflet. Is there a possibility to display an image+some text when mouse is over on the button?

Here is my current code:

 var btn2 = L.easyButton ({position: 'topright',
  states: [{
    stateName: 'NoSources2',
    icon:'   masquer le nombre de resources',
      title: 'NoSources' ,
      onClick: function(control) {
                map.removeLayer(NoSources);
                control.state('NoSources1')},
    },
    {
     stateName: 'NoSources1',
    icon: '   voir le nombre de resources',
    title: 'NoSources',
    onClick: function(control)  {
    map.addLayer(NoSources);
    control.state('NoSources2')},
  }]
});
btn2.addTo(map);


texts: Extract images parts from GeoTIFF file using polygons in a shapefile

texts:
I would like to know if there is any way that I can extract images from a GeoTIFF file using an ESRI shapefile which contains shapely polygon data for specific locations in the image in Python.

I would like to extract an image per polygon in the shapefile. The closest I have gotten to this until now is using gdal_rasterize to mask out all the areas outside the Polygons and creating windows using rasterio.


texts: Export to PDF and Print to PDF not working 10.4.1

texts:
Has anyone had issues with shapes not appearing when exported to PDF or Print to PDF?

This has been happening a lot lately and I don't understand what the issues is.


texts:
I have a KMZ file that contains several image overlays (RF coverage plots).

I would like to convert the image overlays to polygons to decrease loading time in Google Maps.

Currently I'm tracing a rough outline of the image but that is labor intensive and not very accurate.

Is there a way to automatically convert a image to a polygon?

I have Google Earth and Manifold GIS. ArcScan looks promising but it is outside of my budget.


texts:
I am writing a small program that runs through a ton of different shape files, tab files and geodatabases and gets their extent (about 10000- 100000 files).

I am opening these using the GDAL python library. I am using Python 2.7 and GDAL 2.2.3 on a windows 7 platform.

Unfortunately, some of these layers are completely corrupted, which causes GDAL to crash with a system error code.

  ERROR:root:Could not read layer g:\31\23922\Tech\SWMM\Heatherton\Data\Heatherton_NS_draped.TAB

  Process finished with exit code -1073741819 (0xC0000005)

My code looks like:

import ogr, logging, osr
path = r'g:\31\23922\Tech\SWMM\Heatherton\Data\Heatherton_NS_draped.TAB'
def check_path(path):
    try:
        logging.debug(path)
        ds = ogr.Open(path)
        if ds is None:
            return None
        for i in range(ds.GetLayerCount()):
            print ds.GetLayerByIndex(i).GetExtent()
    except:
        import traceback
        traceback.print_exc()
check_path(path)
print 'amIhere?'

I am fine with skipping this file. I just want to reach the
print 'amIhere?' part.
Or best case scenario: reach the except block.

But the fact that it uses an exit code, makes the entire thing crash. Is there a way to capture this?

I have tried catching SystemExit, BaseException....


texts: Simplifying boundaries of divisions of country using QGIS?

texts:
I am trying to create a map to show all the divisions of a country (regions, departments), but the original map (one SHP file), with a lot of detail in the boundaries, is 5-Mb sized.

I'd like to simplify the boundaries, and I'm using QGIS (Vector > Geometry Tools > Simplify Geometries). It works, I managed to reduce the size up to 3 Mb, but there are lots of gaps between two divisions.

In the original map, two different regions are separated only by the boundary. But in this second reduced map, one region is separated from its neighbour by its own boundary, then a gap, and then the neighbour's boundary.

Which is the best way to simplify the boundaries?


texts: How can I set a specific meter scale in the print map composer?

texts:
I am making a map for an orienteering class at the environmental education center that I work at.  In order for us to easily calculate the distance between orienteering points, I need the scale to be 1 cm = 100 meters.  I am not sure how to set this under the map item properties in the print map composer. I thought that it would be a 1:10 000 ratio, but in the print map composer this is way too zoomed in to possible be correct.  Once I have this scale set is there some way to lock it in place so it does not change again?

Also, on my working map in QGIS, the project CRS is set to WGS 84 with on the fly projection enabled.  When I switch the map units from decimal degrees to meters, it appears to be incorrect.  Distances that I know to be approximately 100 meters in real life appear to be thousands of km apart on the map when I am using the measuring tool. I also get an error message that says

"This map is defined with a geographic coordinate system (latitude/longitude) but the map extents suggests that it is actually a projected coordinate system (e.g., Mercator). If so, the results from line or area measurements will be incorrect.
To fix this, explicitly set an appropriate map coordinate system using the Settings:Project Properties menu."

What am I not understanding here!?  Please help!


texts: Connecting QGIS libraries to external IDE under Linux

texts:
The official documentation on the QGIS site states:

  On Linux there is no additional configuration needed to develop
  plugins.

However, this is not the case, as after a fresh QGIS install and after making sure PATH values are being read by VS Code correctly, I receive this:

...which suggests there is some configuration involved in calling QGIS libraries.

There is a discussion here that is PyCharm focused and does not address this problem generically.  (In fact it does not work on new versions of PyCharm CE anyway)

I'm on QGIS 3.10; OpenSUSE Tumbleweed.

I have ensured that the interpreter being called in VS Code is 3.7.3 64-bit, which is the same as what QGIS 3.10 is using.


texts: Cost distance tool to figure out shortest distance over water between 2 points

texts: I have multiple points in a bay and I need to figure out the distance of each point to the nearest inlet, without going over land. I have been told to use the Cost Path or the Cost Distance tool but am very lost. Would my 'input raster' be the inlet or the other points? I am guessing the input cost raster would be a raster of the body of water? Do I need to be using the model builder for this tool, or use the cost path tool first?


texts: How to merge a overlapping points into a single feature to reduce Map "noise"

texts: I have a shapefile of the locations of wind turbines within the central flyway. I was attempting to show the size by the total number of turbines however I am having a problem with many large scale farms being close to each other and it's taking away from the message. I was wondering if there was a way to merge points within a certain distance so that instead of have 9 separate points I could have one large point? I have inserted the image below.


texts: Delete features from a CSV attribute table in PyQGIS

texts:
As part of a plugin project, I am coding a bunch of scripts for QGIS 2.18. My idea is to use a CSV (which is actually the result of the Distance Matrix process) as an attribute table and utilise the selectFeature, deleteFeatures already present in QGIS. Later I would use the same process but to addJoin, addField, calculateField, etc.

But on to the point, this is the code I have:

uri = "file:///C:/matrice_temp.csv?delimiter=%s" % (",")
table = QgsVectorLayer(uri, 'Test', 'delimitedtext')
progress.setText(str(table.isValid()))  #this prints: True
progress.setText(str(table.isReadOnly())) #this prints: False
caps = table.dataProvider().capabilities()
progress.setText(str(caps)) #this prints: 131264
progress.setText(str(QgsVectorDataProvider.DeleteFeatures)) #this prints: 2
progress.setText("")

table.startEditing()
request = QgsFeatureRequest().setFilterExpression(u'"InputID" = "TargetID"')
request.setSubsetOfAttributes([])
request.setFlags(QgsFeatureRequest.NoGeometry)
fids = [f.id() for f in table.getFeatures(request)]
a = table.dataProvider().deleteFeatures(fids) #returns False
progress.setText(str(a)) #this prints: False
table.commitChanges()

I've amased a couple indications from the answers I've been looking to, if they might help you, to describe the QgsVector Layer:

it is valid
it is NOT read only
it's dataprovider as some capabilities I'm unable to understand (http://qgis.org/api/classQgsVectorDataProvider.html)
it's dataprovider returns 2 for the deleteFeatures capability
it's not shown here, but the getFeatures selects the right number of features
and I get a False for the deleteFeatures

I have never done this in PyQGIS before (but I have with DBF tables in ArcPy) so I must be missing something big on how to treat attribute tables without geometries.


texts: How do I get value from edittext or text field in MapBasic

texts:
I have created a dialog menu in MapBasic which user can enter value in text field. I am a newbie in MapBasic Programming. My question is how to select data from database using text field value?

  select * from voronoi where Ha >=  inputnumber

That inputnumber is text field. Please I need your help


texts:
I upgraded QGIS from 2.18.0 to 2.18.14 but I losted Saga in processing tools.

First I tried to disable/reactivate it in processing > options > providers but nothing.

I searched some solution on web and I saw that I can't change Saga folder in providers.

So I find a way to change it in QGIS advanced options > processing > configuration menu. I tried some folders but nothing worked...

In others gis stackexchange posts people said to use Osgeo4W Saga installation but i'm on mac OS not on Windows...


texts: Strange output from RSAGA topographic wetness index?

texts:
I am trying to generate a topographic wetness index raster with the RSAGA package in R. The output I am able to generate does not make sense to me, as it has a large number of NA cells and I wonder if I am doing something wrong. I have put together a simple dummy example to illustrate what I mean.

Session info: I am running R 3.2.3 on Ubuntu 15.10. I have SAGA v2.2.0 installed, as well as RSAGA v0.94-5.

library(RSAGA)
library(raster)
library(maptools)

#get DEM for Switzerland
alt <- getData('alt', country='CHE')

# write to SAGA format
tempInfile <- 'saga_temp_twi_in'
writeRaster(alt, filename=tempInfile, format='SAGA')

outfile <- 'saga_temp_twi_out.sgrd'
call <- rsaga.wetness.index(in.dem='saga_temp_twi_in.sgrd', out.wetness.index=outfile, env=rsaga.env(modules='/usr/lib/x86_64-linux-gnu/saga/'))

#read resulting file back in
res <- raster('saga_temp_twi_out.sdat')

par(mfrow=c(1,2))
plot(alt)
plot(res)


texts:
We have just set up QGis 2.14 (Essen) in our Corporate Environment.  It is working well, except that editing nodes seems to be extremely slow and in some cases, unusable.  This is when editing SQL 2008 R2 Polygons or Spatiallite polygons in a networked environment.

Saving project files seems to have been greatly sped up, but node editing is definitely far slower, so much so that we are considering whether to roll back to 2.8.


texts:
I have a elevation raster (1 arc second) downloaded from USGS site. Before adding it to ArcMap I changed the display units to meters.The projection system for this raster is GCS_1983. When I use the slope tool under the spatial analyst tool , it is unable to create the slope layer.The data type for the image is floatng.What could be possibly be wrong here.

Even after reprojecting it I get the same error.


texts: How to install GDAL with Python on Windows 10

texts:
I am trying to install the GDAL library with Python on Windows 10. The Python version is MSC v.1500 64 bit (AMD64). The setup files (core and GDAL binaries) are from Tamas Szekeres’ Windows binaries based on the Python version.  Path Variables were set up but after testing (gdalinfo --version), the terminal did not show it was installed successfully.
Checking the C:\Program Files list, the GDAL files did not show up.

I am wondering how I can install GDAL with Python on Windows 10 successfully?


texts:
I have this project wherein I should be able to display the route from one child node towards a parent node in QGIS. Attached is a simple photo to demonstrate my question:

The specifications are as follows:

The path from a child to a parent is always unique (for example: route from child 1 to parent node = Line 1B -> Line BA -> Line AP)
The nodes and the lines are separate shapefiles

So here's my question:

a. Can this be done by a query statement without having to rely to a plugin?

b. If this is not possible, what plugin should I use?


texts: ESRI JAVASCRIPT API - Can you return a list of fields from a published Querylayer

texts:
I have a query layer that is published onto arcGIS server. I am having difficulty returning the fields in a javascript application. I need to be able to iterate over this array. Code is bellow.. ServiceURL and HEatMapOptions are defined elsewhere before any of this is called. The function returns undefined..

var heatmapOptions = {
    mode: FeatureLayer.MODE_SNAPSHOT,
    outFields: ["*"]
}; //end of options
var heatmapFeatureLayer = new FeatureLayer(serviceURL, heatmapOptions);
    var heatmapRenderer = new HeatmapRenderer();
    heatmapRenderer.blurRadius = 6;
    heatmapFeatureLayer.setRenderer(heatmapRenderer);
    map.addLayer(heatmapFeatureLayer);

function getFields(h) {
    var lyr = h;
    var f = lyr.fields;
    console.log(f);

};

on(heatmapFeatureLayer, "load", getFields(heatmapFeatureLayer));


texts: Assigning values of one raster to another raster based on proximity?

texts:
I have two different rasters that are both in the same resolution (250 feet). The rasters are Forest Type and Forest Age. Even though they are representations of the same forest, their extent does not match up perfectly.

I would like to assign the value of the nearest Forest Type to each pixel on the Forest Age raster. My goal is to create a raster with the same coverage as Forest Age, but with the nearest Forest Types values.

For instance, if a pixel had a value for Forest Age but no value for Forest Type, I would need to have the nearest Forest Type added to an attribute table (be it the Forest Age Raster or a separate table).

I have access to the Spatial Analyst extension.


texts:
I need to calculate gained elevation on Multilines GeoJSON files in a Leaflet.js map.

Is there is any plug-in to do that?
My GeoJSON files contains Z/elevation data in geometry.


texts: Installing QGIS on Debian only gets the LTR

texts:
I am trying to install QGIS 3.10.2 on Debian Testing. I read the install instructions and have updated my apt sources.list file to:

deb https://qgis.org/debian buster main
deb-src https://qgis.org/debian buster main

There is no bullseye or testing distro in the repository, so I defaulted to buster; I have also tried using unstable. I have purged previous installs of grass and qgis.

When I install QGIS after updating apt, it only installs the LTR (3.4.15). Any suggestions?  (I have also tried using the nightly build repo to no avail.)


texts: Configure pop-ups in ArcGIS Pro extension

texts:
A little while ago I configured pop-ups in ArcGIS Pro and used the expression option similar to what is described in Conditional Field display with Arcade in Pop Ups (revisited) and just came back to it, and the "Expression" option is now grayed out.
What happened there?
I wanted to review/adjust but can't open it.


texts: I want to pull attributes into a label using a JPG

texts:
This is my first post so I'll try to be specific as possible but also as short as possible. I have created a "Bore Profile" jpg. In ArcMap, I brought into a feature class through labeling. I want to be able to pull attributes from the feature class to "fill in the blanks" on the bore profile sheet.

I am currently using ArcGIS 10.2.2.

Below is an image showing the bore profile that I created. The attributes that I want to fill in, inside ArcMap, are in red.

Below is an image of the bore profile as a label in ArcMap. I need to use Expression builder, or scripting, to pull in attributes to populate as shown above. Or, perhaps through a table?

Any ideas on how to do this would be great.


texts: With in Version Difference (DifferenceTypeUpdateNoChange) how to pass IQueryFilter in ArcObjects

texts:
I want to know only real shape edits between 2 versions. How can I pass iQueryfilter to DifferenceTypeUpdateNoChange?

public void DifferenceTypeUpdateNoChange(ITable sourceTable, ITable differenceTable, esriDifferenceType differenceType, iQueryfilter Qf)
        {
            IQueryFilter qf = new QueryFilterClass();
            qf.SubFields = "SHAPE.AREA,SHAPE.LEN";
            qf.WhereClause = "SHAPE.AREA,SHAPE.LEN";
            try
            {
                IVersionedTable versionedTable = (IVersionedTable)sourceTable;
                IDifferenceCursor differenceCursor = versionedTable.Differences(differenceTable, differenceType, Qf);
                IRow differenceRow;
                int objectID;
                differenceCursor.Next(out objectID, out differenceRow);
                //Detect and output all the differences between the two versions
                int count = 0;
                while (objectID != -1)
                {
                    Console.WriteLine(FClassName + "," + objectID + "," + " has been modified");
                    //WriteCSV(FClassName, objectID, "Updated Feature");
                    differenceCursor.Next(out objectID, out differenceRow);
                    count++;
                }
                //sw.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }


texts: Merge connected lines and split them after set unequal distances

texts:
I need to edit line features in QGIS 3.4.4. I have more than 1000 line features that I want to first merge and then split. The line features describe roads in useless intervals, my goal is to highlight specific parts of the roads after set intervals.

I want to do the following:

Merge connecting lines into a single feature of the whole road. If there is no easy solution I might have to select and merge them by hand.
Split the lines up into parts after set distances, e.g. first after 5 kilometers, next after 1.2 kilometers etc.

I already tried the v.split script, but I only manage to split the line into equal parts. The best solution for splitting would look something like this in ArcGIS:

https://www.youtube.com/watch?v=yDQQtn1l4cQ

I only work in QGIS however.


texts:
How do you clear old plots from the plots result window in QGIS?

Is there a line of R code that you'd need to run to do so, or is there a means of doing so through the GUI?


texts: arcpy won't return correct data types of layers

texts:
I wrote this so that arcpy would give me the data types for each of the layers in a map document. But, "Feature Layer" is the only type of data that is returned (apart from "N/A"). Shapefiles are shown as Feature layers as well. Any way to fix this?

import arcpy
path = 'D:/GIS/Location/'
er = path + "Tool 10_1 10_2.mxd"

mxd1 = arcpy.mapping.MapDocument(er)
layers1 = arcpy.mapping.ListLayers(mxd1)

for lyr in layers1:
    if lyr.supports("DATASOURCE"):
        desc = arcpy.Describe(lyr)
        print "Name: " + lyr.longName + "...... " + "Type: " + desc.dataType
    else:
        print "Name: " + lyr.longName + "...... " + "Type: N/A"


texts: I don't see the Plugins options in my QGIS 2.18

texts: I have installed QGIS 2.18 but i do not see the Plugins tab on the toolbar menu. How can i access it?


texts: Automating Add Data tool to add 400+ geotiffs based on file extensions?

texts:
I have a spreadsheet that lists the file extensions for 400+ GeoTIFFs that I need to add to ArcMap 10.

Is there a way to automate the "Add Data" function?


texts: How can I solve "The Network Analyst solver could not determine a solution"?

texts:
I am using ArcGIS 10.0.

I have network data for undulated terrain so there are lots of inaccessible parts of the  network.
When I was using this model, I get "The Network Analyst solver could not determine a solution" error. I'm not aware how to solve this error. I have attached an example image to show the problem.

I am looking for your guidance.  Thanks in advance.


texts:
when I export my data genereated with the openLayers using Atlas rendering is always incomplete. Atlas is rendering too fast so that the data from openLayers is not completely loaded.

Do anyone knows how to handle this?


texts: Set transparency for raster in QGIS 2.12?

texts: How do I make raster layers (Tiff) transparent? To simply right click and choose properties does not work, I do not get the option of making it transparent when doing that. In the raster menu, there is a raster transparency option, but when I open this the bars are not active and nothing can be done. Is using a Tiff file a problem in QGIS 2.12, or can anyone please tell me how to do this?


texts: How do I get the "outer mantle" of a polygon shapefile? (without joining all the polygons)

texts:
I am interested in finding all the vertices of all polygons which are not on the inside the most outer polygon that can be formed in a shapefile.
Here is how I get all the vertices:
def __init__(self,shapeFilePath):
    driver = ogr.GetDriverByName('ESRI Shapefile')
    self.LandUses = []
    self.Codes = [] #Store Categories
    self.NPolygons = 1 # number of polygons in layer
    self.dataSource = driver.Open(shapeFilePath, 0)
    self.layer = self.dataSource.GetLayer()
    self.NPolygons = self.layer.GetFeatureCount()
    self.Boundaries = [""]*self.NPolygons   # store vertices of each polygon
    for polygon in range(self.NPolygons):
        area = self.layer.GetFeature(polygon)
        Name = area.GetField(0)
        Kategorie = area.GetField(1)
        self.LandUses.append(Name)
        self.Codes.append(Kategorie)
        geometry = area.GetGeometryRef()
        boundary_raw = str(geometry.GetBoundary())
        #remove tail and head
        boundary = boundary_raw[12:-1]
        boundary = boundary.split(',')
        #print boundary
        #lenboundary = len(boundary)
        #convert each coordinate from string to float
        for x, point in enumerate(boundary):
            boundary[x] = point.split()
        boundingvertices=np.asarray(boundary, dtype=np.float64)
        self.Boundaries[polygon] = boundingvertices

But now I am stuck with a lot of vertices, and I don't know how to get the "mantle", here is a picture displaying what I need:

Before I go hacking my own solution, I'd like to know if the GDAL Gods have been kind and made something like this already.
UPDATE: Found something call convex hull... not sure, but testing...
UPDATE #2: Of course one could just join all the polygons ...


texts: Calling Python ogr2ogr from PHP doesn't work as expected?

texts:
I have a HTML page that takes and uploaded zip file and then calls a PHP page as a form action. That PHP then calls two Python scripts in my Apache cgi-bin. The first Python script runs with no issue and simply unzips the uploaded file within a sub directory. The second Python script includes a subprocess call to a command line tool to perform some action on the unzipped files. However, I am finding that using the exec() in PHP for the second Python script with the subprocess does not work. If I run the Python script from the command line it works fine. But, if I call it from the PHP exec function it does nothing.

The snippet of PHP:

$tmp1 = exec("C:\\ms4w\\Python\\python C:\\ms4w\\Apache\\cgi-bin\\unzip_shp.py $without_extension");
echo $tmp1;
echo "<br>";
$tmp2 = exec("C:\\ms4w\\Python\\python C:\\ms4w\\Apache\\cgi-bin\\convert_to_geojson.py $without_extension", $output);
echo $output

The snippet of Python:

command = "C:\\ms4w\\tools\\gdal-ogr\\ogr2ogr.exe -f \"GeoJSON\" "+sys.argv[1]+".geojson "+sys.argv[1]+".shp" #os.system(command)
subprocess.check_call(command)
print(command)

The print command in the Python returns this to the PHP:

C:\ms4w\tools\gdal-ogr\ogr2ogr.exe -f "GeoJSON" C:\ms4w\Apache\htdocs\uploads\parks_escambia.geojson C:\ms4w\Apache\htdocs\uploads\parks_escambia.shp

Also, I am running this all on a Windows OS as a localhost development server. Using Python version 2.7.


texts: Adjusting polygons layers's boundaries in PostGIS

texts:
The case is quite typical. I’ve to compare two (multi-)polygons layers of administrative regions, with l2 being lower level (let’s say municipalities – 2811 records) than l1 (let’s say provinces – 785 records). Both layers are stored in a PostGIS DB. Each municipality refers the corresponding province through a foreign key.
Municipality’s boundaries should fit to the Province’s boundaries but, due the digitizing errors, it’s not case and we have the following situation with overlaps and gaps, as shown below

The aim is to adjust boundary of each “municipality” features (l2) to match to the shared part of boundary of its corresponding province (l1). I would like to male all treatments in PostGIS
I tried various treatments:

ST_SNAP testing with various tolerance

SELECT a.cod_mun, st_snap(a.geom, b.geom, tolerance) AS st_snap  FROM municipality a, province b  WHERE mun_cod_prov = cod_prov
But the results it not good at all (with tolerance 50)

Extract each intersected parts

I easily extracted small parts of municipalities (in blue here below) that correspond to the intersection of municipality in the undesired provinces but didn't find yet the solution to group the relevant zonez and retrieve the whole municipality with matched borders
SELECT row_number() OVER (ORDER BY a.cod_mun) AS gid, st_difference(a.geom, b.geom) AS geom
FROM (
    SELECT mun_cod_prov, st_multi(st_union(a.geom))::geometry(MultiPolygon,25830) AS geom
    FROM municipality
    GROUP BY mun_cod_prov
    ) a,
    province b
WHERE b.mun_cod_prov =cod_prov

Buffer

My third option was to create a buffer surrounding the municipalise and then clip through st_intersects the output geometries to the corresponding province. This worked but got me another unsolved problem in the others borders. I guess I¡ve to clip with the neighbouring communities

So I’m wondering if is there an efficient way to achieve this spatial treatment in PostGIS or if someone treated a similar case
Configuration: PostgreSQL 10.7 Postgis 2.4
I read similar posts at How to compare polygon boundaries in PostGIS? and Adjusting polygons to boundary and filling holes but did not find how to adapt either.


texts: Controlling line width when merging vector files into raster?

texts:
Using QGIS on Windows 7, I have figured out how to burn a vector file onto a QGIS georeferenced tiff.  But the result produces a line only one pixel wide.  I am trying to produce a map that can be used both as printed and on a mobile device to guide hikers and the narrow line isn't sufficiently visible.

Is there a way to make the line wider or otherwise more visible?

I am a non-programer and completely new to QGIS.