texts: Determining the centroid of the thickness calculation used in Zonal Geometry

texts:
I have a need to determine the coordinates at the centroid of the "deepest" point within an irregular polygon feature.  I have done some researching and found that Zonal Geometry calculates the Thickness of a "zone" by determining the maximum interior distance from the perimeter of the "zone"  In the documentation provided by ESRI on the "Geometry Type" parameter for Thickness https://desktop.arcgis.com/en/arcmap/10.3/tools/spatial-analyst-toolbox/h-how-zonal-geometry-works.htm, they have these diagrams:

In the diagrams, they have depicted red circles with lines radiating from the center of a circle that has determined the "deepest" or "thickest" point within a polygon or raster zone value.  I have a need to calculate the coordinates of the "deepest" point.
Can someone help me walk through a process to make this calculation?


texts:
I am completely new to QGIS and have a basic wuestion,
I am trying to create a map with OpenStreetMap and set it to a specific coordinate system. The problem is that when I set the CRS the map disappears. I literally have no idea what i'm doing.

First I try to set the CRS:

Then:

Then:

Then:

Then:

And nothing happens....please help.


texts: How to reduce trajectories with Bellman algorithm?

texts:
I need an algorithm to reduce trajectories with Bellman algorithm. I haven't found anything searching in Google.

Can someone help me?

It would be cool have it in MATLAB.


texts: Error creating Geoserver App-schema Store with Postgres: "AttributeTypeImpl cannot be cast to ComplexType"

texts:
I have this postgis table

el_str( classid varying(70), meta_ist_data_cre date, meta_ist_data_mod  date, meta_ist_ent_for  character varying(100), meta_ist_livello    numeric(15,0),meta_ist_origine  character varying(80), meta_ist_scala   character varying(80),
meta_ist_tipo_mod   character varying(80),el_str_tra geometry)

I have created the datastore.xml file and mapping file el_str.xml and this is a simple mapping:

<targetTypes>
    <FeatureType>
        <schemaUri>newxsd.xsd</schemaUri>
    </FeatureType>
</targetTypes>
<typeMappings>
    <FeatureTypeMapping>
        <sourceDataStore>datastore</sourceDataStore>
        <sourceType>el_str</sourceType>
        <targetElement>IT:EL_STR</targetElement>
        <attributeMappings>
    <AttributeMapping>
                <targetAttribute>IT:EL_STR</targetAttribute>
                <idExpression>
                    <OCQL>getId()</OCQL>
                </idExpression>
            </AttributeMapping>
        </attributeMappings>
    </FeatureTypeMapping>
</typeMappings>

The xsd file (newxsd.xsd) its:

<?xml version="1.0" encoding="UTF-8"?>
<schema elementFormDefault="qualified" attributeFormDefault="unqualified" version="3.0"    targetNamespace="http://webgisproject.no-ip.org" xml:lang="it" xmlns:gml="http://www.opengis.net/gml" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xlink="http://www.w3.org/1999/xlink">

<import namespace="http://www.opengis.net/gml" schemaLocation="http://schemas.opengis.net/gml/3.1.1/base/gml.xsd"/>

<element name="EL_STR" type="IT:EL_STRType" substitutionGroup="gml:_Feature"/>

<complexType name="EL_STRType">
    <complexContent>
        <extension base="gml:AbstractFeatureType">
            <sequence>
                <element name="UUID" minOccurs="1" maxOccurs="1" />
                <element name="EL_STR_TRA" type="gml:CurvePropertyType" minOccurs="1" maxOccurs="2" />
                <element name="META_IST_DATA_CRE" minOccurs="1" maxOccurs="1"/>
                <element name="META_IST_DATA_MOD" minOccurs="1" maxOccurs="1"/>
                <element name="META_IST_ENT_FOR" minOccurs="1" maxOccurs="1"/>
                <element name="META_IST_LIVELLO" minOccurs="1" maxOccurs="1"/>

            </sequence>
        </extension>
    </complexContent>
</complexType>

</schema>

When I enable IT_el_str store I have this error:

  Original exception error:

  org.geotools.feature.type.AttributeTypeImpl cannot be cast to org.opengis.feature.type.ComplexType

In catalina.out there are this warnings/errors:

WARN [data.complex] - IT:EL_STRType has no super type
WARN [data.store] - Error obtaining datatore with modified values
java.io.IOException
...
...
Caused by: org.geotools.feature.type.AttributeTypeImpl cannot be cast to org.opengis.feature.type.ComplexType

Do you have any idea??
Thanks


texts: How to draw lines of specified lengths in specified directions in Mapinfo?

texts:
I have an Excel file with the following data:

1) longitude and latitude which represents a point
2) Angle which represents where line turns from North
3) length of line.

Is is possible to draw these lines in bulk?

Note : I know how to create these lines individually using a tool, but not in bulk.


texts:
I have Apache running Geoserver on my virtual instance, and I am wondering whether the Geoserver data directory can point to an Amazon S3 bucket. Is this possible? How does this affect performance?

If S3 is a poor setup for Geoserver's data directory, are there any suggestions for adding large amounts of data to my Geoserver data directory? The data directory may reach up to 100's of GB's, possibly more. Should I just get a server with a large hard drive, or connect to a more scalable solution, like an Amazon S3 bucket?


texts: Opening selected ArcMap document failed?

texts:
Has anyone come across this error when opening up a MXD file?

Opening the selected ArcMap document failed.

ArcMap had frozen on me right before this, even though no processes were in the middle of running - clicking anywhere triggered no response other than that super annoying "ding!".  I was able to close the program by right clicking in the task bar and selecting close, at which point I was asked to save the results of the editing session I was in and also save the MXD file.  I did both.  And now it can't be opened up.
Any ideas on how to fix this?


texts: Storing filtered file based on condition for later use?

