texts: Why are the results different for the same point using GEOS Point.transform and Postgis ST_Transform?

texts:
I'm trying to define a default point setting for OSM layers in my application and I want users to be able to define the default latitude and longitude in EPSG:4326. What I'm doing right now is to use GEOS Point.transform to turn the EPSG:4326 input into EPSG:3857:

_default_point = Point(
    getattr(settings, 'DEFAULT_LON', None) or 0,
    getattr(settings, 'DEFAULT_LAT', None) or 0,
    srid=4326
)
_default_point.transform(3857)
default_lat, default_lon = _default_point.get_coords()

Then, i.e. for (-2.41544723477347,43.2140883725249) I'm getting (-268966.0382412352, 4810570.312724996). That, as for what I can see in the map, is wrong.

Now, when trying over psql

SELECT ST_AsText(ST_Transform(ST_SetSRID(ST_Point(-2.41544723477347,43.2140883725249),4326),3857));
                 st_astext
-------------------------------------------
 POINT(-268886.356213004 5344615.26048709)

Which is right.

What is going on then? Why are the results different?

EDIT:

select srid, proj4text from spatial_ref_sys where srid = 3857 or srid = 900913 or srid = 4326 yields:

   4326 | +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs
   3857 | +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +units=m +k=1.0 +nadgrids=@null +no_defs
 900913 | +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs


texts:
I'm new in qgis and I'm trying to realize a DEM from contour follow this tutorial https://www.youtube.com/watch?v=Lzd5m0j3zTI&t=81s

My data came from seven SRTM frame downloaded with plugin in qgis, but after create the contours with gdal, the interpolation never goes well and in the option after click 'set to current extent' the cell size is 0,02. The SR of the project and of the contour lines is wgs84_4326, maybe it is a problem?


texts: ArcGIS API for JavaScript RouteParameters vs REST API

texts:
I have the network analysis service and I need to get the route between two points, but I don't want the single path polyline, but rather set of paths representing the edges it travels though (pretty much single path polyline broken at the network nodes).

I've found that there is a parameter called "populate_route_edges" (link here) which seems to be the one parameter that will get me what I need, but I cannot find its corresponding parameter in RouteParameters object in the ArcGIS API for JavaScript.

Does anyone know, how to get the multipart polyline route result from network analysis, where the parts are the edges (segments) of the road network?


texts: How to calculate the Min & Max value for a pixel from multiple Raster Images?

texts:
I have downloaded a Bunch of MODIS MOD13Q1.006 Images for my Study Area, covering a period of 4 years (same scene across time).

Now I want to calculate the Min & Max NDVI value for each Pixel, so that I can then calculate the VCI Value with future data.

Using GDAL, how do I calculate the Min & Max Value for each Pixel?


texts: Possible to do a datum shift using dotSpatial?

texts:
I was hoping to be able to use Reproject.ReprojectPoints to achieve a datum shift between lat/lon values in NAD27 and NAD83. I'm able to correctly reproject from NAD27 lat/lon to NAD27 UTM and from NAD83 lat/lon to NAD83 UTM. But when I try the following, I just end up with the same coordinates in the output. I'm obviously misinterpreting the functionality, but is there a way to add a Helmert transformation or to mimic the NAD con functionality in Proj4 using dotSpatial? I'll do what it takes, but am trying to work smart and not reinvent the wheel.

Thanks for any comments.

ProjectionInfo source = KnownCoordinateSystems.Geographic.SpheroidBased.Clarke1866;

ProjectionInfo dest = KnownCoordinateSystems.Geographic.SpheroidBased.GRS1980;// KnownCoordinateSystems.Geographic.SpheroidBased.Clarke1866;

var xy = new List<double>();

var z = new List<double>();

double lat = 29.48438;
double lon = -93.81992;

xy.Add(lon);

xy.Add(lat);

z.Add(0);

var xyA = xy.ToArray();

var zA = z.ToArray();

Reproject.ReprojectPoints(xyA, zA, source, dest, 0, 1);


texts: Corrupted Shapefiles when saving edits in QGIS

texts:
Has anyone experience regular corruption of Shapefiles when saving edits in QGIS?

Since testing the new LTR, we have had regular occurrences of the Shapefile being corrupted, and "_packed" SHP and SHX components appear in the file folder.

I have updated Bug Report #14711 with some details, but so far have no feedback or comment. We were hoping to rollout to the rest of the organisation, but with the current level of file corruption occurring, we cannot risk wider use.

I can reproduce the corruption by having a duplicate copy of the Shapefile open in the QGIS project - NOT in edit mode, just open. I can do the exact same thing with duplicate versions open in previous versions with no corruption at all. I have also seen attributes disappear or change as I saved edits with the attribute table open, indicating some mix-up with record count in the DBF and  the SHX components.

If anyone else has experience similar issues and been able to resolve we would love to hear so that we can continue with the planned roll-out of the new LTR that has so many other improvements.

QGIS version = 2.14.4 (LTR)

Shapefile location = both local C drive and network locations


texts: Changing shapefile to fit inside feature of another

texts:
I have shapefiles with maps of school districts by state. However, some of these districts go beyond the state's area, shown below. I want to preserve the districts, just remove all the bits going out into the lakes and such. How can I automatically adjust the boundries of the districts that extend beyond the state's land mass so that they don't any longer?
Ideally, using QGIS, but any solution is welcome. In other words, I'm just looking to cut off features in the school district shapefiles based on the Michigan feature in the U.S. map shapefile.

Michigan school districts

Michigan school districts and state outline


texts: Why does saving a big Shapefile take so long?

texts:
When trying to save a large (281250 shapes), yet fairly simple shapefile (all shapes are rectangles with 5 attributes) from QGIS, it was still trying to save for over 2 to 3 hours before I killed it.  I tried multiple times over a full day. The same shapefile saves in approximately 10 seconds from SAGA GIS. So I did most of my table editing in SAGA. However, the string editing capabilities in SAGA are a bit lacking, so I brought the file back over to QGIS.  The edits to the strings using the Field Calculator were quick enough, but when I try and end the edit session and save the file, QGIS chokes really badly.

Am I doing something wrong, or does QGIS not handle shapefiles very well?


texts:
I found the following link to a post saying that a count lines in polygons had been added to ftools for QGIS:
http://hub.qgis.org/issues/4712

However I can't find how to access this feature nor any online discussion of how to do this - can anyone help?

Alternatively, are there any other tools that will allow this?

I have a hexagonal grid and want to count the number of animal track paths that go through each cell for a migratory distribution map.

Thanks


texts:
I'd like to setup PyCharm for PyQGIS 3 development. There is a good guide for PyQGIS 2, but those steps only make python 2 available, and I want to use python 3. Selecting python3 as interpreter returns an error:

Cannot setup a python SDK at python 3.6.0 (C:\OSGeo4W64\bin\python3.exe).
The SDK seems invalid

My .bat file has the following config:

SET OSGEO4W_ROOT=C:\OSGeo4W64
SET QGISNAME=qgis
SET QGIS=%OSGEO4W_ROOT%\apps\%QGISNAME%
SET QGIS_PREFIX_PATH=%QGIS%
SET PYCHARM="C:\Program Files (x86)\JetBrains\PyCharm 2016.3.2\bin\pycharm.exe"

CALL %OSGEO4W_ROOT%\bin\o4w_env.bat

SET PATH=%PATH%;%QGIS%\bin
SET PYTHONPATH=%OSGEO4W_ROOT%\bin;%PYTHONPATH%

start "PyCharm aware of QGIS" /B %PYCHARM% %*


texts: Map by density of information per pixel?

texts:
I am working with QGIS. I have 6 shp files of the same pixel resolution (1 pixel = 10*10km).
My issue is that I would like to represent them all on one map as such manner that the color varies according to the amount of information each pixel contains.
For example, a certain pixel where only 1 shp would give its information would be lighter than another pixel that would contain te information of 4 sph at the same time. Thus, I would have the seven following classification:

pixel with 0 info
pixel with only 1 info
pixel with 2 infos
...
pixel with all 6 infos

Is this possible?
Screenshot of the data :


texts: is it possible to open a geotiff file in python without using gdal?

texts:
Trying to get gdal and whichever associated python bindings installed with the oldish OS my company uses is extremely painful, especially so in ci/cd and testing situations. I keep coming across libraries such as rasterio or fiona, but it seems like everything has this whole mess of dependencies, some of which the OS doesn't have.

It's especially frustrating because what I'm doing isn't complex..
I have a geotiff file that's easy to gdal.open(..). I basically just need a footprint. If I could get to WKT or any other format but geotiff I can easily do what I need to with shapely/numpy/etc. What I need isn't too far off from what's found in this answer, I just need to do it without gdal.

Said another way, there is some GEO data in a geotiff, how can I get the geometry or footprint from it in python without using gdal?


texts: Is there a widget/service to put a marker and send data?

texts:
I need to ask people where they want to go in the city, and as a response I need either geocoded location, or a marker on a map. Although everyone knows his home address, not everyone knows the address of a building they go to, most likely they don't.

So, the best option, I think, would be a slippy map integrated in a web page.

Is there such a reusable widget for Leaflet/OpenLayers or proprietary?


texts: Using Field calculator to populate field

texts:
I have created a new field called "rank" in the attribute table of my soil data, and I want to populate my new "rank" field with a number of 1 to 5 based on attribute values from another field, for example: "if the attribute in the soil type field is peridotite, i want to fill the rank field with 1. and if the attribute in the soil type field is granodiorite i want to fill the rank field with 2" etc.

How would I go about doing this with field calculator? or is there another way I should be doing this.


texts: Difference in Spherical Mercator(google/mapbox/supercluster code) calculation and Postgis 3857

texts:
As per source code of supercluster, google map utils and mapbox formula to convert (lng, lat) to spherical mercator is as

x = lng/360 + 0.5;
siny = Math.sin(Math.toRadians(lat));
y = 0.5 * Math.log((1 + siny) / (1 - siny)) / -(2 * Math.PI) + .5;

As per the code this is conversion of (lng, lat) to mercator

Result of above formula for spatial point (-122.43499755859375, 37.71860885620117) is {x=0.15990278455946183, y=0.3867186849275602}

If I use PostGIS to convert same point to projection 3857 result is

POINT(-13629401.5834983 4539750.5916923)

Why is there a difference? Leaflet clustering works well with above formula if I have to achieve similar result with PostGIS what kind of projection I must use? Or any more calculations required based on 3857 projection?


texts: Build CityGML Buildings from OBJ files of OpenDroneMap

texts:
I have .obj 3D mesh files after running OpenDroneMap on Drone Images. I want to convert them to CityGML buildings so that I can put them on Cesium Globe.

How can I do this?


texts: How to repair GDB_ITEMS.Definition if fields are missing (GPFieldInfoEx)?

texts:
I read file geodatabase schema of all feature classes by parsing Definition field XML-s from GDB_Items table. I am using ESRI File GDB API. It's main XML element (for feature class) is DEFeatureClassInfo and then under GPFieldInfoExs element information about each field is stored in GPFieldInfoEx element. Example:

<?xml version="1.0" encoding="utf-8"?>
<DEFeatureClassInfo xsi:type="typens:DEFeatureClassInfo" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:typens="http://www.esri.com/schemas/ArcGIS/10.3">
  <CatalogPath>\Constructed_Features\Constructed_Feature_pt</CatalogPath>
  <Name>Constructed_Feature_pt</Name>
  <ChildrenExpanded>false</ChildrenExpanded>
  <DatasetType>esriDTFeatureClass</DatasetType>
  <DSID>67</DSID>
  <Versioned>false</Versioned>
  <CanVersion>false</CanVersion>
  <ConfigurationKeyword></ConfigurationKeyword>
  <RequiredGeodatabaseClientVersion>10.0</RequiredGeodatabaseClientVersion>
  <HasOID>true</HasOID>
  <OIDFieldName>OBJECTID</OIDFieldName>
  <GPFieldInfoExs xsi:type="typens:ArrayOfGPFieldInfoEx">
    <GPFieldInfoEx xsi:type="typens:GPFieldInfoEx">
      <Name>OBJECTID</Name>
      <AliasName>OBJECTID</AliasName>
      <ModelName>OBJECTID</ModelName>
      <FieldType>esriFieldTypeOID</FieldType>
      <IsNullable>false</IsNullable>
      <Required>true</Required>
      <Editable>false</Editable>
    </GPFieldInfoEx>
    <GPFieldInfoEx xsi:type="typens:GPFieldInfoEx">
      <Name>Shape</Name>
      <AliasName>Shape</AliasName>
      <ModelName>Shape</ModelName>
      <FieldType>esriFieldTypeGeometry</FieldType>
      <IsNullable>true</IsNullable>
      <Required>true</Required>
    </GPFieldInfoEx>
...etc.

However for some file GDBs, upgraded from 9.3 version to 10.3, not all fields are listed (under own GPFieldInfoEx element), I see only part of them.

Do you know a way how to repair such file GDBs so definitions include all tables fields?

I tried to add new fields; they are appended, but those missing fields still do not appear.

I also tried to create new file GDB using ArcCatalog 10.3; field edits appear under GPFieldInfoExs correctly.

EDIT: Also tried to export full gdb to XML workspace document with data and import to empty gdb but this did not help.


texts: GeoServer Printing Extension and MapBox's new API

texts:
I'm using MapBox as a basemap, and the GeoServer Printing Extension for printing this and some layers out of GeoServer.

I now have it working for the old MapBox API (with URLs like https://a.tiles.mapbox.com/v4/EXAMPLE.EXAMPLE/{z}/{x}/{y}.png, but it seems that the GeoServer Printing Extension doesn't like handling tile URLs without an extension, like the new MapBox API uses, e.g, https://api.mapbox.com/styles/v1/EXAMPLE/EXAMPLE/tiles/{z}/{x}/{y}. The GeoServer Printing Extension really wants an extension. Leaving the extension blank doesn't work, as it still puts a dot on there.

So, my question is, can the GeoServer Printing Extension handle a XYZ tile service without an extension, or is there a way to add an extension to the new MapBox API?


texts:
I am using WSL (Ubuntu 18.04) on win 10 trying to install QGIS Dev.
I tried following the instructions here but got back the following message.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
qgis : Depends: libqgis-3d3.17.0 but it is not going to be installed
Depends: libqgis-analysis3.17.0 but it is not going to be installed
Depends: libqgis-app3.17.0 but it is not going to be installed
Depends: libqgis-core3.17.0 but it is not going to be installed
Depends: libqgis-gui3.17.0 but it is not going to be installed
Depends: python3-qgis (= 1:3.17.0+git20201212+5deda1f456+28bionic) but it is not going to be installed
Depends: qgis-providers (= 1:3.17.0+git20201212+5deda1f456+28bionic) but it is not going to be installed
qgis-plugin-grass : Depends: qgis-provider-grass (= 1:3.17.0+git20201212+5deda1f456+28bionic) but it is not going to be installed
Depends: grass740
Depends: libqgis-app3.17.0 but it is not going to be installed
Depends: libqgis-core3.17.0 but it is not going to be installed
Depends: libqgis-gui3.17.0 but it is not going to be installed
Depends: libqgisgrass7-3.17.0 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

This is the code I tried running:
sudo apt install gnupg software-properties-commonH
wget -qO - https://qgis.org/downloads/qgis-2020.gpg.key | sudo gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/qgis-archive.gpg --import
sudo chmod a+r /etc/apt/trusted.gpg.d/qgis-archive.gpg
sudo add-apt-repository "deb https://qgis.org/debian-nightly `lsb_release -c -s` main"
sudo apt update
sudo apt install qgis qgis-plugin-grass

Am I doing something wrong?
Do I need to use a virtual machine with a GUI instead of using WSL?


texts:
I have made an ArcMap add-in which has the condition that only one feature can by selected a computed. If there are more features selected or no feature in the selection, a message will pop up that the script should be terminated. I am using the sys module and sys.exit(0) in the condition, but this command terminates ArcMap.

Is there something else that terminates only the running Python script, but not ArcMap entirely?

EDIT: I'm using ArcMap 10.4.


texts: List of indices (e.g., NDVI) that can be calculated with satellite images

texts:
I'm looking for a list of published indices that can be calculated from satellite images and the corresponding formula for each:

Some indicies, for example, would be:
 - NDVI: https://en.wikipedia.org/wiki/Normalized_Difference_Vegetation_Index
 - EVI: https://en.wikipedia.org/wiki/Enhanced_vegetation_index
 - NDWI: https://en.wikipedia.org/wiki/Normalized_difference_water_index

Here's one list I found:
http://spaceanalyzer.com/index.php/advanced-vegetation-index-avi

Is there a source that has a more comprehensive list segmented to domains (e.g., vegetation, water, buildings)? I can't seem to find a relevant resource.


texts: Make flashFeatureIds's duration to depend on an action

texts:
I'm working on a Plugin PyQGIS. I've wrote a method that calculate a buffer, with this buffer I get the id of a line, with this id I flash the line for a few seconds.

I used flashFeatureIds:

self.canvas.flashFeatureIds(layer, id_of_the_line , endColor = QColor(255,0,0,255), duration = 50000)

The method has a parameter duration, but I'm looking for this duration to depend of another action, like a click on a button linked to another method.

==> In place of a number of seconds, the line should be flashed until the user press another action button.

Is it possible to insert an action in a pre programmed parameter ?


texts: How to use different 'missing tile' for OpenLayers?

texts: I would like to use a different image for missing tiles with an OpenLayers application. Currently the tile is red/pink, with a red x in the upper left corner. I would like to remove that corner, does anybody know how to specify this image?


texts:
Using a blog page on Raster enhancement: The horizontal legend I have displayed my legend of a raster legend horizontally. However I have not been able to format the labels to align directly beneath the tick marks as shown below. The second label is shifted to the right e.g. 3, 2, etc.

I have adjusted the Layout Gap pt sizes in the properties but no success.


texts: Using Less Than Tool to generate multiple raster outputs from single raster input in ArcGIS Desktop?

texts:
I'm trying to create a model that uses as input a series of rasters created from elevation values in an original raster layer.  To do this, I need some help figuring out how to generate these rasters.

I have a single raster with elevation values that I want to use the 'less than' tool on to generate a raster for each elevation value (the elevation range is from 0-140) from the original input.  I can do this manually (such as typing in 'raster = Less than 15 ft'), but since my max-min range of elevation values is a fairly large number, it would be easier to find some way to do it as a batch, if it's possible, and output them to a geodatabase or folder.

As my results will end up in a model, I would like to do this in model builder if it's possible.
Is there a way to do this using something like an iterator on the 'less than' tool or even the raster calculator?  The help I've been able to find so far on iterators relies on already having multiple rasters to go through.


texts:
I am trying to learn Arcobject with C# through a book named "begining arcgis desktop using dotnet" , in this book an example is given to use geoprocesisng tool to be used through arcobject.

below in the code

IMxDocument mxdoc = ArcMap.Application.Document as IMxDocument;
IMap map = mxdoc.FocusMap;
if (map.Layer[0] == null)
{ return; }
ILayer layer = map.Layer[0];
IDataset dataset = layer as IDataset;
IGeoProcessor2 gp = new GeoProcessorClass();
gp.AddOutputsToMap = true;
gp.OverwriteOutput = true;
//syntax of the tool from tool's reference page
//MultipleRingBuffer_analysis (Input_Features, Output_Feature_class,     Distances,
//{Buffer_Unit}, {Field_Name}, {Dissolve_Option}, {Outside_Polygons_Only})
IVariantArray parameters = new VarArrayClass();
//Input_Features
parameters.Add(layer);
//Output_Feature_class
parameters.Add(dataset.BrowseName + "MRB");
//you have to use ; to separate the distances (multivalue)
parameters.Add("10;50;100");
//{Buffer_Unit}
parameters.Add("kilometers");
//{Field_Name}
parameters.Add("");
//{Dissolve_Option}
parameters.Add("ALL");
gp.Execute("MultipleRingBuffer_analysis", parameters, null);
object severity = null;
MessageBox.Show(gp.GetMessages(ref severity));

it throws an error of "An unhandled exception of type 'System.AccessViolationException' occurred in GeoprocessingProject.dll"

i am new to dot net. can some body help to resolve this error ?


texts: Overlaying two shapefiles with different coordinate systems with different layer extents

texts:
I need to overlay two shapefiles: US counties over each other to make a spatial query.  One is NAD83 unprojected, the other is US Continuous Albers Equal Area Conic (1860 historical US county boundary).  I set up Dataframe for the Albers to NAD83 but does not overlay due to Layer Extent (one is meter (figure 1) and the other is dd (figure 2 below).

How do I change the Layer Extent of the existing layer (in this case, the Abers one)?


texts: Adding geometry from shapefile to dbf (one to many) Qgis

texts: Is there any possibility to add geometry from shapefile to dbf data in QGIS? Shapefile represents point localizations and has attribute with street, number and town. I have also dbf file where are people with the same attributes street, number and town where they live. I made key attributes for two files which concatenate these three attributes as a one. I want to add geometry from SHP to dbf that every person has his own location. Many people can live in the same place, so it is one to many relations. I use QGIS, or would Arcmap be better?


texts: Calculating the log(10) of a field in ArcMap using the field calculator

texts:
I am trying to take the logarithmic function of a field in ArcMap 10.2 using the field calculator in my attribute table. I can't seem to find any equation that does this and the Help document did not have any formula for this.

I am self-taught ArcMap and still learning.


texts: ArcGIS Online, Convert Geospatial PDF to kml or shp

texts:
I have a client that wants to be able to upload Geospatial PDF documents and have them displayed as a KML layer on Google Maps. They have suggested using ArcGIS Online to accomplish this, however they are unsure of the process. I am able to upload these PDFs via the ArcGIS Online portal, but from there I am unable to do anything with them besides view the PDF.

So my questions are:

Is it possible to upload a Geospatial PDF to ArcGIS Online and convert it so it can be used as a KML layer?

Is there an easier alternative to convert these types of files to KML instead of uploading to ArcGIS Online?


texts: Mosaic hillshade function does not save statistics/histograms in ArcMap 10.2.1

texts:
I used ArcGIS 10.2.1. on Windows 8. I did hillshade function for DEM and Calculate statistics. Every time I go into ArcMap statistics strays:

I try to add this function on mosaic but didn't worked.

I try turn off/on Enable Geoprocessing and again didn't worked...
Any ideas how I can "keep" it for function?
Thanks.


texts: I want to create several rule based styles on a layer. The rules are very similar, therefore I copy the first one then paste it multiple times and make the slight modifications on the pasted ones. The problem is that the pasted rules don't seem to be independent, rather they seem like they'd be linked somehow. For example, if I turn off the visibility on one, all the others disappear too. It is suspicious that in the project file all the pasted rules have the same "key" string (whatever it is), but the original rule has a different one. Excuse me for the laymans wording, I am not a qgis pro. The version is QGIS Desktop 2.18.4


texts: Is it safe to access layer object(e.g. QgsVectorLayer) in background task(QgsTask) in QGIS3

texts:
I was confused if it's safe for developers to access QgsVectorLayer in a background task(QgsTask), like reading data from layers?
Because descriptions in PyQGIS cookbook are different with different versions.
In version 3.16, it says:
Any background task (regardless of how it is created) must NEVER use any QObject that lives on the main thread, such as accessing QgsVectorLayer, QgsProject or perform any GUI based operations like creating new widgets or interacting with existing widgets. Qt widgets must only be accessed or modified from the main thread. Data that is used in a task must be copied before the task is started. Attempting to use them from background threads will result in crashes.
In version 3.4, it doesn't mention that we can't use QgsVectorLayer.
Any background task (regardless of how it is created) must NEVER perform any GUI based operations, such as creating new widgets or interacting with existing widgets. Qt widgets must only be accessed or modified from the main thread. Attempting to use them from background threads will result in crashes.
If we can use layer object in QgsTask, it's very convenient to read data, such as
request = QgsFeatureRequest().setFilterExpression( ' "Counties" = \'ABC\' ' )

features = layer.getFeatures( request )

And from my testing on QGIS3.4, it's ok to access QgsVectorLayer without errors.
If we can't access layer object in background tasks, how do tools in toolbox handle this case because they run in the background?


texts: How can I export single bands of a MODIS image with QGIS?

texts:
How can I export single bands of a MODIS image (in particular MODIS Terra - MOD02HKM) with QGIS?

It's .hdf file but with QGIS, I don't know to export these.
I also used Modis Reprojection tool but when I open an .hdf file there is an error: Opening Input Header File...


texts: Create multiple tables from distinct attribute category values using Model Builder

texts:
I've got a shapefile I would like to extract distinct values from an attribute field and have the output as tables based on those values.

The shapefile is made of polygons representing parcels and each parcel is categorized by a "book" value. I can extract a table for each book using the Table Select tool in Model Builder, however, I need to produce a table for each of the dozens of "book" values that make up this shapefile. This is basically a "select by attribute" problem but I will need to sort and produce output in the form of tables. I've attached a pdf of the Layer view and contents to help illustrate the problem.

My question is, what sql expression can I use in the Model Builder Table Select tool that will:

Select and sort values based on an attribute field (in this case, by "book")
Auto create tables for each category of values (i.e., 200, 209, 235)

I'm open to other model builder tools or methods but the "Table Select" method is the most direct approach, however, I can only create one table at a time - I need to create many in one shot.

Any help is greatly appreciated.

Galindo37


texts: How do I solve a "No PROJ.4 translation" error with gdal?

texts:
I've installed gdal using the brew utility on OS X so the proj and geos dependencies were also installed. I'm now trying to warp a GeoTIFF so that I can import it into Google Earth. I am getting a proj error, and cannot figure out how to solve it.

I use the following command:

gdalwarp -t_srs "EPSG:4326" in.tif out.tif

and get the following error message:

Processing input file in.tif.
ERROR 1: No PROJ.4 translation for source SRS, coordinate transformation initialization has failed.
0...10...20...30...40...50...60...70...80...90...100 - done.

There is very little on Google about this error.

I have set my GDAL_DATA and PROJ_LIB environment variables to /usr/local/shar/gdal and /usr/local/share/proj respectively.

I do not think this is a problem with the input file since it appears to have a coordinate system defined already, checked with gdalinfo:

Driver: GTiff/GeoTIFF
Files: in.tif
       in.tfw
Size is 341, 558
Coordinate System is:
LOCAL_CS["WGS 84 / Antarctic Polar Stereographic",
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]]]
Origin = (-3143782.158253818750381,3005869.481321755331010)
Pixel Size = (6268.758042377240599,-6268.758042377240599)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (-3143782.158, 3005869.481)
Lower Left  (-3143782.158, -492097.506)
Upper Right (-1006135.666, 3005869.481)
Lower Right (-1006135.666, -492097.506)
Center      (-2074958.912, 1256885.987)