texts:
I want to filter the file roads that exists in the Default.gdb so its field 'SZ' will only have rows that start with 'UWN' and store that filtered file to a variable.
Code:(it works well I just don't know how to store the filtered file)
arcpy.env.workspace = r'C:\Users\user\Documents\ArcGIS\Default.gdb'

datasetList = arcpy.ListFeatureClasses('*')

for dataset in datasetList:
    with arcpy.da.SearchCursor(dataset, ["SZ"]) as cur:
        for row in cur:
           if row[0].startswith('UWN') #filter whole field to only have rows that start with 'UWN'.
         ???   how can I store this filtered file so I continue with this? <---------

What are the proper ways to do this?
Replacement or just store it in a variable?
How to store the other columns too, based on this filtering?
update:
import os
for root, dirs, files in os.walk(r'C:\Users\user\Desktop\a\Roads'):
   for i in files:
       if i.endswith('shp'):
           arcpy.MakeFeatureLayer_management(i,i  ,"SZ" LIKE "UWN%")

Parsing error SyntaxError: invalid syntax (line 5)


texts: Distributing values evenly within zones when converting polygon to raster?

texts:
I'm trying to convert a (traffic analysis zone) TAZ polygon to raster so that the population values are evenly distributed within each zone.

So far, when converting the TAZ polygon, the same population value is included in each of the hundreds of cells that make up a zone.

I'm using ArcEditor/Spatial Analyst.


texts:
I am trying to join a .csv file to a layer in QGIS 2.18.6.
For that I created a .csvt file. However, I am not able to join the two files.
I tried it with the key both as integer and string but in both cases it didn't work.
When the key is an integer I have the additional problem, that the leading zero disappears in the key column which makes it obviously impossible to link it to the shapefile.

The .csvt file looks as follows:

"String","Integer","Integer"

or

"Integer","Integer","Integer"

The .csv file contains in the first column the key and in the rest data. The .shp file only contains a key column in the attribute table.


texts: MapInfo "distance calculator" furthest distance between polygons give same answer as closest

texts:
I got 2 layers, each layer containing 1 polygon.

When I use the "Distance Calculator" tool set to find closest point, OR Find farthest point, the result is always the same.

What I want to know is why? How does the tool calculate the "furthest distance"?

If you look at the image here, to me the furhest distance should be calculated between A and B.


texts: Check 2 Extents with Disjoint in Arcpy - Wrong Result

texts:
I'm now facing a problem using Disjoint in Arcpy to check if 2 extents are intersected.

I have 2 extents like this:

Ext1: 33206887.500051 5890587.49999999 33460887.500051 6060887.49999999 NaN NaN NaN NaN
Ext2: 33346031.7877 5892265.95 33395320.8209 5927481.3861 NaN NaN NaN NaN

According to my shape and raster, the shape with Ext2 is completely inside the raster with Ext1.

But unfortunately, using

Ext1.disjoint(Ext2)

leads to the "True"-result, which indicates that the 2 extents share no common intersection.

It drives me really crazy.


texts: ArcGIS - Way to make interior of selected polygons partially transparent?

texts: Is there a way to make the interior of selected polygons partially transparent as there is with polygons of a layer?


texts: How to Zoom to a FeatureLayer Using ArcGIS Javascript API

texts:
I am making a web application using the Javascript API and am trying to zoom to a feature layer from a row click in a dojo data grid. I have this working for a dynamic layer, but am having issues with feature layers. I am getting a Firebug error that says selectedTaxLot is undefined. Do you have any insight why this might be occuring?

//Zoom to the parcel when the user clicks a row
function onRowClickHandler(evt) {
  if (searchType == "selControl2") {
    var clickedTaxLotId = grid4.getItem(evt.rowIndex).POINT_NAME;
    var selectedTaxLot;
    alert(featureLayer.geometry);
    var highlightSymbol = new esri.symbol.SimpleMarkerSymbol().setColor(new dojo.Color([25, 50, 225, 0.3]));
    dojo.forEach(map.graphics.graphics, function (graphic) {
      if ((graphic.attributes) && graphic.attributes.POINT_NAME === clickedTaxLotId) {
        selectedTaxLot = graphic;
        graphic.setSymbol(highlightSymbol);

        return;
      }
    });

    if (selectedTaxLot.geometry.declaredClass == 'esri.geometry.Point') {
      map.centerAndZoom(taxLotExtent, 11)
      var sp = map.toScreen(selectedTaxLot.geometry);

    } else {
      var taxLotExtent = selectedTaxLot.geometry.getExtent();
      var screenpoint = map.toScreen(selectedTaxLot.geometry.getExtent().getCenter());
      var mappoint = map.toMap(screenpoint);
      map.setExtent(taxLotExtent, true);
      map.infoWindow.show(taxLotExtent.getCenter(), map.getInfoWindowAnchor(screenpoint));
    }


texts:
I will try to explain what I want to achieve.

Consider that we have 2 shapefiles: A.shp and B.shp

A.shp contains 100 points and in the circle at point (0,0) with radius 5 there are 10 points

B.shp contains 10 points and in the circle at point (0,0) with radius 5 there is 1 point
If I run the heatmap plugin, at the point (0,0) the color created would be the same.

Is it possible to normalize the heatmap across shapefiles to take into consideration the quantity of the points across the files?


texts: I have made a large map of a province and shown every house and streets as, lines and polygons, when label all of them and exporting as PDF, the text is not showing properly and it has like sharp edges, i have converted the labels to annotation, created an annotation group for it and set diffrent refrence scales for annotation group, also have tried all and every single option in pdf exporting menu, but still the problem is not solving.


texts:
New question branching off from Geometry Errors with Imported Shapefile, Unable to Fix
I attempted to buffer datapoints to convert them into many small polygons (so it will be acceptable .shp polygon format for Excel 2016 Power Maps)
Here are the steps .... why isn't it working?
1. Add vector layer

2. Select .shp file

3. Select Fixed Distance Buffer

4. Change distance from 10 to 100

5. After it's completed running I get a big green screen. Not sure what to do next


texts: Google Maps OpenLayers plugin not aligned with the OpenStreetMap building layer in QGIS

texts:
I am working on an OpenStreeetMap (OSM) building layer (I download the imposm GeoJSON in city Dar Es Salaam, Tanzania from https://mapzen.com/data/metro-extracts and used the building layer) and the Google satellite layer in Dar Es Salaam, Tanzania using QGIS. However, it seems to me that the Google map is misaligned.

I tried an imagery from OpenAerialMap and it aligns well with the OSM building layer.

Changing the current coordinate referenced system (CRS) in the bottom right of QGIS to match the CRS in the building layer does not fix the issue.

What are the possible reasons and is there any way to fix it so that they are aligned?


texts:
I wanted to know, are there any formats/data structures made specifically for indoor mapping? I have looked at OpenLayers + GeoJSON however:

How will I sync up the coordinates of my local map and the ones GeoJSON uses? (I think this is done by georeferencing the map if I understood correctly)
How will I handle different floors and manage routing (when I eventually come to that) if GeoJSON has no support for that?

That's why I wanted to know if there are any specific solution that would be beneficial for making an interactive indoor map with support for multiple floors and routing!

I've already looked at a bunch of questions which helped me a lot, but I haven't found a good answer to my questions.


texts:
I found this previous post How to edit feature attributes with openlayers? and wanted to make forms dynamically.

I tried making a variable and using a getProperties function but that didn't make the form as a popup.

Any suggestions on how to generate these forms based on a featuretype WFS request from Geoserver in Openlayers?

    value: function _onDrawEnd(evt) {
  var attributes = this._layer.getProperties();
  var wfsInfo = this._layer.get('wfsInfo');
   st = new GeoExt.data.FeatureStore({
                                layer: this._layer,
                                fields: [attributes],


texts: Using char_length in a selection function that equals everything BUT a particular number

texts:
I am selecting records with a character length greater than 13 and then again with a character length les than 11.  I'd like to do these in a single select if possible.

How can I combine the selection queries below into a single SelectLayerByAttribute, rather than having it in two selections?

arcpy.SelectLayerByAttribute_management("contacts", "NEW_SELECTION",  "CHAR_LENGTH(Contact_Phone_Work) > 13")
arcpy.SelectLayerByAttribute_management("contacts", "ADD_SELECTION",  "CHAR_LENGTH(Contact_Phone_Work) < 11")


texts: control which feature classes in an ArcGIS Network Dataset are "snappable" for incidents/facilities?

texts:
I'm using ArcGIS Network Analyst in conjunction with the GTFS extension to answer the question: How far is a random sampling of houses in my town from the nearest McDonald's? via transit/walking.

My problem is that the Facilities (McDonald's) and Incidents (residential buildings) are being located along the Transit Lines feature class in my Network Dataset; then when I go to solve the analysis, any features that get located along a transit line aren't evaluated because the "network element is not traversable". Is there a way I can restrict which feature classes in the Network Dataset can be used to locate facilities/incidents? Thanks.


texts: Force OGR to use specific driver for input format

texts:
How could one force ogr2ogr to use a specific format to read input files?

Out of the box ogr2ogr automatically chooses from it's long list of formats, which most of the time is great. However today I'm troubleshooting data files which won't convert, but should, and I'm trying to get to the bottom of why. Knowing with confidence that ogr2ogr is using the correct driver and not picking the wrong driver(s) would be a great aid in that process.

A conversation on Freenode indicated OGR_SKIP config option might be one way (the only?), but I've not been able to concoct a working incantation yet.

Both command line ogr2ogr and python solutions are welcome.


texts:
I have a question about interpreting the slope and side-slope of vineyard rows using a line vector layer and a DEM.

I am trying to calculate the slope along the row (split into 2 meter lengths) as well as the side-slope (or the slope at 90 degrees to the line).

Ultimately I would like the output to be slope and side slope attributes in the vineyard row line vector layer so I can identify any areas which are too steep for tractors.


texts: OpenLayers for Android: why does a popup panel show up twice?

texts:
I use Moto Xoom (Android V3.0 touch pad) browse the example "OpenLayers with Sencha Touch", when I click button "LayerList", the associated popup panel doesn't show up smoothly. it will show once, then very quickly show up again. I tested other buttons, for example "Search" button and popup "search" panel, same issue happens.

It seems that it's something related to OpenLayers. Because another example "OpenLayers with JQuery Mobile" also has this.

I am wondering whether someone could give me some hints about what's happening underlying this issue?

appreciate any replies!


texts:
How is it possible to search feature in QGIS?

I have lots of points with ID. Is it possible to search points using ID?

Update: I'm looking for a solution that centres the map to that point.


texts: Integrate QGIS Server with existing Wordpress installation

texts:
How can I integrate QGIS Server with an existing worpdress installation?

I have tried but cannot get capabilities to appear. Maybe something to do with Htaccess or httpd.conf but I cannot understand...


texts: Adding image to the QGIS print composer (path in layer as attribute)

texts:
My layer "users_print_view" contains image path. I would like to display this as image in print composer.
I can copy path and "Adds a new picture to the layout" and paste it but I would like it to be automatic. Can I there use Variable? Choose there like layer and column? Or maybe other way... Do you have some ideas?


texts: Adding QGIS-specific Python interpreter to PyCharm on MacOS?

texts:
I have seen the below question, and searched around the internet for a tutorial for instructions on getting Pycharm CE to recognise the QGIS package. I have found which interpreter that QGIS is using, and I can import QGIS in terminal, but Pycharm doesn't recognise it.

Adding QGIS-specific Python interpreter to PyCharm on Windows?

Are there any tutorials or specific instructions to get Pycharm and QGIS working together on MacOS?


texts: Where are the oil platforms in Google Earth?

texts:
From Wikipedia I found the coordinates of the Devil's Tower, which is an oil platform in the Gulf of Mexico. The coordinates are 28°12′32″N, 88°44′15″W.

When I enter these coordinates into Google Earth, I see just the empty ocean, no gas platform.

I tried to do the same with some other oil platforms, such as Statfjord at 61°15′20″N, 1°51′14″E, and again I see nothing.

What is the reason for this? Is it just that the satellite images acquired of the oceans are low resolution?


texts:
I cannot open the r.viewshed tool in Grass 7.0.3. I am using the 64-bit version on Windows 7. The error message is given below:

    Traceback (most recent call last):
  File "C:\OSGEO4~1\apps\grass\grass-7.0.3\gui\wxpython\lmgr
\frame.py", line 776, in OnMenuCmd

GUI(parent=self, giface=self._giface).ParseCommand(cmd)
  File "C:\OSGEO4~1\apps\grass\grass-7.0.3\gui\wxpython\gui_
core\forms.py", line 2354, in ParseCommand

raise gcmd.GException(e.value)
core.gcmd
.
GException
:
Unable to fetch interface description for command
'r.viewshed'.
Details: C:\OSGEO4~1\bin\python.exe: can't open file
'r.viewshed': [Errno 2] No such file or directory


texts: Which tools and methods can be used to create isochrones?

texts:
I'd like to get an idea for what's involved in creating isochrones for a series of sites, with a reasonable degree of accuracy to the estimates.  A general outline would be great, though my scenario would be for sites in London as I guess the problem varies with availability of data.

I'm looking at travel time modelling for specific sites using transport network vectors and nodes.  Data currently available are the OS Master Map Integrated Transport Network (ITN), National Public Transport Data Repository (NPTDR) which contains a snapshot of public transport timetables in "ATCO-CIF format (including its accepted variants) or in TransXChange TXC v2.1 format" (inc. bus stops), also most of the OS datasets.  Tools to hand are MapInfo 10.5, Manifold 8, SQL server 08, an open source stack (Postgres/PostGIS/QGIS etc.).  Trying to get a handle on the scale and complexity of the task, possible approaches and requirements.  It looks big, complex and demanding, but on the other hand must be a common application of GIS technologies.


texts: Calculating field length in certain directions (raster)?

texts:
Currently I'm working on winderosion. For my purpose I like to calculate the length of agricultural fields in certain wind direction. I would like to do it for raster.

To be more precise, I have agricultural areas as SHP and can convert them to raster. After it I'll calculate the distance of one boarder of the area to another in a certain direction (for instance 270° West). At the end I'll weight the different rasters (with field length in different directions) to get a mean feld length.

So my idea was to designate those cells within the area "1", those outside "0" and use the raster calculator to start calculating with the first "1" and add 20 (m = the resolution of one cell). The next cell should take the value of the previous one plus 20 and so on until it reaches "0" again.

This is just the idea but I have no idea how to do it in the raster calculator of ArcGIS/QGIS/SAGA and use a certain direction for calculating.

Do you have any proposals for me?

I also thought about neighborhood or zonal statistics.


texts:
I want to use this WFS
url: http://ccff02.minfin.fgov.be/geoservices/arcgis/services/WMS/Cadastral_Layers/MapServer/WFSServer?

I can use it without any problems in QGIS. I do not succeed to use it in ArcMap 10.4.

Coordinate system of my dataframe in ArcMap: Belge_Lambert_1972
WKID: 31370 Authority: EPSG

I want to use this feature type: Cadastral_parcel. I know that this WFS prefers the use of WKID: 3812 or WKID: 4326

Is it possible to limit the download to a bbox in WKID: 31370?


texts: Can ArcGIS handle missing values to create a contour map?

texts: I am trying to create a contour map for a waterbody. It turns out that in several locations there is no data. I just don't want to use the missing values as zero in ArcGIS because it would create several other contours by interpolating actual value and the zero value. Can someone suggest to me any good way of handling N/A or no values in ArcGIS to create contour maps?


texts: Placing map grid in appropriate order in ArcMap?

texts:
I am creating a map, in which I have the map grid (thin grey lines crossing the entire map) and feature labels (converted to annotation stored in map). In some places, the map grid intersects the labels and reduces their readability. Instead of moving the labels, I want to change the order of the map grid so that it is below all the labels. At the same time, however, it should overlie all the shapefiles. I tried to convert the grid to graphics, but it didn't help because I was only able to place it either completely above or below the any other map content.

Is there a way how to deal with this issue in ArcMap 10.3?


texts:
I am trying to convert a raster object to a polygon object using R but I am running into some problems using my Windows 7 machine.

I originally tried to use rasterToPolygons (package: raster) but it kept crashing my computer so I opted to use the R port of gdal_polygonize with directions found here

However, I cannot get this to work because I receive the error message:

ImportError: No module named site
Error in ogrInfo(dsn = dsn, layer = layer, encoding = encoding, use_iconv = use_iconv) :
  Cannot open file
In addition: Warning message:
running command '"python" "C:/OSGeo4W64" "C:\Users\RDCERWAW\AppData\Local\Temp\1\RtmpGgkaqN\file1ddc84b56b5.asc" -f "ESRI Shapefile" "C:\Users\RDCERWAW\AppData\Local\Temp\1\RtmpGgkaqN\file1ddcbde726a.shp"' had status 1

The problem seems to be with the system2() call. When I try to use it to call Python, I get the error

ImportError: No module named site
Warning message:
running command '"python" print hello' had status 1

(The above is probably incorrect, but I can't find out how to test the call to python using R)

Gdal is installed at C:/OSGeo4W64 and the Path to both gdal_polygonize and Python are in my PATH. I can run gdal_polygonize from the console by typing

gdal_polygonize C:\GIS\temp.tif if 'ESRI Shapefile' C:\GIS\temp.shp

I ran the gdal_polygonizeR() function line by line and found out there were two problems. First, the raster that I was using as input had been created by cropping another raster and so the data source was a temporary file that no longer existed.

Secondly, the call to the directory for python (C:\OSGeo4W64\bin) was not able to import gdal, so I had to install gdal separately from the OSGeo4W installation (not sure why) and then I was able to import gdal from within OSGeo4W.


texts: Updating polygon geometry: deleting inner rings with python

texts:
I've searched, but can't find clear explanations how can I simply delete inner rings from existing polygons with python or extract outter rings and overwrite the geometry. Seems GDAL/OGR should be the simplest, but still I need some help...

Simple vision of mine would be:

dataSrc=driver.Open(shp)
layer=dataSrc.GetLayer()
for i in xrange(layer.GetFeatureCount()):
    feature = layer.GetFeature(i)
    geometry = feature.GetGeometryRef()
    if geometry.GetArea()<200:
        layer.DeleteFeature(i)
    if geometry.GetGeometryCount()>1:
        geometry=geometry.GetGeometryRef(0) #overwrite geom, getting the first ring outer
        feature.SetGeometry(geometry)
        layer.SetFeature(feature)

geometry.Destroy()

This doesn't loop through, it's just how I would like to see.

As I know the first ring or the first part of the geometry should be the outer ring, so I assumed I can just ask for it like that.Suppose that's not a problem.

So, probably the question is just about Updating Geometry. I open dataset withouth specific- Reading or Writing, so I assume it should let me write in it not just read. But if I do not want to have a new dataset, can I just update write like that or i should anywhays better create a new dataset?

Or maybe there is even more simple way to solve this with python?


texts: OpenLayers 3 - Google Maps switch, problem with style

texts:
I use ol3-google-maps and when I switch layer from standard OSM to Google then styles are broken. I have defined styles but Google use self for example: points in OSM are yellow but when is google-map point shows like Google marker.

Google layers:

var GM = new olgm.layer.Google({
         mapTypeId: 'hybrid',
         title: 'Google',
         type: 'base'
    });

var olGM = new olgm.OLGoogleMaps({map: map,mapIconOptions: {useCanvas: true }});
    olGM.activate();
    manager['main_google'].setVisible(false);

Style:

function pointStyleFunction(feature) {
return new ol.style.Style({
    fill: new ol.style.Fill({
    color: 'rgba(255, 255, 255, 0.2)'
    }),
    stroke: new ol.style.Stroke({
    color: '#ffcc33',
    width: 2
    }),
    image: new ol.style.Circle({
        radius: 7,
        fill: new ol.style.Fill({
        color: '#ffcc33'
        })
    }),
    text: createTextStyle(feature)
  });
}

Layers of features:

var layer_ambon = new ol.layer.Vector({
                source: new ol.source.Vector({ features: new ol.Collection((new ol.format.GeoJSON()).readFeatures(map_info['layers'][3])) })
            });

Standard OL map:

map = new ol.Map({
        interactions: olgm.interaction.defaults(),
        target: olMapDiv,
        layers: [
          OSM,
          GM,
        ],
        controls: ol.control.defaults().extend([
            new ol.control.ScaleLine()
        ]),
        view: view
    });


texts: Seeking online resources for creating shp files performing basic GI functionality

texts: I am looking to build polygons, based on files containing a grid of points.  The representation of the polygon would be an aggregation of the points. As the end wares are Esri, I was wondering if there were online resources for performing this type of object creation; creating shape files based on this?


texts: Leaflet zoom out does not respect zoomDelta all the time

texts:
I have a leaflet map (version 1.6.0)  with zoom control.  It works correctly most of the time, but what I noticed is that on zoom out the zoom delta is NOT always consistent.  To clarify, this happens using the zoom control buttons.  Tested using recent versions of Chrome and Firefox.  Happens on both.
So I zoom out at 10.5, it goes to 10.25, zoom out again it goes to 10... then sometimes when I zoom out again, the map zooms out to 9.75 for a second, then goes to 9.  This only seems to happen when I zoom out on an integer zoom level.  This also happens intermittently and never happens on zoom in.
Zoom scroll wheel seems to work fine.
Map settings below:
 var Tempmap = L.map('Temap', {

   //  preferCanvas: true,  //for leaflet image plugin
     measureControl:true,
     zoomSnap: 0.25,
     zoomControl:true, maxZoom:45, minZoom:1,
     center: ([44.35, -123.051]),
     zoomDelta: 0.25,
     zoom: 10.5,
 })

I have tried 1.7dev with the same results.
I also have noticed that if I Pan with a current zoom level at a non-integer.  The map pans correctly then zooms out to the next lower integer.
Some more background:
I have 8 map objects on a web page,  they are shown one at a time with user tab click.  All maps have the same issue with zoom out(it does happen on a zoom in but much much less frequently than zoom out).
I have been further inspecting and trying out different zoomDelta and zoomSnap values to not avail.
If I test with a single map only, I can NOT reproduce the zoom out problem (it works).
I notice that when this problem happens, the div class leaflet-map-pane style=transform translate3d and leaflet-zoom-animated style = transform translate3d get called twice.  The first time, the URL shows # as 10.75 for a second then goes to 10 on the second call.  or 9.75 then 9.

After more testing this is what I have noticed:

The URL Zoom and Lat /Long values change as I pan and zoom on a map.  When I switch tabs to another map the URL Zoom and Lat/Long values change as I pan and zoom (this seems correct to me).  However I have the zoom problem described above.

Trouble shooting with a limited version of the app,  I have three maps.  Here I notice that the URL Zoom and Position values change on the first map when I navigate.  However for the two other maps: I tab to them and zoom and pan, the URL Zoom and Lat/ Long values to not change and are the same as the last view of the first map. All these three maps respond to navigation and zoom in/out correctly but the URL does not change for two of them.

Hoping that maybe this provides more clues as to what is happening.


texts: Is it necessary to master openlayers to use geoserver?

texts:
Is it necessary to learn openlayers to use geoserver? Can i completely ignore OpenLayers so long as i master using geoserver to publish data on my website because i understand openlayers is contained in geoserver? I would like to set up a web GIS but i find learning openlayers or leaflet difficult.

I would like to create a web application that receives data from, say a mobile phone and combines it with data served through GeoServer from my PostGIS database


texts: Detecting degeneracy in triangulations that causes matplotlib to crash?

texts:
I built a plot over roads graph and am trying to interpolate the data in a raster, but some nodes cause triangulation error.

Earlier I noticed and fixed a problem when multiple points sticked in one place on a graph and this caused triangulation error. Now these duplicates are removed, but still some sets of points make it crash.

I did not manage to detect what in particular. When I order them by a coordinate and remove either half, the problem disappears.

I suspect some points be standing in one line close enough that the triangulator algorithm tries to build a triangle of them and crashes. But have not found them yet.

What is a way to find the set of points causing the error?

Here's the code, it comes from python-osrm package which copies it from this example in matplotlib:

import csv
import matplotlib
import itertools
import numpy as np
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from matplotlib.mlab import griddata

with open('/tmp/triangle.csv') as f:
    rd = csv.reader(f)
    matrix = [map(float, r) for r in rd]

x, y, z = zip(*matrix)

minx = np.nanmin(x)
miny = np.nanmin(y)
maxx = np.nanmax(x)
maxy = np.nanmax(y)

xi = np.linspace(minx, maxx, 400)
yi = np.linspace(miny, maxy, 400)
zi = griddata(x, y, z, xi, yi, interp='linear')

Here's the data: https://pastebin.com/TWz3vNbC


texts: Sum values depending from another field value with Python

texts:
I did a python script to do a query from the UF field from my attribute table. The code is very simple and works well. The output show me a map with the selected values.

Now I neeed to sum the values from another field (lets call this field "NEW") only from the selected features from UF field.

import arcpy

mxd = arcpy.mapping.MapDocument("CURRENT")

for lyr in arcpy.mapping.ListLayers(mxd):
    if lyr.name == "Brasil_Municipios":
        lyr.definitionQuery = "UF = 'GO'"
arcpy.RefreshActiveView()
arcpy.RefreshTOC()

I can get the SUM with Summary Tool, but how to print in the screen the result?

import arcpy

mxd = arcpy.mapping.MapDocument("CURRENT")
fc = 'G:\AgroBD.gdb\Brasil_Municipios'

for lyr in arcpy.mapping.ListLayers(mxd):
    if lyr.name == "Brasil_Municipios":
        lyr.definitionQuery = "UF = 'GO'"
        arcpy.Statistics_analysis("Brasil_Municipios",
 "G:\AgroBD.gdb\Brasil_Municipios2", [["media", "SUM"]], "")
arcpy.RefreshActiveView()
arcpy.RefreshTOC()


texts: QGIS plugin select and edit feature attribute

texts:
I'm looking for a QGIS plugin that can change attributes (attribute table) of features on a vector layer by selecting them with the mouse.

I found this plugin "SelectTools": https://plugins.qgis.org/plugins/SelectTools/
But I want select shapes and want to change the value of one field directly by selecting.

Does someone know if this exists?

If this does't exists is it possible to write this with a plugin?


texts: Select by Attributes based on SQL wildcard range

texts:
I want to select all the records from a geodatabase table where the string starts with a letter, so I tried

SELECT *
FROM tbl_names
WHERE "name" LIKE '[A-Z]%'

This returned no records. After some searching, I found that this is SQL Server syntax. I didn't think this would be a problem though, as far as I know all versions of SQL support %. After going through the help file on building a query expression, I saw that the correct syntax is

SELECT *
FROM tbl_names
WHERE "name" >= 'A'

As the names are all strings, my first instinct was to try LIKE. Why is the >= operator used instead of LIKE? Are wildcard ranges not supported in ArcMap?


texts: Label geojson polygons with Leaflet .bindtooltip


texts: Sort Grid binded to ArcDataBinding.TableWrapper in ArcObjects 10.1

texts:
I have a Datagridview which is binded to a ArcDataBinding.TableWrapper. So, I want it to be sorted when ColumnHeader is clicked. I tried to do the following on Click event:

ArcDataBinding.TableWrapper twapper = (ArcDataBinding.TableWrapper)((BindingSource)datagridview.DataSource).DataSource;
                ITableSort tsort = new TableSortClass();
                tsort.Table = (ITable)twapper.wrappedTable;
...
                string column_name = datagridview.Columns[e.ColumnIndex].Name;
                tsort.Fields = column_name;
                tsort.set_Ascending(column_name, false);
                tsort.set_CaseSensitive(column_name, true);
                tsort.Sort(null);
...
                ArcDataBinding.TableWrapper tableWrapper = new ArcDataBinding.TableWrapper((ITable)tsort);

                tableWrapper.UseCVDomains = true;
                BindingSource bindingSource1 = new BindingSource();
                bindingSource1.DataSource = tableWrapper;
                datagridview.DataSource = bindingSource1;

                datagridview.Refresh();

But it doesn't seem to have any effect. Does anyone knows what is the problem?


texts: Display map object from SQL database in MapInfo with read only access to the database

texts:
I can connect MapInfo to a SQL database using a select statement to display the contents of a table in the SQL database. However, the table is not mapable and I only have read access to the database therefore cannot make it mapable.
Is there any way I can display the data from the SQL database stored in a Geometry column in MapInfo?


texts: Get Lon / Lat of a top left corner for geometry in Google Earth Engine

texts:
I want to extract latitude and longitude of a top left corner of a bounding box (bbox) for my geometry (aoi).

How do I do it in Earth Engine (preferably using server-side methods)?

I guess, it could be solved with some way of using iterate() over coordinate List's, but I failed to construct a valid way to do it.

var aoi = ee.Geometry.Polygon(
        [[[103.6725886730469, 1.535723242616683],
          [103.5187800792969, 1.2117201436706377],
          [103.7494929699219, 1.1087444479525173],
          [104.1450007824219, 1.2309418499697466],
          [104.26173051875003, 1.5082671124456866]]]);

var bbox = aoi.bounds();


texts: Making a drop-down list for launching a model

texts:
Is that possible to make a model in which you can choose what certain model you are going to run?
For example I have a list of models like:

Roads intersections detector level-1
Roads intersections detector level-2
Roads intersections detector level-3

And I want to create a model with a drop-down list with values which are names of that models I have in my toolbox. When value is selected the model launches certain submodel.


texts: Batch buffer multiple points but with individual parameters?

texts:
I am trying to put multiple buffer rings around a series of points (fishnet label points). I want to do a batch of them as there are way too many to efficiently export each point and buffer each one individually, but when I do all the points together, the attribute table comes back with the three buffer rings (250 m, 500 m, 1000 m) listed as just one point, rather than having these three buffer distances for every point put into the buffer tool.

I am wondering if there is a way to obtain the individual buffers for each point, but still put them in together rather than individually?


texts: KML files to IPad securely? Altitude and shape problems in Google Earth

texts:
Does anyone know any options for maintaining privacy of the files and getting them onto iPad using Google Earth?

Using Google account to link to Google Earth, privacy settings in Google my maps are Public and Unlisted (still public if you know the URL), no security of files here.

Using MapBox, this requires use of TileMill and the privacy settings are the same public and unlisted (which are public if you guess the URL), support is very limited for KML/KMZ this way in any case.

Using DropBox a cloud based option as is Sugar Sync, this is password protected and files open in Google Earth, how ever there is a problem with polygon/shape data when clicked on does not display the info bubble.

Does anyone know how I would get them onto the iPad securely?

And does anyone know whether there is a work around for the shape/polygon data displaying in google earth on iOS? what would happen if I changed the Altitude mode??


texts: Creating polygon and adding it as new layer with PyQGIS

texts:
I'm attempting to add a polygon to a new layer using PyQGIS in QGIS 3.14.  Adapting some examples from questions and answers here and here. I believe I have successfully created the polygon from an array of (four) input points and then a feature that contains the polygon.
I have then created a layer for the feature in the CRS I desire but cannot work how to get the feature into the layer. Code so far below.
# Attach modules
from qgis.core import *                        # attach main QGIS library
from qgis.utils import *                       # attach main python library
import os                                      # attach operating system library

# Create an array [] object with the polygon vertices
vrtcs = []
vrtcs.append(QgsPointXY(396100,8969000))
vrtcs.append(QgsPointXY(396100,8973900))
vrtcs.append(QgsPointXY(397900,8973900))
vrtcs.append(QgsPointXY(397900,8969000))

# Create a polygon from the coordinates
ply_01 = QgsGeometry.fromPolygonXY([vrtcs])

# Create a feature object then put the polygon into the feature
ftr = QgsFeature()
ftr.setGeometry(ply_01)
print(ftr.geometry())

# Create a layer for the feature, in the desired CRS
lyr = QgsVectorLayer('Polygon?crs=epsg:29194', '200905_Bdy',"org")
Prj.addMapLayers([lyr])

# Set an object for the data provider for the layer
prv = lyr.dataProvider()

# Add the feature to the layer using this provider (fails)
prv.addFeatures([ftr])


texts: Data marker symbol for WebApp ArcGIS widget

texts:
I am building a web application using Web AppBuilder from ArcGIS where I want user to be able to select the marker type as they try to import CSV.

A popup which allows them to select a symbol and if possible size and color of the symbol then plot the points on the map.

Is there any widget for that? If yes, then what is the link to download it?


texts: Importing x y coordinates from spreadsheet in ArcGIS

texts:
I converted degree, min, sec to decimal coordinates.

I made a simple spreadsheet with X and Y columns and one set of coordinates: x= -73.533678 and y = 41.05523

I added the data (File, add data, add x,y data) and it always plots to 0,0.  I'm in the projection of the base map.  What am I doing wrong???im


texts: Is latitude valid as covariate for spatial interpolations?

texts:
I have information of minimum and maximum mean monthly temperatures Tmin and Tmax, respectively), from more than 300 weather gauges and now I require to create interpolated surfaces of temperatures using cokriging or similar.

These weather gauges are located within a wide elevation gradient, in a wide geographic area (much of South America).

When I compare the observed temperatures (Tmin and Tmax from gauges) against the respective elevations (the one obtained from GMTED2010, as the elevation of a given pixel corresponding the geographic coordinates of a given gauge), I find that correlation is high and significant as expected. However, in the case of Tmin, I find an even stronger correlation with latitude.

Now, I plan to create the required surfaces of interpolated temperatures through a formula that defines the Tmin (dependent variable) as a linear model of independent variables: Tmin ~ elevation + latitude.

Does it make any sense?


texts:
Previously, we were using a private ISP to run our web site. They were using LINUX. We could use js.gz files to serve interactive maps.
Now, we have our own server with Windows 8 OS.
How we can serve js.gz files in this system to serve interactive maps?
Are there any other compressing system to serve maps with Windows 8 OS?


texts: Percentage of feature area covered by features of other layer in QGIS

texts:
I'm working with QGIS 3.16 Hannover under MacOS 10.13 environment. I've got two polygon layers A and B with multiple features in each. I want to calculate, for each feature in layer A, the percentage of its area that is actually covered by any feature of layer B. I have built in the field calculator of layer A the following code, that seems to work in some cases, but definitely doesn't in others
(area(intersection($geometry, collect_geometries(overlay_intersects('B', $geometry)))))*100/area($geometry)

Any idea of what's wrong?


texts: Processing toolbox not working in QGIS 3.4.13

texts:
The processing toolbox stopped working in the previous QGIS 3 ltr version I had installed. Now installed 3.4.13 but processing toolbox still not working. I've tried changing the GRASS path without success but none of the processing providers algorithms work - SAGA, etc. I have seen that 3.4 version has some issue with GRASS and so tried to use the Osgeo installer. With this a message displays stating that the GRASS module path is wrong.

I have checked and it seems to be correct.

I have tried looking at the configurations in the settings/advanced tab as the screen print but not really sure what I am looking for here.

I really don't know what else to do. I've installed/reinstalled using both the network installer and standalone installer many times.

QGIS also crashes with the following message

If I add a modified bat file do I need to do anything else?


texts: Can't determine what parameters to pass to a OSM2PO SOAP call

texts:
I've been experimenting with OSM2PO which is a great little peace of software.  Right now though, I'm fumbling with the SOAP WS which I'm trying to use from a JEE web application.  I'm not having any trouble to setup the call to the webservice and can call upon one of the two webmethods described in the WSDL : findClosestVertexId() and findRoute().  Finding a close-by vertex ID from coordinates is no trouble at all but calling findRoute() is somewhat puzzling me as it takes four parameters : the two start and end points of the route and - RouterID (integer) and parameters (String).  My question is : what do I put in those last two?  I'm asking because actually I'm not getting anything from findRoute().  I've been trying something like
findRoute(myStartVertexID,myEndVertexId,1,"") but the List<RoutingResultSegment> I get is desperatly empty (getLength() returns 0!).  I'm guessing this is because I'm misusing the findRoute() method and not putting proper parameters in the method call.

Anybody experiencing the same problem?


texts: I have been using NDVIs with limited success to identify trees in the central Great Plains region of the USA.  The problem I have been encountering is that reflectance from farm fields/pastures have essentially the same spectral signature as the trees I am identifying.  Is there a vegetation index which can be generated from 4-band NAIP imagery that can do a better job at isolating tree cover mixed throughout agricultural areas?  Perhaps a pre/post processing step may be most effective?


texts: Apply scale dependency to point layer for only certain records in QGIS?

texts:
At 3.8.2, I have a point layer representing cities and towns.  As I zoom in I need the symbols and labels of smaller towns to appear.  As I zoom out I need them to disappear.  At the same time, the larger city symbols need to display at all scales.

I have successfully set the scale dependency for the labels, via Layer Styling > Labels > Label Options, data-defined override.  The smaller town labels appear and disappear as the mapscale changes, according to mapscale values in the attribute table.  The large city labels are on at all scales.

However, I cannot find a way to set data-defined override scale dependency for the point symbols.  Right now all town and city symbols are on at all scales.  I have searched through Layer Styling > Symbology to set the visibility scale for each point without success.


texts: Counting frequency of unique value in a shapefile column in GEE

texts:
My shapefile has a column named 'crop'. I have identified unique values of different crops like wheat lentil etc. Now, my goal is to get the frequency of each unique crop in that column. Means I am trying to get number of times a particular crop's point is recorded. My code in GEE is given below:
var table = ee.FeatureCollection("users/GEOINFORMERS/TestAfghanistan_March2020_Comb");

var crop = table.aggregate_array('Crop'); //select one column from shapefile
var cropUniq = crop.distinct();           //select distict records
//var myList = ee.List(cropUniq);
print ('Unique Crops', cropUniq);                         // print unique items from that column

var getcount = function(string) {
  var i = cropUniq.get(0); i <= cropUniq.get(-1); i = i+1
  var crop = cropUniq.getInfo(i)
  var fil = table.filter(ee.Filter.eq('Crop', crop))
  return fil.size()
};

//print('getinfo', cropUniq.getInfo())
var count =  cropUniq.map(getcount);
print ('Crop-wise Count',count);

Maybe I am doing a silly mistake in the function.


texts: parse geoJSON using bounding box and Openlayers 3

texts:
I have used Openlayers 3 to give me a bounding box extent and then make a WFS call to Geoserver using those extents and returning a geoJSON and it has worked perfectly, giving me the features within the bounding box from the complete dataset.

Now I have a geoJSON that already is a complete dataset and a local file and not coming back as WFS call. Is it possible to get select features from that geoJSON based off the OL3 bounding box function?


texts:
I have a Land Cover classification map that I created from 2m resolution multispectral imagery and I am trying to downsample the results to a 20m resolution class map.

The climate in question is arid so there are many areas with sparse shrubs or trees. As such, one 2m resolution class may have a couple of pixels for a single shrub. I am not interested in where each individual tree or bush is, but rather where there are areas of high concentration of a given class (i.e. I want to create a 20m resolution class map that will aggregate the high resolution classes into classes such as "sparse shrubs" or "dense shrubs" depending on the density of 2m x 2m shrub classes found in the 20m x 20m grid square)

Using r.mapcalc in GRASS GIS I know you can refer to neighboring cells using the format map[1,-2] and there are many useful functions available in r.mapcalc. However, my problem is that when I am downsampling to ~20m resolution from 2m resolution there are ~100 neighbors to analyze and I would have to address each one specifically as there is no way that I have found to nest a for loop within a call to r.mapcalc.

Does anyone have suggestions on a way to gather statistics of the cells surrounding a given map cell, and change the cell in question based on its neighbors in the way I describe?


texts: Determining if layer is WMS/WFS with PyQGIS?

texts: In QGIS with a python plugin, how can I determine if a layer is WMS, WFS or something else?


texts: how to use st_intersection() with re-projection in POSTGIS?

texts:
This is a shipping route from 'Portland to Busan' and I want to check the route against land_polygons like how much distance is traveled by a route through land. And the problem is while checking the land intersection it considers the route as passing through North America, Europe etc. when it is not passing through any land region in reality.

PostGIS version:

POSTGIS="2.1.7 r13414" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.10.1, released 2013/08/26" LIBXML="2.9.1" LIBJSON="UNKNOWN" TOPOLOGY RASTER


texts: How to make PHP (in MS4W Apache) setting for MSSQL

texts:
I am new for MSSQL. I wanted to make php setting for MSSQL. What i mean by that is to avoid following error while trying to establish connection using PHP and MSSQL
Fatal error: Call to undefined function mssql_connect()
. I thing i have to establish setting in php.ini but i am not able to do that. can any one please help me out how to do this PHP and MSSQL extension activated. I have uncommented the extension=php_pdo_mssql.dll in php.ini but did not worked. Please guide me to do so.


texts: Dissolving with PostGIS slow and results in large table?

texts:
I am having a table of polygons with  some 15 Mio. records. The polygons hold an attribute called "dn" with integer values between 0 and 6. My goal is to simplify that table so that polygons below a certain size get merged with neighboring ones. First step would be to merge dn=0 polygons of 100 square meters or below with neighboring polygons with dn=1.

The polygons are simple and angular shaped. Resulting from gdal_polygonize.py a raster representation of the data.

My naive attempt was to :

create table temp_union as  select 1 as dn, st_union(a_geom,b_geom) from
   (select geom as a_geom from big_poly_table where dn=1) as foo,
   (select geom as b_geom from big_poly_table where dn=0 AND st_area(geom)<=100) as bar
   WHERE st_touches(a_geom,b_geom);

This for testing purposes on a subset of some 200000 members.

Two problems I am running into:

The query runs some 3 hours on a very decent server. Speeding up is important.
The resulting table temp_union seems to get really huge as the respective table dump is  five times bigger than the original table.

Is this to be expected?

select postgis_full_version();
POSTGIS="2.0.3 r11128" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.10.1, released 2013/08/2
6" LIBXML="2.7.6" RASTER
(1 Zeile)

EDIT:
As pointed out in my comment to @MickyT his solution solved my problem. A minor change is referring to the attribute filter on the bigger polygons the smaller ones should be merged to. They have to hold an specific value for the atrribute "dn".

Another - for me - important finding is that the test on "connectedness" of the polygons should not be performed with "ST_Touches" but with "ST_Intersects" as this runs by an order of magnitude faster. In my case both yield the same results.

In this blogpost by Paul Ramsey on "Performance: Prepared Geometry",  "ST_Intersects" is in the list of PostGis functions that take advantage of that, "ST_Touches" is not in the list. So here the slightly revamped SQL script that is now in production use:

 SELECT ogc_fid, geom,
  (SELECT ogc_fid from w001001_1_1 l
   WHERE dn = 1 and
    ST_Intersects(s.geom, l.geom)
    ORDER  BY l.the_area DESC
    LIMIT 1 ) as d_id
into temp_dissolvelist
 FROM w001001_1_1 s
WHERE dn = 0 and the_area <= 100;


texts: I just updated to QGIS 3.16 (Hannover).  I open the Layout Manager (in the Project menu) and tried to Create an Empty Layout.  A dialog box opens up entitled "Create Print Layout", but the box is empty and nothing else happens.  In previous versions, the Layout window would open automatically.  I have no idea what do to.  Hoping someone can help.


texts:
I am planning to use the WMS and WFS Cascading functionalities of Geoserver in order to get some layers from other Geoserver instance. I understand, that using the Cascading requires of creating store/workspace in my Geoserver.

And I can see these (workspace/store/layer) created also in the geoserver/data directory.

I have a basic architecture question: Are these layers copied from the remote Geoserver to my data directory of my local geoserver? Or what I see is just a shortcut to the remote geoserver?


texts: No geometry when importing 3D building model GML into PostGIS

texts:
I'm attempting to import a GML file containing 3D building models into PostGIS using ogr2ogr.

ogr2ogr -f PostgreSQL PG:"host=${hostname} port=${port} dbname=${db} \
    user=${user} password=${password}" ${gml_fp} \
    -progress -overwrite -oo GML_ATTRIBUTES_TO_OGR_FIELDS=YES

but when I perform the import none of the building geometry is imported. Running ogrinfo gives the following result:

$ ogrinfo ./DA_WISE_GMLs/DA10_3D_Buildings_Merged.gml -GEOM=YES -al -so -oo GML_ATTRIBUTES_TO_OGR_FIELDS=YES
INFO: Open of `./DA_WISE_GMLs/DA10_3D_Buildings_Merged.gml'
      using driver `GML' successful.
Metadata:
  NAME=Bldg_10210047371

Layer name: Building
Geometry: None
Feature Count: 49847
Layer SRS WKT:
(unknown)
gml_id: String (0.0) NOT NULL
name: String (16.0)
BIN: Integer (0.0)
DOITT_ID: Integer (0.0)
SOURCE_ID: Integer64 (0.0)

My Postgres database has the PostGIS extensions installed, and I've tried setting the GML_ATTRIBUTES_TO_OGR_FIELDS parameter to yes. I've also tried importing the GML file into QGIS, but the layer properties show No geometry (WKB type: "NoGeometry").

The GML files I'm working with are too large to include here, but can be downloaded at NYC DOITT: https://www1.nyc.gov/site/doitt/initiatives/3d-building.page.

If it's relevant, the GML I downloaded came with the following files:

DeliveryArea.dbf
DeliveryArea.prj
DeliveryArea.sbn
DeliveryArea.sbx
DeliveryArea.shp
DeliveryArea.shp.xml
DeliveryArea.shx

Can these files be passed to ogr2ogr during the conversion process? If so, how?


texts: Oracle Spatial Returns Different Intersection Results with SRID Defined

texts:
I have a set of points and a set of polygons of which I am performing an intersection on to determine which polygon each point lies in. This was performed previously without the projection being defined in either the metadata table or within the geometry features themselves.

After defining the projections, different results are being returned than previously. Oddly enough, when displayed in SQLDeveloper and ArcGIS it is clear that the previous results were correct. When I drop the projection definition, I get the correct answer. I've tried with different projection definitions, all data is in the NAD 1983 geodetic coordinate system.

Oracle seems to be doing something more than checking that the projection definitions match. Anyone know what it could be doing?

Intersection was performed using:
sdo_geom.relate, SDO_TOUCH, etc. all returning the same result. Additionally, When I measure distance, the distances are reversed giving a distance of zero to the polygon it is not in.

I have tried:
- rebuilding the indexes
- Checking geometry for validity
- Changing the projection definitions

Below is the situation, given the point with a projection definition I get a value of 03 and 02 without. Obviously 02 is correct and 03 is not.

I am under the impression that no transformations are being performed during this operation and the values are natively in the same coordinate reference system.

Ideas?

Here is an example with no relation found:

SELECT sdo_geom.relate(
    t1.shape
    , 'determine',
    mdsys.SDO_GEOMETRY(
                    2001,
                    4269,
                    mdsys.SDO_point_type(-163.14667,56.17,NULL),
                    NULL,
                    NULL )
      ,0.005
                    )
 FROM
(
select
  MDSYS.SDO_GEOMETRY(
    2003
    ,4269
    ,NULL
    ,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1),
    MDSYS.SDO_ORDINATE_ARRAY(-162,56.1666999980807,-162,57,-164,57,-164,56.1666999980807,-162,56.1666999980807)
    ) shape
from dual) t1;

Same thing with SRID defined and relation found:

SELECT sdo_geom.relate(
    t1.shape
    , 'determine',
    mdsys.SDO_GEOMETRY(
                    2001, -- point data
                    null,
                    mdsys.SDO_point_type(-163.14667,56.17,NULL),
                    NULL,
                    NULL )
      ,0.005
                    )
 FROM
(
select
  MDSYS.SDO_GEOMETRY(
    2003
    ,null
    ,NULL
    ,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1),
    MDSYS.SDO_ORDINATE_ARRAY(-162,56.1666999980807,-162,57,-164,57,-164,56.1666999980807,-162,56.1666999980807)
    ) shape
from dual) t1;


texts: Reversing order of points in line using ArcGIS Desktop?

texts: How to invert the sequence of the points (vertices) of a line in ArcMap so the first point becomes the last and the last the first?


texts: BASEmesh plugin error while interpolation between quality and elevation mesh

texts:
I am creating a 2D hydronumeric model of a watershed. The quality meshing and elevation meshing are fine, but I am getting the following error during interpolation. Does anyone know what should I do?

An error has occurred while executing Python code:

TypeError: %d format: a number is required, not str
Traceback (most recent call last):
  File "C:/Users/Shuvom/.qgis2/python/plugins\BASEmesh\interpolation\interpolation_dialog.py", line 171, in accept
    iface.messageBar().pushMessage("Interpolation", "Nr points with special treatment: %d." % result, QgsMessageBar.INFO, 3)
TypeError: %d format: a number is required, not str

Python version: 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:25:58) [MSC v.1500 64 bit (AMD64)]
QGIS version: 2.18.28 Las Palmas, aa30730ac6

Python Path:
C:/PROGRA~1/QGIS 2.18/apps/qgis-ltr/./python/plugins\processing
C:/PROGRA~1/QGIS 2.18/apps/qgis-ltr/./python
C:/Users/Shuvom/.qgis2/python
C:/Users/Shuvom/.qgis2/python/plugins
C:/PROGRA~1/QGIS 2.18/apps/qgis-ltr/./python/plugins
C:\PROGRA~1\QGIS 2.18\bin\python27.zip
C:\PROGRA~1\QGIS 2.18\apps\Python27\DLLs
C:\PROGRA~1\QGIS 2.18\apps\Python27\lib
C:\PROGRA~1\QGIS 2.18\apps\Python27\lib\plat-win
C:\PROGRA~1\QGIS 2.18\apps\Python27\lib\lib-tk
C:\PROGRA~1\QGIS 2.18\bin
C:\Users\Shuvom\AppData\Roaming\Python\Python27\site-packages
C:\PROGRA~1\QGIS 2.18\apps\Python27
C:\PROGRA~1\QGIS 2.18\apps\Python27\lib\site-packages
C:\PROGRA~1\QGIS 2.18\apps\Python27\lib\site-packages\jinja2-2.7.2-py2.7.egg
C:\PROGRA~1\QGIS 2.18\apps\Python27\lib\site-packages\markupsafe-0.23-py2.7-win-amd64.egg
C:\PROGRA~1\QGIS 2.18\apps\Python27\lib\site-packages\win32
C:\PROGRA~1\QGIS 2.18\apps\Python27\lib\site-packages\win32\lib
C:\PROGRA~1\QGIS 2.18\apps\Python27\lib\site-packages\Pythonwin
C:\PROGRA~1\QGIS 2.18\apps\Python27\lib\site-packages\Shapely-1.2.18-py2.7-win-amd64.egg
C:\PROGRA~1\QGIS 2.18\apps\Python27\lib\site-packages\wx-2.8-msw-unicode
C:\PROGRA~1\QGIS 2.18\apps\Python27\lib\site-packages\xlrd-0.9.2-py2.7.egg
C:\PROGRA~1\QGIS 2.18\apps\Python27\lib\site-packages\xlwt-0.7.5-py2.7.egg
C:/Users/Shuvom/.qgis2//python
C:/Users/Shuvom/Desktop/Watershed


texts: Is there an event that fires when a custom dockable window is closed in ArcMap? My dockable window uses the Add-in pattern and hosts a WPF user control. It opens via a command button which is nested in an ArcGIS toolbar menu. I can listen to the OnUpdate() event of the command, however, this event will only fire when the menu is expanded. I need to know immediately when the window is closed so I can stop a background process.


texts: Creating a Canopy Height Model (CHM) image from a LAS file on Mac?

texts:
Main question: Is there a way of creating a Canopy Height Model from a LAS file using Mac (not wine etc)? I also would like to batch process a lot of LAS files the same way.

I should mention that I have tried PDAL with writers.gdal through docker where I managed to make a DTM and DSM. But then what? Is it possible to create a CHM with PDAL? I saw lidar2dems but I'm not sure it would work on Mac.

Maybe there are more alternatives than PDAL?


texts: QGIS Parallel Line spacing of different layers

texts: I am trying to draw parallel lines at a set spacing (say 50 ft apart) for multiple layers at a time. Is there a quick way to draw multiple lines in one go? example of what I would like to create below. Had to try and do it manually, which I would like to avoid.


texts: Symbolize thousands of polygons to identify similar geometries

texts:
I would like to categorize polygons with a similar enough geometry so such similarities can identified at a city-wide scale.
I'm trying to identify if street layout is a useful spatial characteristic for differentiating between neighbourhoods. I have polygonized a shapefile with road lines. Next, I tried symbolizing the resulting polygons based on area using a gradient ramp. Using an equal count mode with 21 classes this symbology does do a good job at 1:10000 scale to differentiate blocks with a widely road layout. However, blocks that are short and more squat are not differentiated much from blocks that are long and thin (that have a similar area). Also, this way of symbolizing is pretty much useless at a city-wide scale. It may require a different approach at 1:10000 vs 1:45000 to identify such differences, and I would like to do both, but for now I would settle for a solution for the neighbourhood level.

Some other questioners have been directed to use a script that employs a hausdorff distance for detecting similarities between polygons. While this may prove to be a useful method, I'm not sure how I would use this to compare numerous polygons to each other.
I'm in the early research stages of my studio class, so the solution doesn't need to be precise. I was thinking that perhaps I could add a bounding_length and bounding_width field to each polygon and populate it with the field calculator. Then, perhaps I could look at the data and identify some commonalities. Then, to another field (perhaps poly_similarity_id) I could classify polygons with a query such as the following psudocode "SELECT * WHERE bounding_length < 20 AND bounding_length > 25 AND bounding_height < 110 AND bounding_height > 100" that would set poly_similarity_id to 1. I could run another query to select polygons with a different length/height range that is common and set that to 2, etc, etc. Then I could symbolize based on these new categories.
I have used ArcGIS several times over the years and done a couple of classes on it, but I'm still a novice at best. I'd need to figure out how to do all the above again. I'm also new to QGIS. Before I do all that, would this method work? Would there be a better way to go about this?
I'm thinking that if I can get such a categorization of similar polygons, then I can remove all the other non-pattern-conforming ones. Then, coloring the clusters that fit a pattern black, those patterns would stand out at a city scale.


texts: Converting vertexed curve into true curve using ArcGIS Desktop?

texts: I'm looking for a method for reshaping parcel polygons in large-scale database. I am dealing with cadastral data as shown in the picture and I need to convert the vertexed curves to true curves to reduce the vertices number and improve the performance during the editing process. The polygons originated from CAD.


texts: Distance Calculation Output Does Not Identify Input Points?

texts:
I'm using ArcMap 10 to do distance calculations between a large set of points, using the point distance calculator.  The output table generated gives me distances correctly, but the output categories Near_FID and Input_FID are all the same

Here is what I'm doing:
I have a csv file with lat, long, FID, and a couple of other object identifiers.  I use "add data" in ArcMap, and pull in the csv.

From ArcToolbox I use "Make XY Event Layer" to generate a layer with all the observations or objects.  I then use the Point Distance calculator and set the new layer as both the "Input Features" and "Near Features."  It calculates distances for all points, correctly from what I can tell, but the "Input_FID" and "Near_FID" both take on the same single value repeated, and don't even match any of the FID numbers from the original layer.  As a result, I can't identify the paired points.

I am new to ArcGIS.


texts:
I have a problem with a actually simple task: I want to merge 12 Geotiffs in QGIS. With Raster => Miscellaneous => Merge there is always an error saying:

  xyz.tif does not exist in the file system, and is not recognised as a supported dataset name

All I did before with the Geotiffs was to change their projection with Raster => Projection => Transform


texts: ArcPy .replace Field Calculator - replace only standalone 0's with 111, not all instances of 0

texts:
I've searched on google intensively, must be missing something here: I only want to replace (in a string field) standalone zeros (len is 1 character), but the .replace function replaces all instances of 0.

How can I only replace a single character (meaning the value is simply 0).  If the value is say 10004 or 02223 or 12450, leave alone.


texts: I have a dynamicMapLayer with a layer definition set to filter out certain features, the problem is that the popup which is bound to this layer does not recognize the layer definition and will display information for features not drawn on the map.


texts:
We are using liquibase as evolutionary DB change management tool in our applications, it works great when we use it in "common" database schemas.

But we also work with GIS applications using esri arcSDE 9.3 platform over Oracle and in this case, all (or almost all) tables (both GIS and 'alphanumeric' tables) in the schema are managed (create table, grants, etc.) through arcSDE. So when we want to create new feature classe, now we use arcCatalog, and this way, it's not possible to manage the feature classes’ changes directly through SQL using liquibase or other automate refactoring tool.

So if we cannot use liquibase to manage changes, at least we want to execute the management operations over our features through command line.
We’ve started looking for tools that avoid the use of arcCatalog, and then try to automate the changes using scripts, we are investigating these possibilities:

Try to capture the SQL that arcCatalog/arcSDE  is executing each time we make a change in one Feature Class monitoring the oracle connection. It outcomes us a too complex set of SQL instructions that involves indexes, versioning tables, etc. so we give up this way.
Use the sdelayer and sdetable admin commands installed on arcSDE server.
Use the data management tool: a python based library to manage the feature classes, but it has to be executed from a machine with the desktop version installed.

These last two options will provide a way to manage features from command-line, but our target is to find/develop a tool to manage changes similar to the way liquibase do. But with these tools we will have to find a tool that let us map each SQL DDL operation to an arcSDE command, and currently no db refactoring tool provides this (currently we have check liquibase, dbdeploy, flyway).

Anybody had solved this problem of evolutionary change management with arcSDE? Any insight of another way to face this problem?


texts: Creating multiple lines under same label in legend of ArcGIS Desktop?

texts:
I have a shapefile consisting of a number of fields with values of an index score. I classified its symbology categorized and classified the values into 3 classes. The classes are like below-

I want to create multiple lines under same label symbol. Under the 1st label, there should be "Low Walkable Area" in one line and the range in parenthesis "(-102.12 - 17.92)" in 2nd line and same for the others. How can I do it?

I am using ArcGIS Desktop 10.3.1


texts: I have an RGB raster file and I need to get raster values. How can I extract raster values from this map? I need to reclassify raster according to the pixel value as "very high", "high", "medium", "low"?


texts: Exporting geodatabase feature class to shapefile changes the attribute table

texts:
I'm using ArcGIS 10.4.1

DATA

I have several layers. I combined all of them into one layer using union. I saved the result of union in geodatabase based on the suggestion by @GISGe.

You can download the data from this link.

METHOD

I wanted to convert the geodatabase feature class to shapefile.

I did this using Feature Class to Feature Class. It went well without any errors however I found the columns of the attribute table of the shapefile created after using Feature Class to Feature Class messy as shown below.

BEFORE using Feature Class to Feature Class

AFTER using Feature Class to Feature Class

Any suggestions how can I fix this problem?

UPDATE

In response to the comments

I have tried using right-click on the feature class in the geodatabase and export it to shapefile but it didn't work.
I have tried Copy Features but it gave me the same result.
I'm exporting the feature class to a different location not to the same geodatabase


texts: How to map band data from spatial/temporal filtered Landsat image pixels with individual geographic points?

texts:
I am trying to use Google Earth Engine to analyse Landsat 5 reflectance data at selected geographic points.  The goal is to filter images spatially (those that intersect the points) and temporally (images taken during summer and winter months over a 7 year time span).  Both spatial and temporal filters are working, but I am unable to get them to work together to enable extracting data from the pixels that intersect the points through space and time.
This seems to call for a map function:
• create an image collection filtered for the desired time periods
• map the collection to a function that steps through each of the geographic point features (there are 59 of them)
• create a "sub" image collection of images whose geometry includes the point (THIS is the step I have trouble with)
• save this sub-collection as a new property on the point feature
In short, I am trying to extract image data (acquisition date, band values, cloud factors, etc.) and match it with geographic data (sample point coordinates, vegetation characteristics, etc.).  Note that I am not trying to reduce band values.  I need the raw numbers for each of the pixels at each study point for each acquisition date.  Here is some annotated code that fails:
== Imports ==
// Landsat image source
var L5: ImageCollection "USGS Landsat 5 Surface Reflectance Tier 1"
// 59 geographic points, each with 4 columns of local vegetation data
var studyPoints: Table user/jgm/DOQ_pointsdata

== Code ==
// utility function to generate ndvi
function addNDVI(image) {
  var ndvi = image.normalizedDifference(['B4', 'B3']).rename('ndvi');
  return image.addBands([ndvi]);
}

// filter images that intersect points (working)
var L5_spatial = L5.filterBounds(studyPoints);  // L5_spatial: ImageCollection (spatial)

// temporal filter for images in desired months/years (working)
var L5_summer = L5_spatial                      // L5_summer: ImageCollection (spatial/temporal) with added ndvi band
    .filter(summerRanges_filter)                // summerRanges_filter: built from dates programmatically (it works)
    .map(addNDVI)

// map filtered images to each point in geometry (studyPoints)
var L5_summer_data = studyPoints.map(function(feature){ // L5_summer_data: FeatureCollection with point/image data
    var feature_geo = feature.geometry();               // get point geometry
    var feature_images = L5_summer.map(function(image){ // feature_images should contain all images that intersect feature coordinates
        var inbounds_image = image.filterBounds(feature_geo); // THIS LINE FAILS (How do I select only images that contain point [feature] geometry?)
        return inbounds_image;
    });
    feature.setMulti({                                  // store images that intersect point in feature (as feature_images property)
        'feature_images': feature_images
    });
    var feature_props = ee.Feature(feature);            // cast feature_props as feature (is this step necessary?)
    return feature_props;
});

// next step:
create table of study points with matching image band values for export.

Bottom line: How do I loop through an image collection, test for the pixels that intersect a point geometry, then save those images (and their band data) as a property of the point feature?


texts: How to query 1 feature of each category using QGIS (SQL like) expression language?

texts:
I use QGIS 3.2 to select features in a shapefile. Lets say I have shapefile which contain 100 features and have such fields:

Class with possible values A,B,C.
ID with possible integer values 0, 1, 2, 3, ... , 99.

How to select exactly one feature (no matter which one) in every class A,B,C?


texts: Creating polygons using offsets from other polygons

texts: Wondering if you I might get some advice on how to best create a polygon within a polygon based on an offset in ArcGIS. I have one layer that is a cadastral layer and another that is a building footprint layer (both polygons). The cadastral layer is plotted using coordinates but the building layer is based on offsets from the cadastral layer. What is the best way draw the building footprints in arcgis using an offset?


texts: cql_filter with strToUpperCase() fails with "Cannot do natural order without a primary key"

texts:
I'm trying to convert a query into uppercase in a GeoServer WFS request. According to the Filter Function reference this can be achieved using strToUpperCase().

This is working successfully on a sample GeoServer site where both of these queries return the expected result "STATE_NAME": "Illinois"

CQL_FILTER=STATE_NAME='Illinois'
CQL_FILTER=strToUpperCase(STATE_NAME)='ILLINOIS'

However, on my own GeoServer (version 2.10.2), an equivalent cql_filter (against a text field) works correctly without strToUpperCase:

http://apollo:8080/geoserver/loceng/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=loceng:rv_claims_lodgement_geo&CQL_FILTER=locality%3D%27Rozelle%27

... but fails with the following error when I include the strToUpperCase filter function:

http://apollo:8080/geoserver/loceng/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=loceng:rv_claims_lodgement_geo&CQL_FILTER=strToUpperCase(locality)%3D%27ROZELLE%27

<ServiceException>
   java.lang.RuntimeException: java.io.IOException java.io.IOException
   Cannot do natural order without a primary key, please add it or
   specify a manual sort over existing attributes
</ServiceException>

The layer's data source is a PostgreSQL table with the field defined as character varying, and there is an ascending index on that field.

Other layers in my local GeoServer, which are sourced from the same PostgreSQL instance, do not exhibit this error when I use strToUpperCase so the problem appears to be isolated to this layer/PostgreSQL table.

How can I debug this problem and allow the use of strToUpperCase on this dataset?


texts: PyQGIS: hide a layers-group by uncheking it in the legend

texts:
I have a group of layers that contain itself other groups (as shown in picture).

I need to hide one group by uncheking the checkbox in the legend.

is there any way to do it programatically using python?


texts:
I'd like to add a WMS layer through my QGIS plugin with custom CQL_FILTER parameters. My problem is, that the CQL_FILTER parameters are not passed to the GeoServer (I can see it in the GeoServer log at the GetMap query: "CQLFilter = null").

This is what I've tried:

registry = QgsMapLayerRegistry.instance()
urlWithParams = "cql_filter=BBOX(geom, 579465,125671,664692,167717)&crs=EPSG:23700&featureCount=10&format=image/png&layers=master&styles=&url=http://localhost:9090/geoserver/myWorkspace/wms"
rlayer = QgsRasterLayer (urlWithParams , "my_title", "wms")
registry.addMapLayer(rlayer)

The WMS layer is added to the map with no problem, but all the features are visible on the layer even outside the BBOX I defined in the parameters.
When I use the GeoServer's built-in CQL_FILTER builder (with the layer preview) the same filter works as desired.

Does anyone have a solution or a workaround for this?

I use QGIS 2.4.0-Chugiak.


texts: Is it possible to sort an arcpy.da.UpdateCursor()?

texts:
I have an ArcPy Data Access update cursor that I would like to sort before making updates to it.

The cursor makes updates if I don't sort, but if I add a sort to the cursor I get an error, "iteration not started."

The sort is working correctly but it must be busting the cursor for some reason.

Is it not possible to sort an update cursor like a search cursor? Does it change the type or something?

    idList = ['100100', '100200', '100300', '200100']
    count = 0
    with arcpy.da.UpdateCursor(newFC, ("SHAPE@X", "SHAPE@Y", "Label")) as addLabelCursor:
        for row in sorted(addLabelCursor, key=itemgetter(0), reverse = True):
            print idList[count]
            row[2] = str(idList[count])
            addLabelCursor.updateRow(row)
            count += 1


texts: How to create a line from more than two points?

texts:
I have a loop which calculates two points for each iteration (x3,y3) and (x4,y4). As seen in the code these two points are added for each iteration, which gives i-1 lines. Each line has a individual id.

What I want is to add all these points at the same time, so it makes one polyline with only one id. This is done by adding all the points in the line:

fet.setGeometry( QgsGeometry.fromMultiPolyline([[QgsPoint(x3,y3), QgsPoint(x4,y4)]]))

instead of only these two points at the time. But I can not figure out how to change the loop to make it work. I guess for each iteration, I have to save a string with QgsPoint(x3,y3), QgsPoint(x4,y4) for the given iteration and add the next two points as a string in the next iteration. But I can not see how?

for i in range(0,len(points)-1):
    coor1 = points[i]
    x1 = coor1[0]
    y1 = coor1[1]
    dist = 0
    coor2 = points[i+1]
    x2 = coor2[0]
    y2 = coor2[1]
    dn = ((x1-x2)**2 + (y1-y1)**2)**0.5
    x3 = x1 + dist*(y1-y2) / dn
    y3 = y1 - dist*(x1-x2) / dn
    x4 = x2 + dist*(y1-y2) / dn
    y4 = y2 - dist*(x1-x2) / dn

    fet.setGeometry( QgsGeometry.fromMultiPolyline([[QgsPoint(x3,y3), QgsPoint(x4,y4)]]))
    pr.addFeatures( [ fet ] )


texts: Getting black background after I merging two clipped Rasters in QGIS

texts:
So I clipped two rasters and tried to merge them but every time I merge them I'm getting a black rectangle background that I don't want. Tried clipping again with the shapefile but getting a black square background. I'm a newbie to QGIS(recently shifted from ArcGIS) and skimmed through the documentation once and don't know how to fix this. Here's some screenshot and the data I'm using:

https://drive.google.com/drive/folders/1TRnWRs4qCylupBmxNMdvkf1zlzu3QFfV?usp=sharing


texts:
I already browsed your FAQs, and could not come up with a good answer, I am trying to export shp files to kml to be placed on Google Earth.

On a previous version of QGIS it was as simple as right click and save-as.

When doing the same steps on QGIS 1.8 everything works fine until opened in GE.  My data is in northern Ontario, Canada, and it ends up being placed in the middle of the Arctic Ocean on GE.

Is there anything I am doing wrong, the  datas CRS is NAD-83 UTM zone 17N.  Could it be the projects CRS. is there a way to change a project CRS. On a previous version of QGIS I had no problems, but seem to be running into difficulties on 1.8.


texts: Multiplying rasters by rasters within PostGIS

texts:
I have a situation where I have to multiply sets of rasters by each other.
Currently I have subfolders of rasters on my machine and am looping through them and multiplying them with rasterio.
Is there a way to multiply rasters by each other within PostGIS?
Raterio converts rasters into numpy matrix so multiplication is possible but can PostGIS's representation of a raster be multiplied by another PostGIS raster representation?
Is ST_MapAlgebra the way to do this?
And would anyone have a simple example of such a process?


texts: How to show in a custom QGIS form the feature and/or geometry info?

texts:
I need to show point coordinates on the from dialog used to edit the attributes of a point..
I see that in the formOpen the dialog receives a layerId and a featureId, but no iface object, so how can get a provider to use the selectatId() and reach feature informations?

def formOpen(dialog,layerid,featureid):
...omissis...

(see here for a more detailed explanation of custom qgis forms)


texts:
I am working with spatial data in land management using Oracle. The daily task is to perform spatial analysis: defining the mutual disposition of land plots borders, territorial areas etc. The accuracy of coordinates of every border depends on its type and location (city, forest). For that reason determination of spatial relationships of objects is carried out with varying tolerance in different tasks.

This is what I am doing using Oracle:

perform initial filtering of data by an SDO_FILTER-operator,
determine the spatial relationship with the specified tolerance using SDO_GEOM.RELATE procedure, where tolerance is one of the prameters of SDO_GEOM.RELATE.

When I started to work with PostGIS I found out that there is no such parameter as tolerance in methods used for spatial analysis.

Could you tell me please how to realize scenario described above using PostGIS? Is there any possibility to set tolerance of methods?


texts: Generating .asc tiles that represent heights on a map

texts:
I'm new to QGIS and following the next tutorial (see link), as I'd like to 3D print landscapes. https://www.youtube.com/watch?v=i1QD0ukdUzU

I'm able to follow in making the grid, but then the tutor starts importing .asc files that are the heights of the map (grey shaded/ min 1.09). This is where I got stuck. How did he/she generate those?


texts:
I'm new to SQL Plus and I have a question. I've created several versions of a feature class located on a SDE database. I want to use ArcSDE Administration Commands found here but I'm getting an error message. After logging into SQL Plus here's what happens:

SQL> sdeversion -o describe -V SDE.DEFAULT -u ** -p **
SP2-0734: unknown command beginning "sdeversion..." - rest of line ignored.

As you can see I attempt to describe the Default version and get an error. Does anyone know how I can overcome that SP2-0734 error? I have Oracle 11.2 on my machine and my Oracle database is 10g. Thank you!


texts: Many GRASS add-ons do not work with QGIS?

texts:
I use GRASS 6.4.3 on windows 7 64 bit.
GRASS has been installed with QGIS 2.6.1.

I have added r.stream.* adds-on by SVN.
For each add-on, messages of installation were : OK.

But when I try the command :
r.stream.order (or r.stream.basin or etc.)
I got an error message :
unable to fetch interface description for command 'r.stream.order'.

When I try to use the .exe of the add-on, messages were : xxx.dll is missing;
xxx could be : libintl-8.dll or libconv-2.dll or libgrass_dbmiclient.6.4.3.dll ...

Have some ideas?

1) I install GRASS GIS 6.4.4.

2) I load r.stream.order via menu->parameter->list of extension->instal extensions from addons and the use of http://svn.osgeo.org/grass/grass-addons/grass6

3) I write the command 'r.stream.order'.

4) But infortunately, same message : unable to fetch interface description for command 'r.stream.order'.

When I try from QGIS interface : the addon seams running BUT no file is created.


texts: Shortest line network route between clusters of points and the cluster centroid

texts:
I have a point layer containing clusters of points (premises) that I have grouped using a clustering algorithm (the clusters each having their own unique ID which I have used to create convex hull polygon boundaries surrounding each group/cluster of points).
I have created another point layer containing the centroids of each of the cluster's polygon boundaries, and would like to use these centroid points to calculate the shortest line distance between each cluster's centroid and just their associated cluster points. I don't however, wish to calculate the distance between one cluster's centroid, and another cluster's points (i.e. the distance calculations need to be constrained within the polygon boundaries of each cluster).
I also need the distance to be the distance of the road network (which I have in the form of a line layer), rather than the straight line distance. Neither am I seeking to just find the closest premises to the cluster's centroid, I need to have the shortest road network distance for every point in the cluster, to the cluster's centroid. In addition, I would like to factor in the distance between the centroid/premises and the nearest point on the road network, where the centroid or premises is distant from the road network (i.e. in the case of a premises, there is a long private drive, or it is located down a dirt track). In such cases the straight line distance will suffice.
I can do this manually, selecting each cluster separately and running an algorithm, but there seems to be no way of restraining the calculations to each cluster if inputting all clusters as one layer. In other words the algorithm will just see one set of points (the premises) and another (the centroids), and compute the shortest distances between all of them across the entire road network, without stopping at the boundaries of each cluster.
Given I have over 60 clusters, I don't wish to split the clusters into 60 different layers and then run the algorithm 60 different times! Is there an easy way of batching this within QGIS 3.16.5? I'm currently using the QNEAT3 OD Matrix tools, but in the case of the example image, it just computes the distances between all clusters and their centroids, it doesn't look at the clusters in isolation.


texts: Convert raster to polygon based on cell value ranges using ArcGIS for Desktop?

texts:
I have a floating point-valued raster which I need to convert to polygon as follows

Put the cells with VALUE < 0.5 into (a small/the smallest number of) polygons

Cells in the range [0.5, 1] into polygons

and so on..

I looked at the Raster to Polygon tool, but there is no place to specify range values.
Is there a tool in ArcGIS Desktop/Toolbox for doing this?


texts: Clip raster using mask other raster using Python GDAL

texts:
I want to clip raster using for mask other raster and I have find this question and I try to follow this code:

import gdal
from gdalconst import GA_ReadOnly

data = gdal.Open('img_mask.tif', GA_ReadOnly)
geoTransform = data.GetGeoTransform()
minx = geoTransform[0]
maxy = geoTransform[3]
maxx = minx + geoTransform[1] * data.RasterXSize
miny = maxy + geoTransform[5] * data.RasterYSize
call('gdal_translate -projwin ' + ' '.join([str(x) for x in [minx, maxy, maxx, miny]]) + ' -of GTiff img_orig.tif img_out.tif', shell=True)

But that code doesn't working the output TIFF have some extent with original TIFF against the clip doesn't work. Any idea?


texts: Habitat connectivity analysis difference between Least-Cost and Resistant Kernel Modelling

texts:
I have run a MaxEnt model on habitat suitability and transformed this into a resistance surface. I have GPS locations that I am planning on taking a random subsample from to use as termini to run a connectivity analysis of the landscape. I want to identify functional connectivity and determine key areas of connectivity within the landscape.
I have done some reading and it appears that either Least- Cost Distance or Resistant Kernel modelling is most appropriate but I am struggling to choose between them because I am not sure on the key differences or what software is available, I  am hoping to work in ArcGIS Desktop.
What are the main differences between Least-Cost and Resistant-Kernel modelling, in which scenarios are they most appropriate and what programmes can be used to run them in ArcGIS Desktop?


texts: Adding multiple layers to Tilemill from a single sqlite DB

texts:
This is a repost of a question I had over at the MapBox support board. Since I wasn't having much luck over there, I'm hoping I would have better success here.

I'm having trouble adding more than a single layer from my sqlite/spatialite DB to my project.
I have already referred to the previous discussion on this topic HERE and I made sure that my layers all have unique #IDs, yet I'm still receiving an error when I try to add a layer. If I add the layer and use "Save" instead of "Save & Style" then I am able to bring the layer into my map document. However, as soon as I try to apply any styling to it will raise the error.

The error:
Sqlite Plugin: 'database idx_tl_2010_51_county10_Geometry is already in use' (C:\Users\User\Desktop\QGIS\Work Progress\Project_Regions.sqlite)
Full sql was: 'attach database 'C:\Users\User\Desktop\QGIS\Work Progress\Project_Regions.sqlite.index' as "idx_tl_2010_51_county10_Geometry"'


texts: Proj4js Projection anomaly between function vs string projection definition

texts:
We recently switched our definitions from the first to the second format, because OpenLayers threw exceptions on the first one.

The used definitions:
Old:

proj4.defs["EPSG:28992"] = "+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +towgs84=565.417,50.3319,465.552,-0.398957,0.343988,-1.8774,4.0725 +units=m +no_defs";

New:

proj4.defs("EPSG:28992", "+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000  +ellps=bessel  +towgs84=565.040,49.910,465.840,-0.40939,0.35971,-1.86849,4.0772 +units=m +no_defs")

Strange enough, the latter one does correctly transform points. Our points seem to be misaligned, and not by a specific offset, they seem to be just wrong positioned at all. We think this is due to the towgs84 property. Question now is,  how is the first format parsed/ handled differently than the secondly? What are the differences? (I am using the same code and newest version of proj4js in both occasions).


texts:
I started a QGis project with adding information layers from OpenStreetMap such as the streets and railways for a city. This data has WGS 84 CRS. After that, I made a shapefile with urbanized bodies of land using the OpenLayers plugin.

Problem: I want to calculate the areas for the shapes I made. When I use Open Field Calculator or Export/add Geometry columns the values I get are like this "0.0000099" which doesn't seem right.

Any idea how I can solve this?

My version (which didn't work): I added some data with Stereo 70 CRS which did overlap due to Enabled on the fly CRS. However when I tried to convert my WGS 84 data to stereo 70, my shapes got moved away and the calculated areas are still with "0.0000099".

So is there any workaround for such a problem or do I have to import my areas into AutoCad, scale them can calculate manually?


texts: ArcGIS js API create map layer from shapefile?

texts: I have a couple of shapefiles that i'd like to display in a map that i've created with the ArcGIS js API. I tried creating a service from ArcGIS server but ran into "ArcGIS cannot access the data file." Is there any other way i can create a layer from a shapefile?


texts: How to install gdal_merge to run with osgeo?

texts: I recently installed OSGEO (http://download.osgeo.org/) which included python and gdal. I just realised however that there are many gdal libraries that were not included in this package for example gdal_merge. How can I install them into the osgeo environment?


texts: How to compile QtDesigner user interface (.ui) and resource (.qrc) files with QGIS 3 on Windows?

texts:
I tried to transpose the QGIS 2 process with no success.

I first had to edit C:\Program Files\QGIS 2.99\etc\ini\python-core.bat which contains references to Python27 instead of Python36.

I run C:\Program Files\QGIS 2.99\bin\o4w_env.bat to properly configure QGIS python environment, but then, when I launch :

"C:\Program Files\QGIS 2.99\apps\Python36\Scripts\pyuic5.bat" -o dockwidget_base.py dockwidget_base.ui

I get this error :

Traceback (most recent call last):
  File "C:\PROGRA~1\QGIS2~1.99\apps\Python36\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\PROGRA~1\QGIS2~1.99\apps\Python36\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\PROGRA~1\QGIS2~1.99\apps\Python36\lib\site-packages\PyQt5\uic\pyuic.py", line 26, in <module>
    from PyQt5 import QtCore
ImportError: DLL load failed: Specified module could not be found.

Similarly, when I launch :

"C:\Program Files\QGIS 2.99\apps\Python36\Scripts\pyrcc5.bat" -o resources_rc.py resources.qrc

I get this error :

Traceback (most recent call last):
  File "C:\PROGRA~1\QGIS2~1.99\apps\Python36\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\PROGRA~1\QGIS2~1.99\apps\Python36\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\PROGRA~1\QGIS2~1.99\apps\Python36\lib\site-packages\PyQt5\pyrcc_main.py", line 21, in <module>
    from PyQt5.QtCore import PYQT_VERSION_STR, QDir, QFile
ImportError: DLL load failed: Specified module could not be found.


texts:
I am trying to load this https://mrdata.usgs.gov/services/ardf?request=GetCapabilities&service=WMS&version=1.3.0&  WMS in OpenLayers3. However, it has two layers (layer within layer e.g. layers 1 and 2  on the picture).

How do I get the layer to be displayed in my Browser? What do I write under "LAYERS" so that I can display both of the layers 1 and 2 on picture.

var GEBCO_NORTH_POLAR_VIEW = new ol.layer.Tile({
                            source: new ol.source.TileWMS(({
                              url: "https://mrdata.usgs.gov/services/ardf?",
                              attributions: '<a href="http://USGS',
                              params: {
                                "LAYERS": "ardf-high",
                                "TILED": "true",
                                "VERSION": "1.1.0"},
                            })),
                            //crossOrigin: 'anonymous',
                            title: "GEBCO Grid North Polar View",
                            opacity: 1.000000,
                           });


texts: Adding representation rule by object's attribute value in ArcPy

texts:
I want to add a representation rule for each object in a FeatureClass with ArcPy.
I have 3 rules (B, F, T) as seen in the picture below:

I know there is a command for it
representation = "Chris_Rep"
representation_rule = "F"
arcpy.CalculateRepresentationRule_cartography(in_features, representation, representation_rule)

But how can I classify the objects at the in_features attribute?
Like, if the ID of the object is less than 3, it will get "B",
and if the ID is greater than 8, it will get "T",
else it will get "F".


texts: Difficulty with python package mgrs by Howard Butler

texts: I am developing an app in python and I am trying to import Howard Butler's mgrs package.  I am using setuptools to install the package.  It does not find the setuptools library module.  I have tried modifying the setup.py that comes with the mgrs 1.3.1 package to import library from setuptools.extension with no luck.  As a result, i cannot get the libmgrs.dll created.  Does anyone have an idea about what I can do to make this work?