texts: Seeking list of ArcMap capabilities not available in ArcGIS Pro

texts:
Is there anywhere I can find a listing of features in ArcMap that are not yet available in ArcGIS Pro?
It would save a lot of frustration & wasted time searching for things that haven't yet been added to Pro.


texts: Export tif map from specified shp area in scale

texts: Does anybody know how to export tif map from shp area. Actually I have a rectangle area which I want to export in tif


texts: Adding tiles generated using gdal2tiles to OL3

texts:
I had generated tiles using gdal2tiles and had put up all my tile images here http://localhost/maps/.
The XML generated from gdal2tiles

<?xml version="1.0" encoding="utf-8"?>
<TileMap version="1.0.0" tilemapservice="http://tms.osgeo.org/1.0.0">
  <Title>J133-12H7h54 tiled.tiff</Title>
  <Abstract></Abstract>
  <SRS>EPSG:3857</SRS>
  <BoundingBox minx="17.34140082382990" miny="60.27332260300220" maxx="17.43368067888432" maxy="60.31931836578014"/>
  <Origin x="17.34140082382990" y="60.27332260300220"/>
  <TileFormat width="256" height="256" mime-type="image/png" extension="png"/>
  <TileSets profile="mercator">
    <TileSet href="1" units-per-pixel="78271.51695000000473" order="1"/>
    <TileSet href="2" units-per-pixel="39135.75847500000236" order="2"/>
    <TileSet href="3" units-per-pixel="19567.87923750000118" order="3"/>
    <TileSet href="4" units-per-pixel="9783.93961875000059" order="4"/>
    <TileSet href="5" units-per-pixel="4891.96980937500030" order="5"/>
    <TileSet href="6" units-per-pixel="2445.98490468750015" order="6"/>
    <TileSet href="7" units-per-pixel="1222.99245234375007" order="7"/>
    <TileSet href="8" units-per-pixel="611.49622617187504" order="8"/>
    <TileSet href="9" units-per-pixel="305.74811308593752" order="9"/>
    <TileSet href="10" units-per-pixel="152.87405654296876" order="10"/>
    <TileSet href="11" units-per-pixel="76.43702827148438" order="11"/>
    <TileSet href="12" units-per-pixel="38.21851413574219" order="12"/>
    <TileSet href="13" units-per-pixel="19.10925706787109" order="13"/>
  </TileSets>
</TileMap>

And i had followed code from here https://groups.google.com/d/msg/ol3-dev/FQRup_N1Ess/B7RALoMR4qIJ to use the local tile images to add in OL3. But i couldnot see the tile images for some reason.

Below is the code which i had tried.

var resolutions = [ 78271.51695000000473, 39135.75847500000236, 19567.87923750000118, 9783.93961875000059, 4891.96980937500030, 2445.98490468750015, 1222.99245234375007, 611.49622617187504, 305.74811308593752, 152.87405654296876, 76.43702827148438, 38.21851413574219, 19.10925706787109];
var extent = [60.27332260300220, 17.34140082382990, 60.31931836578014, 17.43368067888432];
var coordSystemCode = 'EPSG:3857';
var projectiono = ol.proj.get(coordSystemCode);
var tms = new ol.layer.Tile({
  preload: 1,
  source: new ol.source.TileImage({
            crossOrigin: null,
            extent: extent,
            projection: projection,
            tileGrid: new ol.tilegrid.TileGrid({
                          extent: extent,
                          origin: [extent[0], extent[1]],
                          resolutions: resolution }),
   tileUrlFunction: function(coordinate) {
                      if (coordinate === null) return undefined;
                      var z = coordinate[0];
                      var x = coordinate[1];
                      var y = coordinate[2];
                      var url = 'http://localhost/maps/'+z+'/'+ x +'/'+y +'.png';
                      return url; } }) });
   var view = new ol.View({ projection: 'EPSG:3857', center: center, zoom: 2 });
   var osm = new ol.layer.Tile({ source: new ol.source.OSM() });
   var map = new ol.Map({
       layers: [ osm,tms ],
       renderer: 'canvas',
       target: 'map',
        view: view });


texts: Alternatives to ArcGIS Diagrammer for Reordering Fields with ArcGIS Desktop 10.3 or higher

texts:
I discovered that ArcGIS Diagrammer no longer supports ArcGIS Desktop beyond 10.3. This was the go-to tool for reordering fields for a feature class within a file geodatabase. I have subtypes applied, so I have to operate within the geodatabase environment.

Are there any suitable alternatives that would operate with ArcGIS Desktop (specifically ArcCatalog) 10.5 or higher?

While my question is similar to this one and others, most of those fixes are several years out-of-date, and apply to older versions of ArcGIS.


texts: Data-driven styling in Mapbox GL JS - Error when drawing circle radius by zoom level and property

texts:
I'm playing around with data-driven styling in Mapbox GL JS.  Setting the circle color based on a layer property works just fine:

"circle-color": {
     'property': 'mag',
     'stops': [
       [4, "hsl(0, 100%, 50%)"],
       [8, "hsl(60, 100%, 50%)"]
     ]
 }

But when I try to set the circle radius by property and zoom like this:

"circle-radius": {
    'property': 'mag',
    'stops': [
        [{zoom: 4, value: 4}, 2],
        [{zoom: 4, value: 8}, 6],
        [{zoom: 12, value: 4}, 14],
        [{zoom: 12, value: 8}, 55]
     ]
 },

I get the following error:

Error: layers.earthquakes.paint.circle-radius.stops[0][0]: number expected, object found(…)   map.js:906

Is this just a bug or am I doing something wrong?


texts: Remove the error "Download the capabilities failed : error downloading" while I connect a link through my WMS

texts:
I have installed QGIS Web Map Server on my PC and the GetCapabilities response looks like below in the screenshot:

But when I import this link to QGIS for open my project file, I am getting an error which is shown below in the pic. I have my shapefile as "kgp.qgs" which do not have any attribute data. I made this file from Google Earth using "polygon" tool. Then I converted the .xml format to shapefile in QGIS which doesn't bring any attribute data with itself. I'm showing the image of my "kgp" shapefile without any attribute data.

Can you help me to solve out my problem ?


texts: Python within OSGeo4W installation gives "AttributeError: '_NamespacePath' object has no attribute 'sort'"

texts:
I have Python 2.7 and Python 3.6 installed via OSGeo4W64 on a Windows 10 x64 machine. I don't have a standalone installation of Python, but I did previously, which may have something to do with the errors I'm getting.

When I try to use python in a CMD window (in Administrator Mode) to run a .py script (in this case a TensorFlow 'getting started' example), I get the following error:

AttributeError: '_NamespacePath' object has no attribute 'sort'

If I try "where python", this is what I get:

C:\OSGeo4W64\apps\Python36\python.exe
C:\OSGeo4W64\bin\python.exe

If I run C:\OSGeo4W64\apps\Python36\python.exe, Python 3.6.4 starts up normally. However if I run C:\OSGeo4W64\bin\python.exe, I get the following error:

ImportError: No module named site

I've checked the environment variables, and the only paths relating to Python are the following (all within System Variables->Path):

C:\OSGeo4W64\apps\Python36\
C:\OSGeo4W64\apps\Python36\Scripts
C:\OSGeo4W64\bin\

On a possibly related note, I'm also having trouble with pip - every time I try to use it I get the following:

Fatal error in launcher: Unable to create process using '"'

I know this error has been covered in other questions, but the answers posted have not worked for me, so I'm thinking the pip error is probably a symptom of something else, rather than a problem with pip by itself.


texts: How to get all feature and attribute list from OpenStreetMap?

texts: I want to get the list of all features their attribute list for my application from OpenStreetMap. Where can I get that?


texts:
I have Anaconda Python Distribution (Python 3.4.3 :: Anaconda 2.1.0 (64-bit)) installed on Ubuntu 14.04. I would like to create a conda environment for running Grass 7.

To do that I used:

conda create -n grassenv python=2
source activate grassenv
conda install wxpython

When I run grass70 from the terminal it opens up the Grass Shell and gives a message Launching <wxpython> GUI in the background, please wait... but doesn't open the GUI. Is there a way to get Grass & to work inside a conda environment?


texts:
I've import osm file into database by with this command:

  osm2pgsql.exe -c -C 3000 -G -d OSM -U postgres --hstore -S
  default.style data.osm.pbf

After import I've add required columns:

ALTER TABLE planet_osm_line ADD COLUMN source INTEGER;
ALTER TABLE planet_osm_line ADD COLUMN target INTEGER;

and run pgr_createTopology function over this table:

select pgr_createTopology ('planet_osm_line', .001, 'way', 'osm_id');

Next I find out ids of nearest vertices from generated table planet_osm_line_vertices_pgr (for example vertices with ids 100 and 200) and apply them into routing function like this:

SELECT * FROM pgr_dijkstra('
SELECT osm_id AS id,
     source,
     target,
     st_length(way) AS cost
    FROM planet_osm_line',
100,
200,
directed := true)

But this give me nothing rows. Can you tell me what I do wrong?


texts: Assign variable name based on the assigned feature class

texts:
I want to use intersect as a variable name to save the feature class (C:\intersect.shp) and use point as a variable name to save the another one (C:\point.shp), which means the variable names should be based on the file names. I can use os.path.split(fc)[1][:-4] to select out the part I want, but how to use it as a variable in arcpy?

To be more specific, I want the variable_name in the following code can be changed accordingly to the fc name.

def variable(fc):
    variable_name = os.path.split(fc)[1][:-4]
    return variable_name


texts:
I have a number of analyses that are being plotted as heat maps in UTM coordinates using matplotlib. I'd like to generate tiles from these to display on a leaflet map over top of an OSM map.

At this point, the only thoughts I have are to either plot multiple plots using matplotlib where the extent matches the tile, or alternatively, generate one large plot, georeference it and use tiling software to slice it up.

Is there a simpler solution to this problem that I'm missing?

Is there a better way to do this than using matplotlib?


texts: Add new values to properties of a GeoJSON by matching the name on an array with objects

texts:
I have an array of objects with the following structure:

 population =
     [{county: "Alachua", population: 269956}
     {county: "Baker", population: 28355}
     {county: "Bay", population: 185287}
     {county: "Bradford", population: 27732}
     {county: "Brevard", population: 596849}]

In my GeoJSON file, in the properties array, there is a key value pair called County_1 that matches the name of the county in my populations array.

    {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": []
},
"properties": {
"OBJECTID_12_13": 1,
"OBJECTID": 1,
"DEPCODE": 21,
"COUNTY": "041",
"COUNTYNAME": "GILCHRIST",
"DATESTAMP": "2000-05-16T00:00:00.000Z",
"ShapeSTAre": 9908353355.45099,
"ShapeSTLen": 487300.011359113,
"OBJECTID_1": 21,
"County_1": "Gilchrist",
"State": "FL",
"OBJECTID_12": "1",
"DEPCODE_1": 21,
"COUNTYN": "41",
"PUIsTotal": 177,
"Age_0_4": 4,
"Age_5_14": 2,
"Age_15_24": 20,
"Age_25_34": 27,
"Age_35_44": 30,
"Age_45_54": 26,
"Age_55_64": 30,
"Age_65_74": 21,
"Age_75_84": 14,
"Age_85plus": 3,
"Age_Unkn": 0,
"PUIAgeRange": "0 to 89",
"PUIAgeMedian": 46,
"PUIFemale": 108,
"PUIMale": 69,
"PUISexUnkn": 0,
"PUIFLRes": 177,
"PUINotFLRes": 0,
"PUIFLResOut": 0,
"PUIContNo": 3,
"PUIContUnkn": 172,
"PUIAgeAvrg": "2",
"PUITravelNo": 11,
"PUITravelYes": 1,
"TPositive": 4,
"TNegative": 172,
"TInconc": 0,
"TPending": 1,
"T_Total_Res": 176,
"T_LabDOH_Res": 0,
"T_LabDOH_NonRes": 0,
"T_LabPrivate_Res": 4,
"T_LabPrivate_NonRes": 0,
"C_Female": 2,
"C_Male": 2,
"C_SexUnkn": 0,
"C_AllResTypes": 4,
"C_Age_0_4": 0,
"C_Age_5_14": 0,
"C_Age_15_24": 0,
"C_Age_25_34": 0,
"C_Age_35_44": 1,
"C_Age_45_54": 2,
"C_Age_55_64": 1,
"C_Age_65_74": 0,
"C_Age_75_84": 0,
"C_Age_85plus": 0,
"C_Age_Unkn": 0,
"C_AgeRange": "38 to 56",
"C_AgeMedian": 50,
"C_RaceWhite": 4,
"C_RaceBlack": 0,
"C_RaceOther": 0,
"C_RaceUnknown": 0,
"C_HispanicYES": 0,
"C_HispanicNO": 4,
"C_HispanicUnk": 0,
"C_EDYes_Res": 0,
"C_EDYes_NonRes": 0,
"C_HospYes_Res": 0,
"C_HospYes_NonRes": 0,
"C_NonResDeaths": 0,
"C_FLResDeaths": 0,
"CasesAll": 4,
"C_Men": 2,
"C_Women": 2,
"C_FLRes": 4,
"C_NotFLRes": 0,
"C_FLResOut": 0,
"T_NegRes": 172,
"T_NegNotFLRes": 0,
"T_total": 177,
"T_negative": 172,
"T_positive": 4,
"Deaths": 0,
"EverMon": 11,
"MonNow": 8,
"Shape__Area": 920490830.042053,
"Shape__Length": 148547.348006441
}
},
.....

How can I add the population of each county (using the population array) to my GeoJSON file ?


texts: How can I generalize "field name" variable?

texts:
Here is my code:

import arcpy
import math

arcpy.env.workspace = "C:\RG\Kings County\Test.gdb"
fcs = arcpy.ListFeatureClasses("NVF_*")

try:
    for fc in fcs:
        rows = arcpy.UpdateCursor(fc)
        for row in rows:
            if row.Field_ID == 1:
                rows.deleteRow(row)
        del rows, row
# This code adds up several fields like Ratio_NDVI, Ratio_Acres etc.
        arcpy.AddField_management (fc, "Ratio_NDVI", "float")
        arcpy.AddField_management (fc, "Ratio_Area", "float")
        arcpy.AddField_management (fc, "Final", "integer")-
 # This code calculates area in square meter using existing datum coordinates of the vector file
        arcpy.AddField_management(fc, "NewArea", "DOUBLE")
        geometryField = arcpy.Describe(fc).shapeFieldName
        cursor = arcpy.UpdateCursor(fc)
        for row in cursor:
            AreaValue = row.getValue(geometryField).area
            row.setValue("NewArea", AreaValue)
            cursor.updateRow(row)
        del row, cursor
  # This code converts square meter into acres
        rows = arcpy.UpdateCursor(fc)
        for row in rows:
            row.NewArea = (row.NewArea*0.00024711)
            rows.updateRow(row)
        del rows, row
   # This code calculates ratio of NDVI of child_fields to the average NDVI of parent field
        rows = arcpy.UpdateCursor(fc)
        for row in rows:
            if row.NDVI090606 == 0:
                row.Ratio_NDVI = (row.M090606/row.M090606)
            else:
                row.Ratio_NDVI = (row.M090606/row.NDVI090606)
            rows.updateRow(row)
        del rows, row
   # This code calculates the ratio of acres of child fields to their corresponding parent field
        rows = arcpy.UpdateCursor(fc)
        for row in rows:
            row.Ratio_Area = (row.NewArea/row.Acres)
            rows.updateRow(row)
        del rows, row
        print ("Completed calculating ratio of acres")
   # This code finds that field that has either Ratio_NDVI higher than 1.5 to its parent #field or less than 0.5 to its parent field and Ratio_Acres higher than 0.05. Then #comments this field as "Change"
        rows = arcpy.UpdateCursor(fc)
        for row in rows:
            if (row.Ratio_Area > 0.05 and row.Ratio_NDVI > 1.5):
                row.Final = 1
                rows.updateRow(row)
            if (row.Ratio_Area > 0.05 and row.Ratio_NDVI < 0.5):
                row.Final = 1
                rows.updateRow(row)
        del rows, row
except Exception as e:
    print e

In this code, how can I generalize the field name variable (row.NDVI090906). In above, NDVI090906 is a field name, where this field name follows the pattern of the name of the file. For example, if the file name is 'NVF_090906' the corresponding field name is NDVI090906. How can I make this field name as a variable so that when it loops through, it automatically performs computation of field names of other feature classes.


texts: Calculating X and Y of line start and line end using ArcPy?

texts:
I have  a series of polyline shapefiles and I am trying to automate the process of calculating the X and Y coordinates of the line start and line end using Python.

I have added the 4 fields (startx, starty, endx, endy) in Python with the following code:

Arcpy.addfield_management ("Polyline","startx","DOUBLE")

I can perform this task by right-clicking the attribute and calculating geometry, but I want to automate this process for about 30 polylines.

I have the following code I've found that might be able to perform the desired task with some modification:

xExpression = "float(!SHAPE.CENTROID!.split()[0])"
yExpression = "float(!SHAPE.CENTROID!.split()[1])"

arcpy.CalculateField_management("Polyline", "startx", xExpression, "PYTHON")
arcpy.CalculateField_management("Polyline", "starty", yExpression, "PYTHON")

This code only calculates the coordinate at the centre of the shape I believe. Are their any expressions I can add to this code to calculate the X and Y coordinates of the start and end points of the polyline?

I am using ArcGIS 10.1 with ArcInfo license.


texts: Using grid cells and point data to calculate encounter rates across surveying area?

texts:
I am fairly new to GIS.

I am currently evaluating wildlife sightings across transect lines and want to calculate the occurrence of encounters, per area surveyed. So essentially look at encounter rates across square mile grid cells to create a thematic map.

I am using Arcgis 10.4 for desktop and so far I have created a fishnet grid within a polygon of the surveying area and I have joined this with my sightings point data. From this I can see counts of sightings in each cell, however, what I want to depict are sightings per square kilometer. I am totally stuck from this point on. I have tried a few things but nothing seems to be quite right!


texts: Integrating ArcGIS for Desktop with Past Perfect for mapping public art objects?

texts:
I am working on a project where I need to map out several assets that are found around the city. The Arts Department utilizes a software called Past Perfect to catalogue and track any art assets. My part of the project involves mapping out where these items are located.

Is anyone familiar with this program or know if it can be integrated with ArcGIS 10?

I am trying to avoid redundant data, as I know that I could simply create a new database for the items being mapped; however, if there is a way to directly pull date from the database into ArcGIS Desktop, that would save a lot of time and streamline the entire process.


texts:
I am trying to compute a LCP in QGIS, and it's throwing an error. I'm running QGIS 3.14 on an Ubuntu 20.04 Amazon-EC2 server (with Python 3.7.3 installed), the algorithm is from the LCP plugin in the default plugin menu. I think the error might be caused by the algorithm failing to import the cost raster properly, but I'm not sure why, or if there are any other problems. I have not encountered any such errors when running the algorithm on my desktop.
This is the log:
The size of cost raster is: 0 * 0
Searching least cost path...
Traceback (most recent call last):
File "/home/ubuntu/.local/share/QGIS/QGIS3/profiles/default/python/plugins/leastcostpath/least_cost_path_algorithm.py", line 246, in processAlgorithm
result = dijkstra(start_tuple, end_tuples, matrix, find_nearest, feedback)
File "/home/ubuntu/.local/share/QGIS/QGIS3/profiles/default/python/plugins/leastcostpath/dijkstra_algorithm.py", line 97, in dijkstra
grid = Grid(block)
File "/home/ubuntu/.local/share/QGIS/QGIS3/profiles/default/python/plugins/leastcostpath/dijkstra_algorithm.py", line 46, in __init__
self.w = len(matrix[0])
IndexError: list index out of range


texts: How does GeoServer render Super or MegaTile?

texts:
I'm working on chopping up a big mega map tile into smaller tiles at various zoom level. I'm surrounded with a problem first up in terms of how to get my big mega map tile with all the legends (with more than vector layer overlayed on top of a base map), symbols and text  into GeoServer so that I can say I'm have done the input to GeoServer and ready to cut that input (my mega map tile) into smaller tiles.

And how would GeoServer maintain all the styles, colors and labels etc. from the database?

GeoServer reads a variety of data formats, including:

PostGIS
Oracle Spatial
ArcSDE
DB2
MySQL
Shapefiles
GeoTIFF
GTOPO30
ECW, MrSID
JPEG

But how does GeoServer read all this?

The documentation is talking about WMS server so shall I assume that a WMS is first stood up to fetch data from the database and inputs to GeoServer in one of the above formats mentioned ( as far as GeoTiFF, JPEG are concerned)?

But then what about fetching data from Oracle Spatial kind of database, how does GeoServer read data out of oracle?


texts:
I want to understand Mesh Calculator in QGIS 3.8.3 to make calculation between two variables of a NetCDF file. Each of these variables has [lon, lat, time] dimensions. The calculation is done smoothly (which is suspiciously  amazingly quick) and produces a binary file with (.dat) extension.

This dat file is probably meant for hydrodynamic modelling software but I cannot access them.

Is there a way to read this dat file by QGIS, or convert it to other formats for further analysis?

[Edit] ... Poor choice of word. As commented by Gabriel De Luca, it works lightning fast.


texts: Using Labels from Maplex engine inside ArcGIS Explorer?

texts:
I'm trying to display data in the upper left and upper right corners of this parcel data.  I can get it to work inside ArcMap with the Maplex engine, but when I save a layer file and open it in arc explorer it puts the two labels back in the middle.

Any ideas how I can get those to stay in the corner of each parcel?


texts: Matching my shapefile to a DGN that has an unknown projected coordinate system?

texts:
I was asked to pull the 2-foot contours from Aiken County in South Carolina (http://www.dnr.sc.gov/GIS/lidarstatus.html) and send them to a person working in Microstation to match the scale and location of their working DGN file.

I successfully downloaded the file gdb, clipped it appropriately to the size of the project site, and converted it to DGN to send to my coworker.

The source properties are as follows:

Projected Coordinate System:
NAD_1983_NSRS2007_StatePlane_South_Carolina_FIPS_3900_Ft_Intl
Projection: Lambert_Conformal_Conic
Geographic Coordinate System:   GCS_NAD_1983_NSRS2007

When she references the contour DGN into her working file, it is located thousands of miles away and is not scaled correctly. Turns out the geographic coordinate system of her file is "unknown." What can I do?


texts: Filtering by multiple attributes in QGIS

texts:
I have a layer that contains multiple attributes in multiple fields that I would like to select between without needing to type out a query each time.

I am able to do this with extract by expression, but would like a way to make it more user friendly to switch between them on the fly, for example with cascading boxes or slicers. Is this possible?


texts: ArcObjects - IExportPDF2 and esriExportPDFLayerOptions Not Working as Expected

texts:
I have a small function that exports a map document to a pdf.  The function works in the fact that it does export a pdf.  However, regardless of what I set pdfExport.ExportPDFLayersAndFeatureAttributes to, all of the layers are grouped into a single layer 'Image' in the output pdf.  In the code snippet below, I would expect the map layers to be toggle-able layers in the output pdf.  What am I doing wrong?

BTW - this is at ArcGIS 9.3.1

int OUTPUT_RES = 300;
IExport export = null;

IExportPDF2 pdfExport = new ExportPDFClass();
pdfExport.ExportPDFLayersAndFeatureAttributes = esriExportPDFLayerOptions.esriExportPDFLayerOptionsLayersAndFeatureAttributes;

export = (IExport)pdfExport;
export.Resolution = OUTPUT_RES;
export.ExportFileName = outputFile;

tagRECT exportFrame = map.ActiveView.ExportFrame;
IEnvelope exportEnvelope = new EnvelopeClass();
exportEnvelope.PutCoords(exportFrame.left, exportFrame.top, exportFrame.right, exportFrame.bottom);
export.PixelBounds = exportEnvelope;

int hdc = export.StartExporting();
map.ActiveView.Output(hdc, OUTPUT_RES,exportFrame,null,null);
export.FinishExporting();
export.Cleanup();


texts: Loading a custom module from different file with ESRI API4 and Dojo

texts:
I am trying to create a demo app to better understand how to minimize my code by creating more files.
I am using the base starter app sample on one js file and trying to add a widget on another. The code works on the same file but after the divide its breaking.
I added a dojo config, a dojo-ready function and a new define in the widgets.js file.
I am using "define" and not "require" on the widget.js because it's dependent on the main but not sure if it's ok because it will only be called once.
This is how my app looks:
modules
   -widgets.js
index.html
main.js
index.html

  <meta charset="utf-8">
  <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
  <title>ArcGIS API for JavaScript Tutorials: Create a Starter App</title>

  <link rel="stylesheet" href="https://js.arcgis.com/4.18/esri/themes/light/main.css">

main.js
require([
  "esri/Map",
  "esri/views/MapView",
  "dojo/ready",
  "widgets/searchWidget"
], function(Map, MapView,ready) {
    ready(function () {

    var map = new Map({
        basemap: "topo-vector"
    });

      var view = new MapView({
        container: "viewDiv",
        map: map,
        center: [-118.80500, 34.02700], // longitude, latitude
      zoom: 13
      });

    var widget = new searchWidget(view)
     });

});

widget.js
define(["esri/widgets/Search"], function(Search) {
var search

return{

    searchWidget: function(view){

        search = new Search({
            view: view
          });

        view.ui.add(search, 'top-right');
    }
}

 });


texts: Maximum number of points for creation of spatial index in PostGIS?

texts: I have a table containing 100 million point geometries. I was wondering if there is a maximum number of geometries when creating a spatial index in PostGIS/PostgreSQL? Or is it only a matter of time/resources?


texts: How to use the "geometry generator" to intersect geometries with an entire layer in QGIS?

texts:
In the "geometry generator" style in QGIS, it's possible to define an intersection for a specific geometry of an other layer like this:

intersection($geometry, geometry(get_feature( 'other_layer_name','attribute_name','attribute_value')))

Is it possible to do the same but on an entire layer, not only on one geometry?


texts: How to fix OpenLayers plugin for QGIS Master?

texts:
I can't get the OpenLayers plugin to work in QGIS Master (1.9), I loaded the repository successfully, but the plugin doesn't come up as an option anywhere.  I'm new to this, but have tried to make sense of several fixes (here: http://hub.qgis.org/issues/6979).  I don't know where/how to save the patch/file. Any help is appreciated, I have to have some kind of streets basemap by the morning.

Thanks!!
Brian


texts:
I want to create a short video illustrating the route of a proposed road by starting the map in one position, then panning to a number of other points. Is this possible in QGIS using the time manager or other methods?

I COULD export a high res image from QGIS and pan the image in Sony Vegas but I am wondering if it is possible using QGIS only.


texts: how to extract coordinates (latitudes and longitudes) from a raster? using arcGIS

texts:
I am a student working on my final year study. It's my first time using ArcGIS.
I need to have the coordinates of the polygons that I choose to work on.
After converting the zones that I created into a raster, I want to extract the coordinates.


texts: How do I implement Google Maps API V3 Image Map Type?

texts:
I'm new to the Google Maps API V3 and I am trying to add a set of map tiles via the image map type. I followed the steps in this article, and have had no dramas creating the Tileset. I used GDAL2TILES and the the tilesets looks as expected in the preview apps that are generated with the program.

However I cannot get the tilset to show up in my google maps application. My implementation of the Image map type looks like this below

    //The index.html and 'sma_map_1989' folder are in the same directory
    var smaMapOverlay = new google.maps.ImageMapType({
      getTileUrl: function(coord, zoom) {
        return 'sma_map_1989' + '/' +zoom+ '/' +coord.x+ '/' + coord.y +'.png';
      },
      tileSize: new google.maps.Size(256, 256)
    });
    map.overlayMapTypes.push(smaMapOverlay);

Am I missing something here? It's such a simple thing to do in leaflet and Openlayers.


texts: CV2 raster values are different from the ones in my raster in QGIS?

texts:
I'm trying to do thresholding with the CV2 Python module to binarize a raster image so that vegetation = 1 and everything else = 0. The problem is that when I pick a reasonable value to do the thresholding with CV (in Python) I just get a black output raster. I messed around and made a histogram to figure out why and this is what I see:

What's going on here? The actual values range from up to 2530 (I truncated the value from 0-20 because there's nothing after x = 7.5.) I changed the threshold value in CV2 to 2 and the output looks good now, but that doesn't explain why the greyscale values aren't matching up what's in QGIS.
I suspect this might have something to do with how many bits the data has. It's currently in an unsigned 16 bit format. I can't get it down to 8 bit unsigned...just "byte".
Here's what I've tried:

raster -> convert -> transform to change the raster image to 8 bytes.
toolbox -> SAGA -> raster normalization to change the pixel range from 0-255.

No dice! How do I fix this?


texts: Quality of free geodata compared to commercial sources

texts:
What are the sources of excellent geo-location data as possessed by Google Maps ?

I am wondering that, even with large amount of volunteer work involved, why is OSM data not comparable to theirs in terms of quality ?


texts: QGIS how to batch process zonal statistics?

texts:
I'm trying to figure out how to run "zonal statistics" in QGIS 3.8.2 (qgis:zonalstatistics) on multiple hundred shapefiless with building footprints and corresponding raster files (each share the same extends and filenames except for the extension). The aim to to weed out buildings that fall fully or partially within water.
What I have:

Vector shapefiles with building footprints
RGB raster files with watermasks (black = water, white = land)

The whole process should be rather simple with "zonal statistics".
For whatever reason however "zonal statistics" only writes the resulting values as new attributes into the existing shapefile when it is set as "editable". Which obviously doesn't work that simple for several hundred files in a row.
Running "zonal statistics" as a batch process works just fine, with the exception that nothing happens to processed files because they obviously haven't been set as "editable" on the fly while the process was running through them.
How can I either make several hundred shapefiles editable before running "zonal statistics" or have it apply the changes to a new set out output shapefiles?


texts: overlaying xarray data with shapefile using

texts:
import xarray
import xshape
import matplotlib.pyplot as plt

da.xshape.overlay(shapefile,colors=['b', 'orange', 'g', 'r', 'c', 'm', 'y', 'grey', 'Brown', 'ForestGreen'],levels =10)

I tried to plot xarray data with boundaries by shape files using xshape . I am geting connected lines over sea for india


texts: Convertfeaturestographics Tool or Program

texts:
Problem : With over 19 feature classes in our dataset, we need to convert all these featureclasses to graphic . But to do it programmatically, we searched the resources but could not find a Python script for converting features to graphics.

Though below VBA code was available , I hope it wont help us in 10.1

http://edndoc.esri.com/arcobjects/9.0/samples/arcmap/convertfeaturestographics.htm

Mightbe we are missing some trick here ?


texts: Converting a FLIR image CSV to TIFF using Python

texts:
I have a geolocated CSV file containing one lat, long coordinate for the entire thermal image. I would like to convert this CSV to a TIFF using Python so that each pixel contains a temperature. All the posts I have viewed online deal with a CSV file which has coordinates for each pixel stored in columns of lat and long. With just one pair of coordinates, I am unsure how to do this.
Here is an example of my data, the columns are temperature values of pixels but there are no lat, long coordinates because the image itself is only associated with one lat, long coordinate:
EXAMPLE
Frame 1: 0.812, 0.930, 1.375
         0.932, 0.714, 1.342
         0.899, 0.767, 0.987


texts: Making bar charts with values in popup windows in web map using QGIS?

texts:
I'm an amateur of QGIS.

I've set up a map with a bar chart overlay. However, there are some charts overlaying each other. So I would like to create a map which when people click / however an area on the map, a pop-up window will then show the bar charts.

Something similar to this.

I tried D3 Render Plugin as informed by Bar / Column Charts with values and follow the d3 MapRenderer guide.

However, I cannot select the field that I would like to visualize in the bar chart.

Any advice what to do?


texts: QGIS distance matrix projection and alternative output format

texts:
I have around 200 thousand cities around the globe and are in a point shapefile with equidistant conic projection. I use ArcGIS and QGIS but have two problems:

When I use distance matrix tool, it gives me the distance in decimal degree.
the output file reach 12.2 GB and stop saving more records. I dont see any other format I can choose with a larger limitation.


texts: Using Make Query Table to join featureclass with table using 2 fields

texts:
I would like to join a forest density table to a forest ownership featureclass  in a geodatabase based on two columns in each (TPO_Owner and County_Nm) so I can populate the Density column in the featureclass with forest residuals density values from the table.  Each county contains forested area assigned to 1 of 4 ownership types, and each ownership type in each county has a forest residuals density assigned to it.

I assume the best method for a "join" like this is to use the Make Query Table tool.  I have tried the tool in ArcMap and ArcCatalog using ModelBuilder by selecting all the relevant fields in both tables, using the following expression:

'ID_forested_LU_ownership_by_county.TPO_Owner'= 'ID_forest_density.Owner_Type' AND 'ID_forest_density.County_Nm'= 'ID_forested_LU_ownership_by_county.County_Nm'

and using both "Use Key Field" and "Add Virtual Key Field" in different runs.  My problem is that the resulting table does not properly do a join based on the two columns in each table.  The resulting featureclass is 11 GB and creates every iteration of Forested Ownership.county + Forested Ownership.ownership type + ID Density.county + ID Density.ownership. And it doesn't even bring over the density values from the table!

The files are in a file geodatabase.

How can I get the join (or an alternative approach) to work properly?


texts: How to dynamically query and visualize PostGIS data using GeoDjango and OpenLayers?

texts:
I am trying to implement dynamic query functionality in GeoDjango and OpenLayers. First, I filter the data and return it in GeoJSON format using Django serialize. Then, the return GeoJSON data visualize using OpenLayers 6. It works fine. But, When I try to filter data dynamically, it is not working. I don't understand the problem. How can I fix this?
// GeoDjango Model

    from django.contrib.gis.db import models

    class Boundary(models.Model):
        division = models.CharField(max_length=50)
        district = models.CharField(max_length=50)
        upazila = models.CharField(max_length=50)
        union = models.CharField(max_length=50)
        geom = models.MultiPolygonField(srid=4326)

    def __str__(self):
        return self.division

// views.py

    def boundary_data(request):
        """ bnd = Boundary.objects.filter(district="Khulna")""" // it is working fine
        name=request.GET.get("district")
        bnd = Boundary.objects.filter(district__iexact=name) // not working
        boundary = serialize('geojson', bnd)
        return HttpResponse(boundary, content_type='JSON')

// urls.py

    from django.urls import path
    from . import views
    urlpatterns = [
        path('boundary-data/', views.boundary_data, name="boundary-data"),
        path('bgd/', views.MapView.as_view(), name="bgd"),
    ]

// query form

    <form method='GET' class="form-inline" action="">
      <input class="form-control mr-sm-2" id="district" name="district" type="text" placeholder="Search">
      <button class="btn btn-success" type="submit">Search</button>
    </form>

//OpenLayers code

    var style = new ol.style.Style({
              fill: new ol.style.Fill({
                color: 'gray',
              }),
              stroke: new ol.style.Stroke({
                color: 'white',
                width: 1,
              }),
              text: new ol.style.Text()
            });

    var map = new ol.Map({
              target: 'map',
              layers: [
                new ol.layer.Tile({
                  source: new ol.source.OSM()
                }),
                new ol.layer.Vector({
                  source: new ol.source.Vector({
                      format: new ol.format.GeoJSON(),
                      url: "{% url 'boundary-data' %}"
                  }),
                  style: function (feature) {
                    style.getText().setText(feature.get('union'));
                    return style;
                  }
                })
              ],
              view: new ol.View({
                center: ol.proj.fromLonLat([89.5403, 22.8456]),
                zoom: 10
              })
            });


texts:
I have tables in an Oracle 18c GDB that I integrate to a work order management system.
I create views on the tables to translate the data. For example, I translate domain codes to domain descriptions.
I do this by joining to a view that extracts the domain values from the GDB system tables:
select
    substr(extractvalue(codedvalues.column_value,'CodedValue/Code'),1,255) as code,
    substr(extractvalue(codedvalues.column_value,'CodedValue/Name'),1,255) as description
from
    sde.gdb_items_vw i
join
    sde.gdb_itemtypes it
    on i.type = it.uuid, table(xmlsequence(xmltype(definition).extract('/GPCodedValueDomain2/CodedValues/CodedValue'))) codedvalues
where
    i.name = 'ASSET_STATUS'

Question:
In addition to getting the domain's description, I would also like to select the date that the domain was last updated.
However, I don't see any sort of date field in sde.gdb_items_vw and I don't think scn_to_timestamp(ora_rowscn) will work.
How can I select a domain's last update date?


texts: Convert OpenStreetMap schemas to ArcSDE in PostgreSQL database

texts:
I am trying to find a way to store OSM Extracts (or possibly the planetfile) in a PostgreSQL database, keep it up to date with diff files and then process the data further with ArcGIS (e.g. Geocoding, Mapping).

The best idea I have come up with so far is to import the osm data into the database with common OSM tools like Osmosis or osm2pgsql. My problem is, that those tools create different schemas than SDE.

Has anyone ever tried this before, or a good idea on how to convert between the schemas? I'm open to any comments or suggestions.


texts: How to fix "Unable to load GdalTools plugin. The required "osgeo [python-gdal]" module is missing."

texts:
When I start QGIS, it display error message:
Unable to load GdalTools plugin.
The required "osgeo [python-gdal]" module is missing.
Install it and try again.

Couldn't load plugin 'processing' from ['/usr/share/qgis/python', '/home/notroot/.qgis2/python', '/home/notroot/.qgis2/python/plugins', '/usr/share/qgis/python/plugins', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PIL', '/usr/lib/python2.7/dist-packages/gst-0.10', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', '/usr/lib/python2.7/dist-packages/ubuntuone-client', '/usr/lib/python2.7/dist-packages/ubuntuone-control-panel', '/usr/lib/python2.7/dist-packages/ubuntuone-couch', '/usr/lib/python2.7/dist-packages/ubuntuone-installer', '/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol', '/usr/share/qgis/python/plugins/fTools/tools']

I am using QGIS 2.6 and Ubuntu 12.04!

This is the packages I have installed:

dpkg -l | grep qgis

 ii  libqgis-analysis2.6.1            2.6.1-1precise1       QGIS - shared analysis library
 ii  libqgis-core2.6.1                2.6.1-1precise1       QGIS - shared core library
 ii  libqgis-customwidgets            2.6.1-1precise1       QGIS custom widgets for Qt Designer
 ii  libqgis-gui2.6.1                 2.6.1-1precise1       QGIS - shared gui library
 ii  libqgis-networkanalysis2.6.1     2.6.1-1precise1       QGIS - shared network analysis library
 ii  libqgisgrass2.6.1                2.6.1-1precise1       QGIS - shared grass library
 ii  libqgispython2.6.1               2.6.1-1precise1       QGIS - shared Python library
 ii  python-qgis                      2.6.1-1precise1       Python bindings to QGIS
 ii  python-qgis-common               2.6.1-1precise1       Python bindings to QGIS - architecture-independent files
 ii  qgis                             2.6.1-1precise1       Geographic Information System (GIS)
 ii  qgis-common                      2.6.1-1precise1       QGIS - architecture-independent data
 ii  qgis-plugin-globe                2.6.1-1precise1       OSG globe plugin for QGIS
 ii  qgis-plugin-globe-common         2.6.1-1precise1       OSG globe plugin for QGIS - architecture-independent data
 ii  qgis-plugin-grass                2.6.1-1precise1       GRASS plugin for QGIS
 ii  qgis-plugin-grass-common         2.6.1-1precise1       GRASS plugin for QGIS - architecture-independent data
 ii  qgis-providers                   2.6.1-1precise1       collection of data providers to QGIS
 ii  qgis-providers-common            2.6.1-1precise1       collection of data providers to QGIS - architecture-independent files
 ii  qgis-server                      2.6.1-1precise1       QGIS server providing various OGC services

Update (from comment):

dpkg -l | grep gdal returns

1.10.0-1~precise2
ii  libgdal-dev     1.10.0-1~precise2                       Geospatial Data Abstraction Library - Development files
rc  libgdal1-1.7.0  1.7.3-6ubuntu3                          Geospatial Data Abstraction Library
ii  libgdal1h       1.10.0-1~precise2                       Geospatial Data Abstraction Library
ii  python-gdal     1.10.0-1~precise2                       Python bindings to the Geospatial Data Abstraction Library
ii  python3-gdal    1.10.0-1~precise2                       Python 3 bindings to the Geospatial Data Abstraction ibrary


texts: Styling specific layer by using polygon mask in QGIS?

texts:
I have a line layer and a polygon layer in QGIS:

I would like to style the part of the line layer outside the polygon using one style and the part inside using a different style:

I don't want to create a derivative data set, ex. clip the line layer and style the two parts.

This is a simple case but in my QGIS project I have +30 layers so I think any layer blending would disturb the underlying layers.

Is it possible to do something like this?

I don't want to show the polygon layer, it is just here to visualise what I would like to do.


texts: We are looking at using Lutra Consulting's Input App on some IOS devices that have website restrictions.  Wondering if anyone has a list of sites that this app needs to communicate with so that we can have them white listed.


texts: Seeking documentation for SpatiaLite functions like AddGeometryColumn

texts:
I'm looking for the documentation for SpatiaLite functions but all my links are failing.
The Gaia GIS website appears to be down https://www.isitdownrightnow.com/gaia-gis.it.html, but I'm not sure if this is a temporary problem, or whether the docs have been moved somewhere else.
I have found some docs on the Wayback Machine, but this also suggests that some pages, at least, are no longer maintained. http://web.archive.org/web/20200503035740/http://www.gaia-gis.it/gaia-sins/spatialite-cookbook/html/new-geom.html
Is there a current repository for the SpatiaLite Manual and documentation?


texts:
I'm using GDAL to warp images into a different map-projections. However the warping processes seem to leave grey marks where the boundary of the original image was (see warped.png below). I figured out this was probably caused by my image having a white background and the 'filler' pixels created by the warping process being transparent but black. And the interpolation is smudging the black and white together (even though it shouldn't as the black is transparent).

Is there any way to avoid the grey outline from appearing? Maybe force gdalwarp to fill with opaque white rather than transparent black?

I can't do a square crop on the warped image as I'll loose bits of the image, and I can't just make my background black instead of white as this messes up some filtering I have to do beforehand.

There seems to be lots of options for gdalwarp that sound useful like -srcnodata but I can't figure out how to use them.

input.png

warped.png

warped.tiff


texts: Issue with QGIS modeler raster calculator

texts:
I'm trying to apply a formula to scale an NDVI map from a WMS with QGIS modeler, but it keeps throwing me an error. I tried to do this without the modeler and it works.
Here are the steps I want to accomplish in the QGIS modeler:

Apply the algorithm "map to raster" to my NDVI map (previously added to my project)  with a predefined resolution (since I'm working with small areas, I set it to 1 unit map per pixel)
With the algorithm "raster calculator", apply the recommended formula from the website I downloaded the NDVI, to the NDVI generated in the previous step. The formula is: (1 * BandaTriada - 100) / 100, where BandaTriada means my "OUTPUT@1"

At this point I already have the NDVI as I want it to be. All that's left is adding my NDVI style to the raster layer generated, with the  set style to raster layer algorithm.

The script gets stuck while performing the raster calculator part - the error I'm getting is:

Versión de QGIS: 3.10.4-A Coruña
Revisión del código de QGIS: 10bc9f2ff2
Versión de Qt: 5.11.2
Versión de GDAL: 3.0.4
Versión de GEOS: 3.8.1-CAPI-1.13.3
Versión de PROJ: Rel. 6.3.1, February 10th, 2020
Procesando algoritmo...
Algoritmo 'modelo' comenzando…
Parámetros de entrada:
{ 'Extension' : '312455.56408728764,313833.46447932476,4606153.619686341,4607207.818906171 [EPSG:25831]', 'NDVImapWMS' : 'crs=EPSG:25831&dpiMode=7&format=image/png&layers=ox3dndvi2019&styles&url=http://geoserveis.icgc.cat/icc_ortoxpres/wms/service?', 'qgis:rastercalculator_1:NDVI scaled' : 'TEMPORARY_OUTPUT' }

Preparar algoritmo: qgis:rasterize_1
Ejecutando Map to raster [1/3]
Parámetros de entrada:
{ EXTENT: '312455.56408728764,313833.46447932476,4606153.619686341,4607207.818906171 [EPSG:25831]', LAYER: 'crs=EPSG:25831&dpiMode=7&format=image/png&layers=ox3dndvi2019&styles&url=http://geoserveis.icgc.cat/icc_ortoxpres/wms/service?', MAKE_BACKGROUND_TRANSPARENT: False, MAP_THEME: '', MAP_UNITS_PER_PIXEL: 1, OUTPUT: 'C:\\Users\\...\\AppData\\Local\\Temp/processing_ca25d8d8ef7c438194bb38a19eb91be7/24fdd4b2efac401d814bf96c14b56787/OUTPUT.tif', TILE_SIZE: 1024 }
OK. La ejecución tardó 20.074 s (1 salidas).
Preparar algoritmo: qgis:rastercalculator_1
Ejecutando Raster calculator [2/3]
Parámetros de entrada:
{ CELLSIZE: 1, CRS: 'ProjectCrs', EXPRESSION: '(1 * \"\'Capa de salida\' from algorithm \'Map to raster\'@1\" - 100) / 100', EXTENT: 'C:/Users/.../AppData/Local/Temp/processing_ca25d8d8ef7c438194bb38a19eb91be7/24fdd4b2efac401d814bf96c14b56787/OUTPUT.tif', LAYERS: '', OUTPUT: 'TEMPORARY_OUTPUT' }
An error occurred while performing the calculation
Se encontró un error al ejecutar Raster calculator
Se encontró un error al ejecutar Raster calculator
La ejecución falló después de 20.24 segundos

Cargando las capas resultantes
Las siguientes capas no se generaron correctamente.

C:\Users\...\AppData\Local\Temp/processing_ca25d8d8ef7c438194bb38a19eb91be7/79264905edc3416891cf30ddd1d56e06/OUTPUT.tif

Puede comprobar el «Panel de mensajes del registro» en la ventana principal de QGIS para encontrar más información sobre la ejecución del algoritmo.

I have to say that I also had to tweak the "cellsize" and "CRS" options from the raster calculator, since I was getting an error aswell if I lefted it without any value or CRS. Not sure if it helps:

No reference layer selected nor CRS provided
No reference layer selected nor cellsize value provided


texts: Hiding placemark name and making it appear when hovering over it on Google Earth?

texts: I would like to remove the placemark names on the Google Earth Map and make them appear when I hover over the icon with the mouse. I tried to set the LabelStyle scale to 0 but it actually does the opposite situation.


texts: Can the concentration of values in a raster map be known?

texts: I have a generated raster map containing different flood levels. Is there a grass script to determine the percentage of values in a raster map? I'm thinking of using r.mapcalc to solve this, but I'm not yet sure how to do it.


texts:
I'm experimenting with Geoserver. The data i have access to right now is the following:

A Shapefile with all of Swedens farming fields as polygons. (Geoserver serves that to Leaflet as WMS or GeoJSON right now as I'm experimenting.)
A MySQL table with around 400k soil samples, coordinates and a lot of information about stuff like pH and so forth. The coordinates are not stored as spatial points right now, just a column with X value and one with Y value. The samples are taken with 100 meter interval.

The result id like to see is something like this:

What you see is 3 polygons with interpolated values, each square is about 20-30 meter. It doesn't matter if the result looks like that or if its a nice gradient all over.

On the fly i would like to get some kind of layer from Geoserver with interpolated colors based on the soil samples I've got in the MySQL table.
Im not at all certain how to combine the two data sources (polygons and samples).

How to get Geoserver to find the samples, and from that color the polygons?


texts: Converting Points to Line Feature in ArcGIS Desktop?

texts:
I am writing to ask if there is the possibility to use extensions written for ArcView 3.2 in ArcGIS 9.3

With the older version of the gis package, i had an extension that allowed me to link together isolated points, in a large pool of coordinates, with the same attributes into a line.

A typical example of my data is:

10 hours of navigation at sea made in 2 days resulting in, say, 1000 stored coordinates (500/day)
the daily navigation can be defined in different ways depending on the sea state (beaufort and duglas scales), weather condition, visibility and so on; my categories are, say, negative navigation "NN", positive navigation "PN" and off effort "X" (no navigation or transfer from a sector to another)
within the same day i can have all the three categories of navigation mentioned above, say in the following order: X, NN, PN, X, PN, X, NN, X
all the info about the navigation are stored in a single *.txt tab delimited file

What I need, after importing and playing with the *.txt file in arcgis9.3, is a tool/extension that allows me to create a line, starting from the single points/coordinates, using those points/coordinates with the same attributes. say that i want to create a line that links those points that have the following characteristics: day, navigation status, beaufort scale, douglas scale, weather condition and visibility. if there is a series of 100 consecutive points with these characteristics they should be part of the same line. as soon as the next points, say, from 101 to 200 have at least one different value of the above attributes, they should be linked among them but not with the previous 100. basically, the final result should be a series of consecutive lines which i can know the attributes and the length.

I could do all these things in ArcView 3.2 using a dedicated extension (i did not write it).

How can i do the same things in ArcGIS Desktop 9.3?


texts: Iterating over ImageCollection or a list of Images

texts:
I am unable to iterate over an ImageCollection, therefore I have created a list that contained all images in the ImaheCollection but once I try to iterate over it (by sending each image to a certain function) I get this error:

sngl_sen2.reduceRegion is not a function

I get this error from the second call to get_List (the one that sends S2_list[0])

This is the code:

var region = ee.FeatureCollection([ee.Feature(Map.getBounds(true))])

//Dates of Interest
var start = ee.Date("2018-04-01");
var finish = ee.Date("2018-05-01");

//------------------- Data bases ---------------------//
var sen2_for_dates = ee.ImageCollection('COPERNICUS/S2_SR')
  .filterDate(start, finish)
  .filterBounds(region)
  .map(function(image){
    return image
    .clipToCollection(region)
    .updateMask(image.select('QA60').not())
    .addBands(image.normalizedDifference(['B8','B4']).rename('ndvi'))
  })
  .select('ndvi')

//------------------ Creating the feature collection for export --------------//
function get_List(sngl_sen2){
   var list2 = sngl_sen2.reduceRegion({
    reducer: ee.Reducer.toList(),
    geometry: region,
    maxPixels: 1e8,
    scale: 10
  });

  // Make a feature without geometry and set the properties to the dictionary of means.
  var feature2 = ee.Feature(null, list2);

  // Wrap the Feature in a FeatureCollection for export.
  var featureCollection = ee.FeatureCollection([feature2]);
  return featureCollection
}

//Making a list of images so I can iterate over all images.
var S2_list = sen2_for_dates.getInfo()['features']

Export.table.toDrive({
  collection: get_List(sen2_for_dates.first()), //works for the first image in the ImageCollection
  fileNamePrefix: 'SEN2_',
  folder: 'AI_data/'+'try',
  selectors: ['ndvi'],
  fileFormat: 'CSV'
  });

Export.table.toDrive({
  collection: get_List(S2_list[0]), //Does not work for the first image in the list
  fileNamePrefix: 'SEN2_',
  folder: 'AI_data/'+'try',
  selectors: ['ndvi'],
  fileFormat: 'CSV'
  });

My final goal is to iterate over the list and pass on the images from the list to the get_List function (because my original code iterates over more than one list, so I need to index the objects from the different lists using the same indexed)

How can I pass S2_list[0] to the function get_List in a manner that will enable it to use it with all the functions that can be carried out in an image (e.g. reduceRegion)?

Many thanks


texts: Projecting GeoTIFF onto shaped roofs using CGA rules

texts:
I am working with CityEngine 2019.1 and would like to project a GeoTIFF as a texutre onto shaped roofs of 3D-buildings. Currently I am trying with the following code which essentials are described on https://doc.arcgis.com/en/cityengine/latest/cga/cga-setup-projection.htm:

solarMap = "data/Solarpotential_Buildings.tif"
attr FTYP = 0.0

const textureWidth = 1584.5 #Raster width in meters
const textureHeight = 1446.5  #Raster height in meters

offsetx = convert(x, scope, world, pos, 0, 0, 0) -
         (convert(x, scope, world, pos, 0, 0, 0)
         % textureWidth)

offsetz = convert(z, scope, world, pos, 0, 0, 0) -
         (convert(z, scope, world, pos, 0, 0, 0)
         % textureHeight)

Lot -->

case FTYP == 2000.0 : color("#ffdddd") #Indicates the geometry is a wall
case FTYP == 3000.0 : Roof #FTYP = 3000 indicates the geometry is a roof
else : color("#aaaaff") #All other geometries

Roof -->

    # color, uv set 0
    setupProjection(0, world.xy, textureWidth,
                   textureHeight, -offsetx, offsetz)
    # texture(solarMap)
    projectUV(0) #0 is used for colormaps so this should be correct
    scaleUV(0, 1, 1)
    set(material.colormap, solarMap)

I have tried lots of different variations within setupProjection() and scaleUV(), like world.xz, world.yz, etc. or without offsets or different scaling factors, but the GeoTIFF is always misaligned or distorted somehow. For example like this:

The colormap you can see below the buildings is the actual GeoTIFF added as plain texture for reference.

While doing it manually via Shape texturing tool and choosing Projection as Mode, the GeoTIFF is projected correctly.

All files as well as the scene do have the same CRS. Studying the linked help section and other related articles provided by ESRI didnt bring me any further so far. Basically, the error must be somewhere within this part of code:

setupProjection(0, world.xy, textureWidth,
               textureHeight, -offsetx, offsetz)
projectUV(0)
scaleUV(0, 1, 1)
set(material.colormap, solarMap)

How can I achive this correctly projected result by using CGA rules?


texts: Setting base folder for 'Open Project File' dialog with PyQGIS

texts:
For a lay user, when the user opens the dialog to open a project file, it is better if there is no need to go through folders, but access the project folder directly in the folder shown by the dialog.

It can be done by opening the project file and closing QGIS. When QGIS starts and we want to open a project file, QGIS automatically points to the last project folder opened.

I am creating portable QGIS for lay user. I want to create a code in python that will put the code in startup.py. Something like :

Set the project folder : "%~dp0DATA\QGIS2\bin"

So, when the user clicks "open project", QGIS will automatically point to the project folder.

How can I set that project folder in PyQGIS?


texts: Configuring & debugging a new mapnik / tirex installation

texts:
I've a stack OpenLayers > Apache mod_tile > tirex working with the tirex test backend on a Ubuntu 10.04 virtual machine.

However, I now have troubles with the mapnik-example backend included with tirex. OpenLayers works fine, mod_tile does not complain about the newly added "AddTileConfig  /tiles/example/ example" to my Apache httpd.conf. Also, the tirex-master receives a request from mod_tile.

I suspect this problem to lie with the configuration of the tirex Mapnik rendering backend. Using tirex-status command I can see tirex-master currently rendering the tiles for the example map. The rendering process times out after about 300 seconds and no (meta)tiles are being written to the tile directory.

I suspect a wrong configuration or problems with user/write access.

Does anyone know where I can find debug information from tirex or mapnik that can help me solve this problem? Thanks in advance.

EDIT:
I am looking for clues about what is going on in some logfiles. I suspect the problem to lie with the tirex-backend-mapnik process, which seems to be managed by the tirex-backend-manager process.

In the [OSM Tirex Logging wiki page][1] it says that the tirex-master and tirex-backend-manager will log to the syslog by default, which should be located under /var/log/messages.

This logfile has the following entry at the end

Dec 23 12:50:13 ubuntumapserver kernel: [10967.139797] mapnik[2079]: segfault at 0 ip 000000000041314b sp 00007fffacfa9530 error 4 in mapnik[400000+1f000]
Dec 23 12:50:14 ubuntumapserver kernel: [10968.391401] mapnik[2077]: segfault at 0 ip 000000000041314b sp 00007fffe23608a0 error 4 in mapnik[400000+1f000]

Does anyone know have any clues about what can be causing this error?

EDIT 2:

Hi Dane,

Thanks for your reply. I installed Mapnik from source using the [Mapnik wiki tutorial][2] (Installation on a VM guest running Ubuntu 10.04 Server x64)

python scons/scons.py configure DEBUG=True INPUT_PLUGINS=all OPTIMIZATION=3 SYSTEM_FONTS=/usr/share/fonts/
python scons/scons.py
sudo python scons/scons.py install

I have successfully used Mapnik standalone via the Python commmand line to render images.

Furthermore I did an strace during a request from OpenLayers. (I saw you recommending this elsewhere). I can see mod_tile.so being called. However, there is no data about tirex or mapnik.

[strace][3]
[config.log from Mapnik installation][4]

Therefore, I guess you might be correct about tirex not working with a compiled version of Mapnik. I will try to find out if this is indeed the problem.

1_http://wiki.openstreetmap.org/wiki/Tirex/Logging (About Tirex Logging)
2_http://trac.mapnik.org/wiki/UbuntuInstallationOld (Mapnik installation)
3_http://pastebin.com/L8VBzvgM (strace of a tile request)
4_http://pastebin.com/yvLQDr39 (Mapnik scons config.log)


texts: Creating Chart in Silverlight that is bound to Layer in Map

texts:
I have a simple Silverlight Application that has a Map control that shows a ESRI Tiled layer service and a Dynamic Layer service.  The Dynamic Layer service is just called "Wells" and it has a "Date" column and "Gas_Percent" field that would be perfect to show in a Chart.
Does anyone know how I can do this?
I've been looking at these examples in below hyperlink (for LineSeries) (Silverlight Chart Examples) but I don't know how to use my Wells layer and Date and Gas_Percent columns in place of what they have.


texts: Set region with rounded values/coordinates

texts:
How do I set a region update with rounded coordinates.

I usually set my region from a puffer around my points of interest and round up the north and east coordinates and round down the south and west coordinates manually.

Is there a way to do that faster and automatically?

g.region vect=puffer
g.region -p
# output coordinates with decimal places, like:
# north:      5567793.38187444
# south:      5537794.12612555
# west:       3462339.95848376
# east:       3492338.47
g.mapset mapset=PERMANENT
g.region n=5567794 s=5537794 w=3462339 e=3492339 res=30 -aps
g.mapset mapset=test


texts: I would like to know how to calculate area of raster image based on cell? based on night light data I classified the image and i need to know the area of that particular classified area


texts: Is there a way to save manual QGIS changes to Postgis to SQL script?

texts:
I am manually editing a Postgis layar with QGIS and would like to export these manual changes in the form of an SQL script. This way:

I can do it automatically next time i need to
it is easier to work on remote machines where i don't have QGIS

Is this possible?


texts: MrSid layer not showing up using GeoServer 2.5.2

texts:
I am using GeoServer 2.5.2 on windows.  It is running as a service.  I followed all the steps to add the MrSID support to geoserver. Now I have the option to select MrSID Raster Data Source. I select MrSid and setup the store (Add Raster Data Source):

Workspace: cite
Data Source Name: test1
Description: test1
Enabled: true
URL: file:data/MrSID/test1.sid

I then click on the SAVE button. Now I get to the "New Layer" screen:

Published   Layer name               Action
            geotools_coverage        Publish

At this point I click on "Publish". Now I get to the "Edit Layer" screen:

name: test1
enabled: true
advertised: true
title: test1
etc

I click on "Save" at the bottom of the page.  I then click on "Layer Preview" on the left side menu of GeoServer. The new layer is not there.  What step(s) did I miss?


texts:
I just did a fresh install of Anaconda3 and am trying to add GDAL/OGR. I've tried installing with both conda install gdal and conda install -c conda-forge gdal.  In both cases, the install completes successfully, but when I import gdal, it raises the error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\Jhook\AppData\Local\Continuum\miniconda3\lib\site-packages\gdal.py", line 2, in <module>
    from osgeo.gdal import deprecation_warn
  File "C:\Users\Jhook\AppData\Local\Continuum\miniconda3\lib\site-packages\osgeo\__init__.py", line 21, in <module>
    _gdal = swig_import_helper()
  File "C:\Users\Jhook\AppData\Local\Continuum\miniconda3\lib\site-packages\osgeo\__init__.py", line 17, in swig_import_helper
    _mod = imp.load_module('_gdal', fp, pathname, description)
  File "C:\Users\Jhook\AppData\Local\Continuum\miniconda3\lib\imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "C:\Users\Jhook\AppData\Local\Continuum\miniconda3\lib\imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: DLL load failed: The specified module could not be found.

I've found several workarounds out there, but most date back a few years and don't reflect more recent updates or changes.  Is there a fix for this problem that works in 2018?


texts: Operating with Image collections (Band math operations)

texts:
I'm trying to obtain the NDSI index operating with a collection in GEE but always displays a error saying teres is a missing argument in a function and I cannot see the mistake as I followed the script of Google developers : https://developers.google.com/earth-engine/guides/ic_iterating
Does anyone know another way to oparate with image collections?
var dataset = ee.ImageCollection('LANDSAT/LC08/C01/T1_SR')
.filterDate('2018-01-01', '2019-12-31');

var series = dataset.map(function(image) {
return image.set('system:time_start', image.get('system:time_start'));
});

// This is a function to pass to Iterate().
// As NDSI images are computed, add them to the list.
var NDSI = function(image, list) {

var NDSIs = (image.select("B7").subtract(image.select("B3"))).divide(image.select("B7").add(image.select("B3")))
// Propagate metadata to the new image.
.set('system:time_start', image.get('system:time_start'));

// Return the list with the cumulative anomaly inserted.
return ee.List(list).add(NDSIs);
};

// Create an ImageCollection
// Since the return type of iterate is unknown, it needs to be cast to a List.
var NDSI_collection = ee.ImageCollection(ee.List(series.iterate(NDSI)));

print(NDSI)


texts: PostGIS 3 table join & classification with MapServer

texts:
I have been trying to create a mapServer map by joining 3 table then create classes on those joins (2000 - red, 2010 - green, 2020 - blue)

I am not getting an error but noting is display

$query = "geom FROM (SELECT a.geom, b.geom, c.geom FROM data2000 as a INNER JOIN data2015 as b ON b.province = '$variable' INNER JOIN data2020 as c ON b.province = '$variable') AS subquery USING UNIQUE gid USING SRID=4326";

I would also like to see this represented in

CLASS
     data 1
     STYLE
        ....
     END
END
CLASS
     data 2
     STYLE
        ....
     END
END
CLASS
     data 3
     STYLE
        ....
     END
END


texts: Method to convert all 'overlapping' points to exact same geometry in QGIS 3.4

texts:
I have a point vector layer with approximately 2.5 million points, many of which share the same or a very similar geometry (within 1 m of each other).

I would like to know if I can bulk amend the geometry of these points so they are exactly the same if they are within that 1 meter threshold in the X-Y plane?

The majority of 'overlapping' points do share the exact same geometry so ideally I would want to amend those points that fall outside the majority to have the same geometry.

I am familiar with PyQGIS but not confident in it's use.


texts: Error connecting to gov.uk WFS in QGIS 2.18.15

texts:
I am trying to connect to a UK Government WFS but am getting the following error:

Layer minerals_local_plan: Download of features for layer inspire_inspire_energy:minerals_local_plan failed or partially failed: Download of features failed: Error downloading http://map.cornwall.gov.uk/arcgis/services/inspire/inspire_energy/MapServer/WFSServer?SERVICE=WFS&REQUEST=GetFeature&VERSION=2.0.0&TYPENAMES=inspire_inspir

Below is the URL for the WFS:
http://map.cornwall.gov.uk/arcgis/services/inspire/inspire_energy/MapServer/WFSServer?request=GetCapabilities&service=WFS

I am not sure where I am going wrong The URL is correct and QGIS seems to be connecting to the server, as layers within the WFS are identified in the Browser Panel.