texts:
I'm having some issues integrating these technologies:

Hibernate Spatial 4.0-M1
PostGIS 2.0.2 (with compiled JDBC 2.0.2)
Hibernate 4.1.1

The specific error is:

Caused by: org.postgresql.util.PSQLException: Can't infer the SQL type to use for an instance of org.postgis.PGgeometry. Use setObject() with an explicit Types value to specify the type to use.

The entity annotation is:

@NotNull
@Column(columnDefinition="Geometry")
@Type(type="org.hibernate.spatial.GeometryType")
private Point geom;

And the Point creation example is:

Location location = new Location();
WKTReader fromText = new WKTReader();
Point geom = null;
try {
    geom = (Point) fromText.read("POINT(-56.2564083434446 -34.8982159791812)");
} catch (ParseException e) {
    throw new RuntimeException("Not a WKT string:" + "SRID=4326;POINT(-56.2564083434446 -34.8982159791812)");
}
if (!geom.getGeometryType().equals("Point")) {
    throw new RuntimeException("Geometry must be a point. Got a " + geom.getGeometryType());
}
location.setGeom(geom);
locationDAO.insert(location);


texts:
I have different raster layers, but it is not a mosaic. I want to extract all pixel values, mean and standard deviation for each raster. But I prepared my scrip in r, and I import each raster and extract information one by one raster information. When I want to read in other efficient for, for example use stack, but show this problem

> raster <- stack('C:/Users/Dinosca/Documents/Proyectos GRASS/Camp_500')
Error in .local(.Object, ...) :

Error in .rasterObjectFromFile(x, objecttype = "RasterBrick", ...) :
Cannot create a RasterLayer object from this file.

Sorry, I have never worked with r and raster information before.


texts: Send signal when attributes modified - QGIS 2.6

texts:
For a QGIS 2.6 python plugin, I am trying to send a signal when an attribute value is changed (values for an existing feature are updated or added and the attribute form dialog is accepted). This signal should then connect to another function. Note, that the feature is not being added (it already existed, and attributes are being modified after identifying a feature while in edit mode). This is why the featureAdded signal doesn't work.

So far, i've tried using attributeValueChanged, editCommandEnded and layerModified signals from the vector layer class  in this way with no success.

def myFunction(self):
    self.myLayer.attributeValueChanged.connect(self.myOtherFunction)

def myOtherFunction(self):
    self.myLayer.dostuff
    self.dlg.show()


texts: Porting existing MSSQL database to ArcSDE

texts:
I have an existing MSSQL2008R2 database with views each containing a single geometry field along with a big number of "attributes".

I would like to be able to do INSERTS, UPDATES, and DELETES on these views in an ESRI environment. As viewing the data is not enough, I suspect that the new methods for adding MSSQL-stored datasets to ArcMAP is not enough (they only read data as far as I can see).

I am imagining something like adding supporting tables for ArcSDE.

Is that possible and, if so, how could I do that?

I have read that ESRI have reduced the number of metadata tables in the new ArcSDE, so I hope that I will somehow be able to add those - either using SDE or by hand - to my existing model, as the primary (non-ESRI) software still needs to operate on the same database.


texts: Looping through an ee.List() object rather than manually making a list

texts:
I am trying to loop over a list of dates that I am pulling from a column in a feature collection which causes errors.  If I define the exact same dates in a list by hand, the function seems to work.

Can anyone provide insight into why one works and why another does not?

The EE link is here, https://code.earthengine.google.com/e58b4bb03fc1060e1f359a8a28a402d6.

and the code is here,

var pts = "users/spotter/combustion_scaling/original/modis/with_date"

//get a vector of all the unique dates in pts
var all_dates = pts.distinct(["Date"]).aggregate_array("Date");
print(all_dates.type);

//----------this part does not work
var feat_iteration = ee.FeatureCollection(all_dates.map(function(date){
  print(date);
  return(date)
}));

//----this part works
// var manual_dates = ['2001-07-01', '2006-01-01']
// var feat_iteration = manual_dates.map(function(date){
//   print(date);
// });


texts: GeoServer WMS request performance: Layer Group vs Layer List

texts:
Let's say there are few transparent raster layers A, B, C...

I would imagine that it is better (performance wise) a) to have these layers marked as non-cacheable then create a layer group from them and cache it than b) having each layer cached and making WMS requests where list of layers is provided as LAYERS parameter, e.g., http://....&LAYERS=A,B,C....&STYLEs...


texts: Qgis crash when I attempt to open ECW raster format.

texts:
I added Ubuntugis unstable repo and installed Qgis, libgdal-ecw-src, libecwj2-3.3 but still do not work.

When I attempt to open an ecw file with Qgis it crash and tells me that there are problems with this libraries:

  /usr/local/lib/libNCSUtil.so.0.0.0
    /usr/local/lib/libNCSEcw.so.0.0.0
    /usr/local/lib/libNCSCnet.so.0.0.0

I am using ubuntu 12.10 and when I do:

gdalinfo --formats|grep -i ecw

it seems to work.

ECW (rw): ERDAS Compressed Wavelets (SDK 3.x)
JP2ECW (rw+v): ERDAS JPEG2000 (SDK 3.x)

What is the problem?


texts: When I try to do a WMS request to geoserver using the leaflet API I am getting a format related error

texts:
This XML file does not appear to have any style information associated with it. The
document tree is shown below.

<ows:ExceptionReport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ows="http://www.opengis.net/ows" version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/ows
http://localhost:8080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd">
<ows:Exception exceptionCode="NoApplicableCode">
<ows:ExceptionText>
java.util.IllegalFormatConversionException: d != java.lang.String d != java.lang.String
</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>

In the console I am not getting any errors only mimetype warnings and my wms layer isn't showing up on my base map, but it is being read in. So either I need to add something into Geoserver or I need to manually alter the styles which I will need to do in my leaflet code.


texts: Style feature by tag in postgesql by geoserver

texts:
I have a geometry table say its name is "tb_feature", and each feature have multiple tags which are saved in table "tb_tags", and the relationship is saved by another table "tb_feature_tag".

Example data:

tb_feature:

id  the_geom
1   xxxx

tb_tags

1  primary
2  road
3  uncompleted

tb_feature_tag

feature_id  tag_id
1           1
1           2

Now I want to style the feature based on there tags in geoserver. Generally the features are styled by different fields which are saved in the same table with the feature.  But the fields used for Rule-based styleing (tags in my example) are saved in another table.

How to handle this kind of situation?


texts: Feature Layer no longer accesible after MakeFeatureLayer_management

texts:
I am creating a new layer out of an old one with MakeFeatureLayer_management like this:

arcpy.MakeFeatureLayer_management("layername", "newlayername", "DEPTH = 1200")

This works for the first time but if I want to execute the function on the same layer again (with a new out_layer and a different where clause) like this:

arcpy.MakeFeatureLayer_management("layername", "secondlayername", "DEPTH = 1400")

I get

  Runtime error  Traceback (most recent call last):
     File "", line 1, in
     File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\management.py", line 5774, in MakeFeatureLayer
       raise e ExecuteError: ERROR 000622: Failed to execute (Make Feature Layer). Parameters are not valid. ERROR 000628: Cannot set input into parameter in_features.

Also the auto completion for in_features no longer shows the used layer.

What can I do to fix this?


texts: How do I determine the correct ratio to peak value for the Recession baseflow in HEC-HMS?

texts:
I am wondering if there is a way to estimate the ratio to peak value without calibration? What would be the most suitable value if I don't have a measured hydrograph to compare?
Thanks for any suggestions!


texts: Select by location gives no result in QGIS?

texts:
I am using QGIS 2.18 and I have two shapefiles:

"circle" layer; containing lots of circular polygons, many of them overlapping.
"mask" layer; containing few much larger polygons (not overlapping).

The mask layer covers many, but not all of the circles. I tried to select all polygons of the circle layer which lie within the boundaries of the mask layer-polygons. Both layers share the same CRS. However, both the standard QGIS-function select by location and the GRASS-function v.select produce no result. The "intersect" tool does not help here, as circles at the edge of the mask layer get cut in pieces.
Why is this? Any solutions to this issue?


texts: Loading Raster using QGIS API in Windows

texts:
I am trying to develop a C++ application using QGIS. I have to load a tif file and show it.
First I wrote an app similar to samples on the internet. It works on Linux, but it does not work on Windows. I compiled QGIS libraries myself using VS2008 and also tried binaries downloaded using Osgeo4w installer.

The app loads the plugins and displays the canvas, but cannot paint the raster layer on it. So I just can see a blank white canvas window.

The debug output says "Layer not found in registry", however I do add it to registry as follows:

QgsMapLayerRegistry::instance()->addMapLayer(myRasterLayer, TRUE);

Any ideas?


texts: How to bypass errors in arcpy for/while loop?

texts:
I have a handy script tool that loops through a workspace and renames and copies shapefiles to a feature dataset.  However, if there is a corrupted shapefile somewhere in the workspace the script fails and stops processing.

How do you handle errors such as this?  Is there a way to print the error file and continue processing the next shapefile in the for loop to completion?

import arcpy
from arcpy import env

# Allow overwriting of output
env.overwriteOutput = True

# Parameters
env.workspace = arcpy.GetParameterAsText(0)
state = arcpy.GetParameterAsText(1)
gdb = arcpy.GetParameterAsText(2)

# Get a list of shapefiles in folder
fcs = arcpy.ListFeatureClasses()

# Find the total count of shapefiles in list
fcCount = len(fcs)

# Set the progressor
arcpy.SetProgressor("step", "Copying shapefiles to geodatabase...", 0,fcCount, 1)

# For each shapefile, copy to a file geodatabase

try:
    for shp in fcs:

        # Define name for the output points
        fc = str(state + shp[0:9])

        # Update the progressor label for current shapefile
        arcpy.SetProgressorLabel("Loading " + shp + "...")

        # Copy the data
        arcpy.CopyFeatures_management(shp, str(gdb + "\\" + fc))

        # Update the progressor position
        arcpy.SetProgressorPosition()

except Exception as e:
    print "An error has occurred"
    print e

arcpy.ResetProgressor()


texts: ogr2ogr: How to export / explode GeoJSON features from collections into separate files

texts:
I would like to use an ogr2ogr command to export features as multiple separate geojson files from a single GeoJSON feature collection. I have tried using the -explodecollections command but I am unsure how I use it. These are the commands I've tried...

Command

ogr2ogr -explodecollections -f GeoJSON -t_srs crs:84 <output dir> <input geojson>

Result

ERROR 6: The GeoJSON driver does not overwrite existing files.
ERROR 1: GeoJSON driver failed to create <output dir>

Command

ogr2ogr -explodecollections -f GeoJSON -t_srs crs:84 <output geojson> <input geojson>

Result

Creates a single Feature Collection containing all the features, much like the original geojson file.

I have tried loads of other combinations of these commands but with no success.


texts: Whitebox for Processing 0.15.0 plugin in QGIS 3.10.0

texts:
I'm trying to use the Whitebox for Processing (v 0.15.0) plugin in QGIS 3.10.0 on Windows 10. When I attempt to run a tool, I receive the following in the tool log:

WhiteboxTools command output:
'"whitebox_tools"' is not recognized as an internal or external command

I unzipped WhiteBoxTools, which I downloaded from https://jblindsay.github.io/ghrg/WhiteboxTools/download.html, in "C:\Programs Files". I added the path to the whitebox_tools.exe to the registry and the folder containing it to the PATH variable. This didn't change anything.

I have tried to change the processing provider in QGIS options (as recommended here ), but there is no drop down option available for WhiteboxTools, as in the below image

Does anyone have any idea how to rectify this issue?


texts: Importing Tables from MSSQL to QGIS with no geometry - Point Data X Y

texts:
I am trying to import point data from a MSSQL database to QGIS. Is it possible to declare some SQL to create the geometry (X,Y) on the fly? The MSSQL table importer does have an SQL column on the side, but i'm not sure of the correct syntax to get this to work or if its even possible?

('POINT('+convert(nvarchar(24),convert(decimal(18,4), p.y)) + '  ' + convert(nvarchar(24),convert(decimal(18,4), p.x))+')') as geomtext


texts: Coordinates not consistently reversed (lon,lat interpreted as lat,lon) in Leaflet

texts:
I have a polygon layer fed from GeoDjango + PostGIS as GeoJSON.
Its original CRS is 3908. It's being drawn as a GeoJSON layer in Leaflet in CRS 4326 (I figure it is transformed on the fly by Django GeoJSON serializer) with the standard OSM tile basemap.
On my development server the working code is (in Django template):
var basemap = L.tileLayer('//{s}.tile.osm.org/{z}/{x}/{y}.png');
var geojson_lyr = L.geoJson({{geojson_data|safe}});
var m = L.map('map').fitBounds(geojson_lyr.getBounds());

basemap.addTo(m);
geojson_lyr.addTo(m);

However, on a production server, this code results in a mirrored polygon being drawn far away from where it should (south Arabian Peninsula instead of Bosnia and Herzegovina), which is in fact the exact position of the original polygon with lon-lat values reversed, so I have to fix it with coordsToLatLng option like:
var basemap = L.tileLayer('//{s}.tile.osm.org/{z}/{x}/{y}.png');
var geojson_lyr = L.geoJson({{geojson_data|safe}}, {
  coordsToLatLng: function (coords) {
    return new L.LatLng(coords[0], coords[1], coords[2])
  });
var m = L.map('map').fitBounds(geojson_lyr.getBounds());

basemap.addTo(m);
geojson_lyr.addTo(m);

Does anyone know what could be the reason for this different behaviour between local and production server, as I would like to have the same Leaflet code in development and production environments?
Environments on local and remote machines are the same as far as Django packages go.
The only differences are PostGIS and geospatial libraries versions.
On remote:
POSTGIS="2.1.8 r13780" GEOS="3.8.1-CAPI-1.13.3" PROJ="Rel. 4.8.0, 6 March 2012"
GDAL="GDAL 1.11.4, released 2016/01/25" LIBXML="2.9.1" LIBJSON="UNKNOWN" RASTER

On local:
POSTGIS="2.5.1 r17027" [EXTENSION] PGSQL="94" GEOS="3.7.0-CAPI-1.11.0 3.7.1" PROJ="Rel. 4.9.3, 15 August 2016"
GDAL="GDAL 2.2.4, released 2018/03/19" LIBXML="2.7.8" LIBJSON="0.12" LIBPROTOBUF="1.2.1" RASTER"


texts: Population weighted mean in Google Earth Engine

texts:
I'm working with air pollution data in Google Earth Engine (the JS API). I'm plotting the mean of the raster values over a country (defined by a GeoJSON file), and how it changes over time (it's an ImageCollection with ~100 frames). I know how to plot the unweighted areal mean:

print(ui.Chart.image.series(pollution, countryFeature, ee.Reducer.mean(), 10000, 'index'));

I also have a raster file with population data. How would I include that to calculate a population-weighted mean of the pollution data over the country instead?


texts: How can I auto-populate a mile marker field on ArcOnline?

texts:
I am a GIS intern and I am currently working on a project where field surveyors working on ArcCollector can quickly auto-populate the mile marker field attribute based on their location that is closest to the nearest mile marker.
For example, if a surveyor is on the field and the closest mile marker is few miles away, instead of walking back to check the mile marker, it would generate itself along with how far they are from that mile marker.


texts: I am using the GADM database. Is there any way to determine landlocked polygons in QGIS and create a dummy variable for it ( 1==landlocked ; 0==not landlocked) ?


texts: Reprojecting a SHP in QGIS to used it in ERDAS

texts:
I´m trying to created a AOI in ERDAS with a shapefile, but this shapefile had a projected system different to system that my image has, because of that I changed the projected system of the shp in QGIS. Now both (image and shapefile) have the same system, but they are not overlapping each other, I know they are from the same zone but it seems like I´m doing something wrong.

Should I change something else? Or did I something wrong in the process?
I followed this answer to re project the shp
How can I change the projection of shapefile in QGIS?

These are the characteristics of my image in ERDAS.

And these are the characteristics of my SHP in QGIS (After the change).

And they look like that when I put them together


texts:
I am creating a QGIS plugin and have a layer named "dataset_three" that I would like to activate in my Python code. My code runs, but the check mark next to the layer does not appear. Code inside my run method is below. Plugin Builder was used to generate a skeleton for the plugin code.
project = QgsProject.instance()
    # show the dialog
    self.dlg.show()
    # Run the dialog event loop
    result = self.dlg.exec_()
    # See if OK was pressed
    if result:
        set_three = project.mapLayersByName('dataset_three')[0]
        self.iface.setActiveLayer(set_three)


texts:
I try to get feature from map that I add route and marker already but when I click at it. I get nothing from it. Do I miss something? I used typescript(angular 4)

this is map declare:

ngOnInit() {
  this.source = new OlTileWMS({
  url: "url",
  params: {
    "layers": " layername",
    "format": "image/png8",
    "version": "1.3.0",
    "SRS": "EPSG:4326"
  }
});

this.markerSource = new VectorSource({
  features: []
});

var styles = {
  'route': new Style({
    stroke: new ol.style.Stroke({
      width: 7,
      color: [0, 255, 255, 0.95]
    })
  }),
  'icon': new Style({
    image: new Icon({
      anchor: [0.5, 0.5],
      src: 'assets/img/point.png',
      crossOrigin : "Anonymous"
    })
  })
};

var vectorLayer = new VectorLayer({
  source: this.markerSource,
  style: function (feature) {
    // hide geoMarker if animation is active
    return styles[feature.get('type')];
  }
});

this.layer = new OlTileLayer({
  source: this.source
});

this.view = new OlView({
  center: [100.6037284, 13.6768896],// lon lat
  zoom: 10,
  projection: "EPSG:4326",
  minZoom: 5
});

this.map = new OlMap({
  target: 'map',
  layers: [this.layer, vectorLayer],
  view: this.view
})

this.map.render()
}

and this is adding marker path

        var coordinates: [number, number][] = data.map(x => { return
         [x.longitude, x.latitude] })
        var route = new LineString(coordinates)
        var routeCoords = route.getCoordinates();
        var routeLength = routeCoords.length;
        var feature_array = []
        var routeFeature = new Feature({
          type: 'route',
          geometry: route
        });
        feature_array.push(routeFeature)

        for (let i in routeCoords) {
          this["Marker" + i] = new Feature({
            type: 'icon',
            geometry: new Point(routeCoords[i]),
            name: 'marker' + i,
          });
          feature_array.push(this["Marker" + i])
        }

        this.map.getView().setCenter([coordinates[0][0], coordinates[0][1]])
        this.map.getView().setZoom(15)
        var feature = this.markerSource.getFeatures()

        for (let i in feature) {
          this.markerSource.removeFeature(feature[i])
        }

        this.markerSource.addFeatures(feature_array)
        console.log(this.markerSource.getFeatures());

        //popup
        var popup = new Overlay({
          element: this.element,
          positioning: 'bottom-center',
          stopEvent: false,
          offset: [0, -50]
        });

        this.map.addOverlay(popup);
        this.map.on('singleclick',(evt) => {
            var feature = this.map.forEachFeatureAtPixel(evt.pixel,
            (feature,layer) => {
              return feature;
            });

            console.log(feature);
          //   if (feature) {
          //     var p: ol.geom.Point =
feature.getGeometry();
          //     var coord: ol.Coordinate = p.getCoordinates();
          //     var props = feature.getProperties();
          //     var info = "
" + props.casereference + "
";
          //         info += "
" + props.locationtext + "
";
          //         info += "
Status: " + props.status + " " + props.statusdesc + "
";
          //     // Offset the popup so it points at the middle of the marker not the tip
          //     popup.setOffset([0, -22]);

          // }
        });


texts: Lowering density of GRASS r.stream.extract result?

texts:
I am fiddling with the GRASS plugin in QGIS to produce watersheds and drainage basins as well as being able to identify all the basins and watersheds leading to one point (depending where i chose to question the information).

Through researches, I found someone who created something similar to what he would get in arcHYDRO with QGIS and following his steps, I'm brought to use the GRASS function r.stream.extract, but the resulting layers are definitely way too dense for my purpose. Since this process took quite a long time, in order to avoid re-doing it I am looking for clarifications regarding the algorithm's settings and which to raise to make the result a bit less dense.

I have left all the settings by default in my first attempt. I will of course continue my researches to try and clarify this.

My suspicions are the "Minimum flow accumulation for streams" and "Delete stream segments shorter than cells" parts that could be played with, but i don't know the scale of impact which numbers would have.

P.S. Cell size is 10m/pixel

Here is what it looks like:


texts: Does iOS know the phone's location solely from cell tower, i.e. without GPS data?

texts:
Question

Does the iOS operating system know the phone's location even if one could turn off the iPhone's built-in GPS module or if it was broken?

Elaboration

What I understand

I understand that the mobile phone provider knows where my phone is located by using for example three cell towers and pinpointing the phone's location.

I also understand that iOS can read the phone's location from the built-in GPS module and provide the GPS data as a software-service to the installed apps that are interested in it.

What I don't understand

What I don't understand is: does iOS, the operating system, know what the phone's location is even if the built-in GPS module was broken?

Does the cell tower transmit its position to the phone which is connecting to it? Can the phone or the phone's operating system respectively figure out where it is soley with the communication its performing with the connected cell tower or cell towers?

About me

I am a regular iPhone user and have no knowledge of iOS programming or mobilephone-to-celltower communication protocols.

Please let me know if the GIS StackExchange is the wrong StackExchange site to ask this question. After reading the "What topics can I ask about here?"-page, it didn't seem to be the wrong place.

Versions

Don't know whether this matters to answer the question, but if it does, let's take these versions:

iPhone 5S
iOS 8

EDIT

Erica's answer and Mapperz's comment (which both seem to have been deleted) and some googling gave me enough information to form a hypothesis.

Is the following correct?

Each cell tower has a globally unique ID (cell ID). So the phone itself can find out what towers are in range and what the signal strength to each tower is.

Then that data is sent by iOS to some Apple server which in turn can use a database with cell tower positions and signal strengths like the one provided for example by Skyhook Wireless do some additional calculation and send the calculated GPS postion of the phone back to the phone where it can be used.

Can anybody confirm that this is correct?


texts: How does QGIS Identify Features plugin work i.e. what is logic behind it?

texts:
I'm new to QGIS and python as well.

I need attributes and their values of a selected vector layer, in the similar manner as Identify Feature works only difference is I don't wish to show them in a dialog box.

For a better approach I went through Cookbook and few of posts on GIS and have tried function like getFeatures() but no success.


texts:
I've got a complicated problem right now. I have a layer with polygons and use the tool "Closest Neighbor" to find all Polygons that have a neighbor within 10 meters.
That works fine, but now I have to "group" them; So I would like to have differnt layers for each group.
The function does not give my polygons a new field with a group ID;
For example: 10 Polygons build a group couse they have at least one neighbor closer than 10 meters in the gropup;
there is another group of 4 Polygons close to the first group, but its closest distance is 12 metres to the first group.
Showing all groups in one layer works but it is complicated to see wich polygon belongs to wich group.


texts: How to add Custom data (like for Indoor floors) and find routes using open source software?

texts:
I am a newbie to GIS platforms so maybe whatever I am asking is very simple or obvious. I have read documentation/tutorials and as a last resort I am posting here, so any help is appreciated. I am not asking for code per se just point me to the right direction.

I am trying to create an Indoor Map application, I have installed PostGIS and pgRouting on the server. Now, I am not sure what is the easy way to add nodes and ways to the database because in every tutorial/documentation that I came across, people are using OSM data. For me, there is no OSM data. Can somebody explain how can we insert node & ways to database so that pgRouting can work.

Thanks.


texts: Transparency in stacked imagemosaics coverages

texts:
I'm using geoserver to stack several raster images that have different ELEVATION parameter (each ELEVATION "number" is a different layer so to speak).

This raster images are 16-bit one channel Geotiffs, from which i make a false color image in geoserver with this SLD:

        <ColorMap>
          <ColorMapEntry color="#FFFFFF" quantity="0" opacity="0"/>
          <ColorMapEntry color="#000000" quantity="1" opacity="1"/>
          ... other irrelevant entries ...
          <ColorMapEntry color="#FF00FF" quantity="65534" opacity="1"/>
          <ColorMapEntry color="#FFFFFF" quantity="65535" opacity="0"/>
        </ColorMap>

As you can see, I'm creating a transparency from values 0 and 65535 in the original raster data.

The problem arises when I stack several elevations, where transparencies are not rendered correctly, and do not show data on lower layers (elevations):

I've tried to set input transparency to #FFFFFF, but it won't work as it is a 16 bit image. And tried MergeBehavior FLAT and STACK, with no success.


texts: I am trying to label from the Annotation feature for specific fields but in the ArcMap TOC, right-click on the layer the option "Label Feature" has disabled, the requirement here I want to show two fields on the map.


texts: With which version of ArcGIS (Desktop and Server) does MrSID Generation 4 (MG4™) work?

texts:
I haven't really been able to find anything on LizardTech's site with those details or the difference between Generations but not compatibility with GIS systems.

Reference links - Esri Supported raster dataset file formats


texts:
I am using GeoServer WPS process to process two geometries. I want to expand one of the geometries in the direction of the other.  So far I am using the .buffer function but it expands the geometry in all direction.

This is the code I have so far.

public class PossibleTargetPositions extends StaticMethodsProcessFactory<PossibleTargetPositions> {

  public PossibleTargetPositions() {
    super(Text.text("Possible Target Positions"), "gpigf", PossibleTargetPositions.class);
  }

  @DescribeProcess(title = "processTargetPositions", description = "Calculates the new area of possible target positions")
  @DescribeResult(description = "Modified Possible Target Poisitions")
  public static Geometry processTargetPositions(
      @DescribeParameter(name = "current_area", description = "Current possible target positions") Geometry current_area,
      @DescribeParameter(name = "growth_distance", description = "The maximum distance the area should grow by") double growth_distance,
      @DescribeParameter(name = "growth_segments", description = "The number of segments to use when rounding corners, lower number means less points") int growth_segments) {

      Geometry modified_area = current_area.buffer(growth_distance, growth_segments);

      return modified_area.getFactory().createGeometry(modified_area);
  }
}


texts: Required python libraries for the QGIS official plugins

texts: Is there a list of required python modules for the official plugins of the LTR version?


texts: Correct Format for UTM coordinates fed to ArcMap "Convert Coordinate Notation" Tool?

texts:
I am trying to use Arc's (v.10.2) "Convert Coordinate Notation Tool" to convert UTM coordinates into WGS84.  The UTMs are in one column of an Excel spreadsheet as follows:

UTM
346677 E 5293198 N
345854 E 5294018 N

Tool Parameters fed to the tool:

Input Table: Sheet1$
Input Coordinates System: NAD 83
Output Feature Class: location of my chosing
Output Coordinate System: WGS 84
Input Coordinate Format: UTM_ZONES
X Field: UTM
Y Field: grayed out
Output Coordinate Format: DD_2

When I run the tool I get the generic error

  "ERROR 999999: Error executing function. Failed to execute
  (ConvertCoordinateNotation)."

so I don't know for sure what the problem is but my first thought was that it might be that the tool doesn't like the format of the UTMs in my table.  Esri's documentation for the tool didn't offer any direction on proper UTM format, saying only:

  UTM_ZONES —The letter N or S after the UTM zone number designates only
  North or South hemisphere.

So, is there a problem with the UTM format in my table?


texts: Uploading GPX file to website and displaying it visually

texts:
I'd like to create a file upload button and then print the resulting gpx file on the map, could anyone have a look at this code to see where I'm going wrong?

body:

<form action="/action_page.php">
  Select a file: <input type="file" id="uploadID">

  <input type="submit">

js:

let gpx = document.getElementById('uploadID');
gpx.onchange = function() {
  new L.GPX(gpx, {
    async: true, marker_options: {
      startIconUrl: 'pin-icon-start.png',
      endIconUrl: 'pin-icon-end.png',
      shadowUrl: 'pin-shadow.png'
    }
  }).on('loaded', function(e) {
    map.fitBounds(e.target.getBounds());
  }).addTo(map);
}


texts:
There are many similar questions like this. But I haven't found a usefull answer yet. So I hope some of you have a suggestion to this.

I've done some flyovers with the drone at a contruction area, and then got a DSM out of these, using Pix4D.
Now I have 2 different DSM, and then imported these into QGIS.
Through rastercalculator i've withdrawn these from each other to get the height difference. See below:

I then would like to find out the volume of where there have been a height difference.. So some of the area I have marked red (increased volume) and the blue (decrease in volume). Also using rastercalculator and polygonize. See below.

Is there a smart way to find the volume of the blue and red marks of these rasterlayers in QGIS, or do any of you have an alternative program that would do the job easier and faster?


texts: Showing attributes/labels from KML in Google Maps?

texts:
I have converted my cover, it is said (from archived .shp to .kml) in QGIS and this is the way it is read in angular:

this.kmlLayerc1= new google.maps.KmlLayer({
    url: 'http://direccion/carpeta/nombre.kml',
    map: this.map
});

But when I look at it in the map, it does not show with the attributes as in QGIS, and the same thing happens with google earth that they dont show.

This is my archived .shp, I would like to show it the same way as you can see in google maps or google earth.

This is a link to the same problem
https://support.esri.com/es/technical-article/000012154

only that I already tried it but I was not succesful

Anyone have a solution or suggestion?


texts: that's a really simple question but I am kind of stuck with it. I have a list with multiple sf-objects and I want to put all sf-objects (dataframe) under each other and build one final sf-object. How could I do this?


texts: Code.EarthEngine: Uploading multiple images, ingestion failed - time out

texts:
As part of my project I am importing rasterized surfaces into GEE which later on I am using in conjunction with other raster images (involving satellite climatic images etc) to produce spatial surfaces.

The images I am trying to upload contain estimates obtained from geostatistical modeling and are stored into GeoTiff rasterbricks. Each brick contains 200 layers (samples per px) with a total size for the entire brick approximately 900mb each rasterbrick.

If I upload the files and wait for 100% ingestion one at a time then everything works fine, however if I wish to upload simultaneously then most of the task fail - time out.

I realize that the sheer volume can be an issue on its own, however I was wondering if there is anything else that could be done from my side as a user to circumvent this issue.


texts:
How do you calculate centroids in QGIS 3.0? In previous versions, there was an easily accessible tool in the vector geometry toolbar, but it is gone. I've seen ways to do it with Python on Stack Exchange but I am not that good with Python.

I've tried a few Python plugins to no avail. I've repeatedly got the response "Couldn't load plugin 'realcentroid' due to an error when calling its classFactory() method", which I do not understand.


texts: Convert the time to the suitable format using Pandas

texts:
I have a file whose name is "MCD43A3_Alb_QA_SWIR_2020_061.tif", and I want to split the time "2020_061" and convert to the format "2020-03-01", how can I do that?
Here is my code:
def get_image_time(file_single):

    img_time_day_raw = os.path.basename(file_single).split("_")[5]
    img_time_day = img_time_day_raw.split(".")[0]
    img_time_year = os.path.basename(file_single).split("_")[4]
    img_time_str = img_time_year + "03" +img_time_day
    img_time_pd = pandas.to_datetime(img_time_str, format ='%Y/%m/%d)
    return(img_time_pd)


texts: Analyzing Sonoma County's topography/slope in 2017 fires

texts:
I am looking to create a map of sonoma county's topography. I am looking at one of the components of a fire: slope.

I want to first isolate sonoma county, which is easy enough to do, after that though, I am wondering how to work with topographic data/map (which is usually raster data), and convert it into vector data. Will I be working with a TIN when I do that?


texts: Map printing using ArcGIS silverlight API

texts:
I am using a GP task to print my map and its legend. Well it works fine. But it is really slow.

Also I am not able to print the route event layer that I create. It does not show on the map.

Please suggest me an efficient way of printing the map from client side.

I am using ArcGIS 10 Server with Silverlight API on Visual Studio 2010.


texts:
i'm struggling updating my installation of PostgreSQL/PostGIS, from 9.1/1.5 to 9.2/2.1.

I'm on OSX Mountain Lion and using the very useful ports from W. Kyngesburye. I followed the procedure :

Updated PostGIS 1.5 to 2.0
Dumped databases
Updated databases to postgis 2.0
Installed PostgreSQL 9.2 and PostGIS 2.1

I'm stuck at the step of using pg_upgrade i've got an error saying :

  Could not load library $libdir/postgis-2.0
  ERROR:  could not access file "$libdir/postgis-2.0": No such file or directory

  Could not load library $libdir/rtpostgis-2.0
  ERROR:  could not access file $libdir/rtpostgis-2.0: No such file or directory

Those libraries are in /usr/local/pgsql-9.1/lib

pg_config returns that the lib directory is /usr/local/pgsql-9.2/lib

If i switch the symbolic link /usr/local/pgsql to 9.1 again, same problem.

Thanks for your help, i'm very eager to use the new functions of 9.2/2.0 :-)


texts: Does registering a directory in ArcGIS Server 10.3.1 work recursively?

texts:
I have a directory structure as follows:

--Geodata
---------Raster
---------------Topographie
---------------Aerial_Images
---------------DGM
---------Vector
---------------Environment
---------------Transport
...etc

Do I just have to register the directory "Geodata" or do I have to register all separate directories which contain the data I would like to publish?


texts: Modify Geonetwork 3.4.2 to show Thesaurus themes keywords

texts:
What I need to do is show the keywords of a local thesaurus on the home screen, similar to how the topicCats are displayed.

Anybody knows how to do this?


texts: How do I find where a line intersects itself?

texts:
I am using Python 3.7 with Shapely and GeoPandas.

I have a big line of 181,000 points, and would like to find all the points where the line intersects itself. It does so a lot.
I don't need a new point at the precise intersection, just one of the existing points which is closest.

I have been writing code to loop through the points and find other points close by using.

for i,point in gdf.iterrows():
    gdf[gdf.geometry.intersects(point.buffer(10) == True].index.tolist()

Where gdf is a geopandas GeoDataFrame where each row is a point from the line.
(eg it looks like this:)

   geometry
0  POINT (-47.91000 -15.78000)
1  POINT (-47.92000 -15.78000)

But surely there is a way to do this using existing functions?

My way is very slow and records many duplicates at each intersection, so will require more code to reduce each intersection to one point.


texts: I have a polygon feature class with more than 100,000 polygons in DB2 table. I would like to dissolve them based on a single field to reduce the row numbers. Is there any commands / SQL in DB2 to dissolve these without using ArcGIS Desktop tool?


texts: Display peaks using Tilemill and only show relevant peak per zoom level

texts:
I want to make a map using Tilemill and I want to show the names of mountain-peaks.

What I'd like to do:

If the user zooms out (let's say zoom level 12) I only want to show the highest (most relevant) mountains in a certain area. If the user zooms in closer, I'd like to show more peaks.

The data I have is form an geofabrik import of OSM data into a postgres DB.
I was hoping to find a tag like 'relevance' that I could use, but that doesn't seem to exist...

Is there a way to do that with OSM data alone?


texts:
I need to track the changes in the data that have been edited in the surveys to later check them both to see what the changes were.
The workflow is as follows: a survey can be accepted or rejected by the supervisor, if it is rejected, a field is set in AGOL, so that it appears in the survey inbox 123, the field worker must correct it later with Survey123. However, we do not want to lose the information from the initial survey to have a record of the change and know what was done to that survey specifically.


texts: How to convert distance into latitude + longitude

texts:
I have start point (latitude) I know direction, lets say strictly north, and I want to calculate latitude which is 100 meters above the start point.

The same for longitude.

I believe there should be a simple way to do that, but I couldn't find any relevant to this, only how to calculate distance knowing start and end points.


texts: Strava Metro users, how to interpret BIKECNTN?

texts:
Glasgow city provides its Strava user's stats created 2013 (link below). The CSV file contains all the expected columns including, "AMCOMMUTEN" "PMCOMMETN" "BIKECNTN" and so on.

However, when we look at the row values, some are a little off., particularly in the bike count columns. The values are not whole integers as I would expect, instead the values are much smaller, for example, .0930053, 0.0196534.

First, I thought these we the percentage of users on a section of road. However when I tested this idea, it was nullified. The total values in BIKECNTN for example, add up to 2436.940338.

Further - I notice in a youtube video (linked below) that BIKECNTN values are defined as whole numbers. Any ideas on why are the Glasgow numbers so small?

screenshot of Glasgow values less than whole integers - https://1drv.ms/i/s!AtadKSvlHF4EhD9yTFGwX1WHPRJu

youtube video (see 30 minutes in for table) - https://youtu.be/eHGLNQnxcNs


texts: IDW Interpolation in QGIS 3.10 - Power Coefficient not working

texts:
Trying to set the power coefficient for the IDW interpolation in QGIS 3.10 in pyqgis.

Whatever number I set it has no effect on the interpolation output - always the same output. The default is 2 but I tried 10, 90, 0.5 and all the same result:

Here's the code:

## Get the selected features by ID first and create a clone layer with that selection

it = [f for f in layObj.getFeatures()]
ids = [5,6,7,8,9,10,12,21,24,26,28]  # example of ids only- in reality it's hundreds
layObj.selectByIds(ids)
clone = processing.run("native:saveselectedfeatures", {'INPUT': layObj, 'OUTPUT': memory:{}'.format(layObj.name())})['OUTPUT']

layer_data = QgsInterpolator.LayerData()
layer_data.source = clone
layer_data.zCoordInterpolation=False
layer_data.interpolationAttribute = 'PM10_Emissions_tpa'

# I've tried all of these
layer_data.distanceCoefficient = 10  # https://qgis.org/pyqgis/3.10/analysis/QgsIDWInterpolator.html?highlight=idw#
layer_data.setDistanceCoefficient = 10
layer_data.coefficient = 10

layer_data.mInputType = 1 # I've tried 0 and 1- same exact output
idw_interpolator = QgsIDWInterpolator([layer_data])

export_path = rasOut
rect = clone.extent()
res = pixSizeP
ncols = int( ( rect.xMaximum() - rect.xMinimum() ) / res )
nrows = int( (rect.yMaximum() - rect.yMinimum() ) / res)
output = QgsGridFileWriter(idw_interpolator,export_path,rect,ncols,nrows)
output.writeFile()

Perhaps doing something stupid but can't seem to find a good example that works for me- seen other posts but didn't solve it for me. Can anyone help?


texts: Speed of editing attributes in QGIS from a Python plugin

texts:
I'm trying to edit the value of an attribute for each feature in a layer using a QGIS Python plugin. I've found that doing this outside of editing mode is much slower than while editing (even including committing the edits). See code below (lines interchangeable at the same point in a loop). The difference in speed for my sample dataset is 2 seconds (edit mode) vs 72 seconds (not edit mode).

Modifying an attribute in edit mode:

layer.changeAttributeValue(feature.id(), 17, QtCore.QVariant(value))

Modifying an attribute outside of edit mode:

layer.dataProvider().changeAttributeValues({ feature.id() : { 17 : QtCore.QVariant(value) } })

Is this an expected behavior? I don't need the user to be able to undo the changes, so I don't think I need to use edit mode.

Edit 1: See full code below with both versions included (but commented out):

def run(self):
    try:
        # create spatial index of buffered layer
        index = QgsSpatialIndex()
        self.layer_buffered.select()
        for feature in self.layer_buffered:
            index.insertFeature(feature)

        # enable editing
        #was_editing = self.layer_target.isEditable()
        #if was_editing is False:
        #    self.layer_target.startEditing()

        # check intersections
        self.layer_target.select()
        self.feature_count = self.layer_target.featureCount()
        for feature in self.layer_target:
            distance_min = None
            fids = index.intersects(feature.geometry().boundingBox())
            for fid in fids:
                # feature's bounding box and buffer bounding box intersect
                feature_buffered = QgsFeature()
                self.layer_buffered.featureAtId(fid, feature_buffered)
                if feature.geometry().intersects(feature_buffered.geometry()):
                    # feature intersects buffer
                    attrs = feature_buffered.attributeMap()
                    distance = attrs[0].toPyObject()
                    if distance_min is None or distance < distance_min:
                        distance_min = distance
                if self.abort is True: break
            if self.abort is True: break

            # update feature's distance attribute
            self.layer_target.dataProvider().changeAttributeValues({feature.id(): {self.field_index: QtCore.QVariant(distance_min)}})
            #self.layer_target.changeAttributeValue(feature.id(), self.field_index, QtCore.QVariant(distance_min))

            self.calculate_progress()

        # disable editing
        #if was_editing is False:
        #    self.layer_target.commitChanges()

    except:
        import traceback
        self.error.emit(traceback.format_exc())
    self.progress.emit(100)
    self.finished.emit(self.abort)

Both methods produce the same result, but writing via the data provider takes much longer. The function classifies proximity of building features to nearby fields (purple) using pre-created buffers (brown-ish).


texts:
I want to make my field buff_dist longer than by 400ft.  I want to write a code that will go through the table and change the field value by adding 400ft to it's value.

How would I write that?

I tried to use UpdateCursor, but I don't think I was understanding it. I also want to be able to select certain objects to change the buff_dist field of, but knowing how to change the field value is one step closer for me!


texts: Using different colors on Torque CartoDB

texts:
We’re creating a new piece and we’re having some limitations using the Torque function. Could you answer these questions, please?

Is it possible to insert multiple colors on this function?
Is there any way to change the size of the bubbles on Torque (min-max)?

I have a programmer guy on my side and he’s trying to put these new features on the css code below

/** torque visualization */

Map {
-torque-frame-count:128;
-torque-animation-duration:30;
-torque-time-attribute:"n_de_participantes";
-torque-aggregation-function:"count(cartodb_id)";
-torque-resolution:2;
-torque-data-aggregation:"cumulative";
}

#testando_o_torque {
   marker-width: 12;
   marker-opacity: 0.9;
   marker-allow-overlap: true;
   marker-placement: point;
   marker-type: ellipse;
   marker-line-width: 2;
   marker-line-color: #ffffff;
   marker-line-opacity: 1;
}

#testando_o_torque[n_de_participantes=500] {
   marker-fill: #A6CEE3;
}
#testando_o_torque[n_de_participantes=150] {
   marker-fill: #1F78B4;
}
#testando_o_torque[n_de_participantes=20] {
   marker-fill: #B2DF8A;
}
#testando_o_torque[n_de_participantes=600] {
   marker-fill: #33A02C;
}
#testando_o_torque[n_de_participantes=70] {
   marker-fill: #FB9A99;
}
#testando_o_torque[n_de_participantes=60] {
   marker-fill: #E31A1C;
}
#testando_o_torque[n_de_participantes=200] {
   marker-fill: #FDBF6F;
}
#testando_o_torque[n_de_participantes=2000] {
   marker-fill: #FF7F00;
}
#testando_o_torque[n_de_participantes=300] {
   marker-fill: #CAB2D6;
}
#testando_o_torque[n_de_participantes=6] {
   marker-fill: #6A3D9A;
}
#testando_o_torque {
   marker-fill: #DDDDDD;
}
#testando_o_torque[frame-offset=1] {
   marker-width:12.5;
   marker-opacity:0.45;
}
#testando_o_torque[frame-offset=2] {
   marker-width:14.5;
   marker-opacity:0.225;
}


texts: Any workaround to extract plain text data in ASCII from `netCDF` file in R

texts:
I am wondering about how to proportionally split or subset the gridded dataset in netCDF format where data sources were provided by European Climate Assessments and dataset (link for data source). However, E-OBS climate gridded dataset were given for each 15 years climate observation throughout Europe and working with big netCDF format grid data in R always cause memory problem in my site when I tried to treat all missing values. After decompressing grid data in netCDF format (download link of grid data), I used raster::stack to import whole gridded data, then I tried to treat missing values in this grid data because I need to do some statistics on this temperature observation later on, but it caused memory problem. So here is what in R:

mydat <- raster::stack("~/data/tg_0.25deg_reg_1980-1994_v17.0.nc")
> print(mydat)
File C:\Users\jvrat\Documents\stella\data\tg_0.25deg_reg_1980-1994_v17.0.nc (NC_FORMAT_CLASSIC):

     1 variables (excluding dimension variables):
        short tg[longitude,latitude,time]
            long_name: mean temperature
            units: Celsius
            standard_name: air_temperature
            _FillValue: -9999
            scale_factor: 0.00999999977648258

     3 dimensions:
        longitude  Size:464
            long_name: Longitude values
            units: degrees_east
            standard_name: longitude
        latitude  Size:201
            long_name: Latitude values
            units: degrees_north
            standard_name: latitude
        time  Size:5479   *** is unlimited ***
            long_name: Time in days
            units: days since 1950-01-01 00:00
            standard_name: time

    5 global attributes:
        Ensembles_ECAD: 17.0
        Conventions: CF-1.4
        References: http://www.ecad.eu\nhttp://www.ecad.eu/download/ensembles/ensembles.php\nhttp://www.ecad.eu/download/ensembles/Haylock_et_al_2008.pdf
        history: Wed Apr  4 11:17:28 2018: ncks -a -d time,10957,16435 tg_0.25deg_regular_1.nc tg_0.25deg_reg_1980-1994_v17.0.nc
Wed Apr  4 11:16:02 2018: ncks -a --mk_rec_dmn time tg_0.25deg_regular.nc tg_0.25deg_regular_1.nc
        NCO: 4.6.7

mydat <- raster::reclassify(mydat, cbind(NA, -999))
Error: cannot allocate vector of size 2.9 Gb

To avoid this memory problem, perhaps I can try to split original gridded data in netCDF format in 10 years and 5 years observation or equally split the grid data by each 5 years climate data observation (originally it was 15 years climate data observation for whole Europe). But doing this way is not feasible and desired.

UPDATE: objective:

I want to either convert this netCDF file to plain text tabular data in ASCII format (extract plain text data of Germany grid from chosen E-OBS netCDF grid data). I can use R to work with this data manipulation, then I will use its output data (plain text data in ASCII) in ArcGIS desk for different interpolation.

UPDATE 2:

I need to extract plain text data of Germany grid with 0.25 degree resolution from original E-OBS netCDF files where 15 years climate observation for whole Europe were stored in each nc file. I need all grid data in ASCII format or csv format because I can import them with ArcGIS desktop and apply respective geospatial analysis. I need to find a solution how to get this task done that I specified above. Any idea please?

How can I make this happen this extraction or possible coercion of netCDF data? Is that doable in R? Any more thoughts?


texts: processing.runalg() throws "TypeError: catching classes that do not inherit from BaseException is not allowed"

texts:
Hi everyone I'm in some way new with PyQGIS and I've been trying to run a script in QGIS 3.0 without success (it prefectly ran in 2.18) and always get the same error:

AttributeError: module 'processing' has no attribute 'runalg'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "C:\PROGRA~1\QGIS3~1.0\apps\Python36\lib\code.py", line 91, in runcode
    exec(code, self.locals)
  File "", line 8, in
TypeError: catching classes that do not inherit from BaseException is not allowed

Does this has something to do with PYTHONPATH? I can't even see the list of algorithms when typing: processing.alglist()


texts: How to use onLayerAddResult in the ArcGIS Server JavaScript API

texts:
The JS API help file shows how to listen for the onLayerAddResult event.

onLayerAddResult(layer, error)
Fires after specified layer has been added to the map

I can't get it to work reliably. Using this sample, and adding the following line:
dojo.connect(map, "onLayerAddResult", operationalLayer,  function(){alert("test")});

results in the alert appearing 3 times. What am I doing wrong?
(Note that there is a separate onLayersAddResult (plural) event but I'm interesting in knowing when the first layer (only) has been added.)


texts: How to create installer for ArcObjects applications in VS 2012

texts:
After Visual studio 2010, the extremely useful "Setup And Deployment" project have been removed from visual studio. And MS have packed it with a rather lousy InstallShield LE(LIMITED edition).

You can see the frustrated user voices here

Visual studio 2012 and ArcMap 10.3.1 are what I have now. So what are the options now to build an installer for my ArcObjects Tools other than playing around with hacking the limited options in InstallShield LE.  Are there any documents in the ESRI Developer docs? I have not found anything yet.

What I'm specifically interested is the process of registration and unregistration of Dlls after installation and unistallation.

All suggestions are welcome.


texts: Maximum Likelihood and Random Forest Classification

texts: Which classification is best for Crop mapping? Random Forest or Maximum Likelihood?


texts: How to create point features from 1-Many relationship?

texts:
I have an address point shapefile for buildings in a city. The point shapefile shows only a single point for each building; apartments are listed in a table called additional addresses. I need to create a many-to-one relate from the additional addresses table to the address point shapefile using the unique street address. I then need to make a copy of the address point for each instance in additional addresses table.

I need to end up with a stack of points, one for each apartment at the address.  Has anyone seen a Python script that does something similar?


texts: TauDEM flowdircond tool doesn't give an output

texts:
I'm using the flowdircond tool from TauDEM to create a hydroDEM. The tool gives an error message when using mpiexec through Windows CMD. When used without mpixec, the tool doesn't give either the output or any error messages. All the path variables have been properly set. I'm working on a 16vcpus, 64GB RAM machine so I don't think memory overflow is an issue.
Can someone help?


texts: How to make output generated from shortest path in QGIS more reasonable

texts:
My goal is to generate bus route stop by stop given the bus route and stops with sequence number of single direction.

I tried to achieve this by using shortest path in QGIS stop by stop.

However, the raw bus route is for both direction, and the some of the stops are located at the opposite side by mistakes:

As a result, the shape from shortest path would go all the way back to nearest point where both direction routes meet and then to the destination stop:

Since there are around a thousand routes need to be processed, it is impossible to correct them manually.
Is there a way to tell the algorithm to take real shortest path?

You can find the example files here


texts: osmfilter filter for nodes and find the related/nearest street to every node

texts:
I'm successfully managed to filter all nodes of a specific type by using osmfilter:

osmfilter austria.o5m --keep="highway=speed_camera"

Now I have got a lot of nodes like this:

<node id="3906966442" lat="48.2975844" lon="14.2988663" version="1" timestamp="2015-12-23T18:18:11Z" changeset="36131585" uid="180830" user="flaimo">
    <tag k="highway" v="speed_camera"/>
    <tag k="maxspeed" v="50"/>
</node>

And in the end I'm converting it to a CSV using:

osmconvert - --all-to-nodes --csv="@id @lon @lat @timestamp maxspeed"

Which works fine. However in addition to the maxspeed value I'd also be interested in the name of the street where this node is attached too. Since nodes like speed_camera are always attached to a street this should be possible using the Openstreet map dataset.

The only solution I could think of is todo reverse geolocation look up for each node, which however would be very slow. I'd prefer a more performant solution (ideally based on just osmfilter) like keeping all street entries with speed cameras attached in the OSM dataset, but I can't find anyway to do that with osmfilter.


texts: What are benefits of using ArcGIS with PostgreSQL over simply ArcSDE?

texts:
I understand that in order to benefit from ArcGIS spatial datatypes (ST_GEOMETRY, versioned geodatabases etc.) ArcSDE needs to be installed - and with the 10.1 client it is automatically installed (two-tier client>>DBMS, see here.

However, I'm still trying to figure out the benefits of connecting an Esri front end to PostgreSQL (or Oracle).  Is it purely back-end benefits, such as scalability  /performance / redundancy / DBAability, or are there any extra front-end features offered by a PostgreSQL / PostGIS setup? The Esri help does not seem to elaborate

FYI, I'm pretty much a database newbie who is designing a GIS dissertation aimed at illustrating why Postgresql / PostGIS / QGIS is more scalable / flexible (and cheaper) than ArcGIS / any database, so must also consider above scenario, which I can't afford to implement. Any links on this last point, especially regarding workflow (e.g. not having loads of shapefiles cluttering everything up) most welcome.  d.


texts: If-Then-Else statement in ModelBuilder has improper syntax

texts:
I have a model that converts a road network into a different schema for a different program. In one step of the model I am converting values for a field "Class".  I wrote an If-Then-Else statement in Python but my syntax is off.  Here is the code:

def gst(old_value):
    if old_value == 'P00':
        return A91:
    elif old_value == 'P09':
        return A91:
    elif old_value == 'P01':
        return A89:
    elif old_value == 'P02':
        return A90:
    elif old_value == 'P03':
        return A90:
    elif old_value == 'P04':
        return A40:
    elif old_value == 'P05':
        return A40:
    elif old_value == 'P06':
        return A40:
    elif old_value == 'P10':
        return A40:
    elif old_value == 'P11':
        return A40:

I am getting a syntax error from Line 3 in ArcMap (Error 000989).  I am not sure if I need double quotes around my values or not or if I am ending the expression correctly.  Can someone help me resolve the issues in my code?


texts: How to show information window for the marker cluster?

texts:
This is my markercluster code :
i need information window for the markercluster icon as well as marker icon, i have another cluster.js file,

can some one please tell me how can i show the information window for cluster icon when single mouse clik, and same for the marker icon

function initialize(doc) {
    var mapDiv = document.getElementById('logitmap');
    var latlng = new google.maps.LatLng(37.4419, - 122.1419);
    var options = {
        center: latlng,
        zoom: 2,
        mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    // Creating the map
    map = new google.maps.Map(mapDiv, options);
    bounds = new google.maps.LatLngBounds();
    var jsonData = eval("(" + doc + ")");
    var markers = [];
    var markerIconURL;
    markerIconURL = jsonData[0].markerIconURL;
    for (var i = 1; i < jsonData.length; i++) {
        var input = jsonData[i];
        var gtype = input.Gtype;
        if (gtype == "marker") {
            var latLng = new google.maps.LatLng(input.latitude, input.longitude);
            var marker = new google.maps.Marker({
                position: latLng
            });
            markers.push(marker);
        }
    }
    var markerClustererOptions = {
        imagePath: markerIconURL,
        zoomOnClick: false
    };
    var markerCluster = new MarkerClusterer(map, markers, markerClustererOptions);
}


texts: Build a polygon raster as indexing grid with SQL

texts:
According to the plugin Indexed Vector Grid which builds a polygon raster from shape bounds and name every cell as "A1, A2, A3 ...", I need a more advance solution, which I can use for hundreds of maps. I'm working with a PostGIS database and would like to have a (fast) SQL solution for that issue.

The final result should look like this:

For every overview (bounding box of a city), I need a grid of 6x6 cells.

The table ('ov_boxes') of my bounding boxes looks like that:

Is there a SQL solution possible? Or do I have to go the python way?


texts: ArcGIS 10.2 Broken Project Data Source Error when publishing a Geoprocessing Service

texts:
I have a python script that creates a temporary feature class, creates a feature layer from the temporary feature class, uses the feature layer, then deletes the feature layer and the feature class. When I try to publish the python script as a Geoprocessing service I get an ERROR saying that my project contains a broken project data source on my temporary feature layer. So far my work around is to leave the temporary feature class in my workspace. Is there a way to delete it before the process completes? Here is the code snippet that generates the error:

acadian_holder_fpath = "\\\\my_server\\GIS\Geodatabases\\Acadian_Holder.gdb\\Acadian_Holder_Dataset\\Acadian_Holder"
xxcrown_fpath = "\\\\my_server\\GIS\\Geodatabases\\Temp_WorkSpace.gdb\\xxholder_src"
arcpy.analysis.Select(acadian_holder_fpath,xxcrown_fpath,"LOC in ('BB','BC','BM','IQ','JC','JN','JS','JW','PH','QB','RB','RG','RS','SQ','SV','UG')")
dnr_regions_fpath = "\\\\my_server\\GIS\\Geodatabases\\Acadian.gdb\\dnr_regions"
xxregions_fpath = "\\\\my_server\\GIS\\Geodatabases\\Temp_Workspace.gdb\\xxregions_src"

arcpy.analysis.Intersect([xxcrown_fpath,dnr_regions_fpath],xxregions_fpath)

arcpy.management.Delete(xxcrown_fpath)

at_road_network_fpath = "\\\\my_server\\GIS\\Geodatabases\\connection_to_my_sde.SDE\\AT_Road_Network"

# Use select by location instead of intersect so we get the entire road if it exits crown land.

at_road_network_flayer = arcpy.management.MakeFeatureLayer(at_road_network_fpath,"at_road_network_flayer")

xxregions_flayer = arcpy.management.MakeFeatureLayer(xxregions_fpath,"xxregions_flayer")

# Select YTD roads

where_clause = "Region = 1 or Region = 3 or Region = 4"
arcpy.management.SelectLayerByAttribute(xxregions_flayer, "NEW_SELECTION", where_clause)
arcpy.management.SelectLayerByLocation(at_road_network_flayer, "INTERSECT", xxregions_flayer)

# Do stuff with at_road_network_flayer

# Delete the temporary feature class

arcpy.management.Delete(xxregions_flayer)
del xxregions_flayer
arcpy.management.Delete(xxregions_fpath)


texts: Getting SyntaxError from Coordinate Transformation (points) with ArcPy?

texts:
I'm trying to do a coordinate transformation for points with ArcPy in ArcGIS Pro by using x and y coordinates as Input.

I tried the following:

import arcpy
inputSRS = arcpy.SpatialReference(31467)
outputSRS = arcpy.SpatialReference(25832)
gt = 'DHDN_To_ETRS_1989_3'
pt = arcpy.Point()
pt.X = 3453122.083947168
pt.Y = 5427803.663703325
print "Input XY: {} {}".format(pt.X, pt.Y)
ptgeo = arcpy.PointGeometry(pt, inputSRS)
ptgeo1 = ptgeo.projectAs(outputSRS, gt)
pt1 = ptgeo1.lastPoint
print "Output XY: {} {}".format(pt1.X, pt1.Y)

I get a SyntaxError.


texts: How to add data in ArcGIS enterprise geodatabase many to many table?

texts:
I have 3 tables in my PostgreSQL geodatabase. I am using ArcGIS 10.5

parcel
owner
parcel_to_owner

parcel_to_owner is many to many table that created using ArcGIS. parcel_to_owner table has 3 columns named rid, parcel_id, owner_id
So I want to add data in this table using sql.
I can generate the objectid for parcel feature using sde.next_rowid('sde','parcel'). But if I use sde.next_rowid('sde','parcel_to_owner') it generates big numbers. For example, if next rid value is 7, it generates 685.
But how can I add next rid value?


texts:
Please can you tell me which Windows OS Quantum Desktop supports.

i.e. Windows 7, XP, Vista etc.


texts: Error message retrieval in grass.read_command

texts:
I am writing a script in python and would like to get the error messages of the function grass.read_command for seeing why it is not working.

I found a webpage (http://grasswiki.osgeo.org/wiki/GRASS_Python_Scripting_Library) with a function that can be used for that:

def read2_command(*args, **kwargs):
   kwargs['stdout'] = grass.PIPE
   kwargs['stderr'] = grass.PIPE
   ps = grass.start_command(*args, **kwargs)
   return ps.communicate()

I saved the function as read2.py and imported it.

I run it:

grass.read2_command('v.db.connect', overwrite=True, map='C_01055500', table='C_01055500', key='cat', database='$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/')

And get following message:

Traceback (most recent call last):
File "<input>", line 1, in <module>
AttributeError: 'module' object has no attribute 'read2_command'

What do I need to do for the function to work ?


texts: How to make a predetermined polygon (circle) from 4 coordinates, the radius and center Longitude and Latitude in OpenLayers

texts:
I know how to make a predetermined polygon in OpenLayers (see below).

Please have a look at http://studio.netnrg.co.za/dev/rnd/blake.loizides/openlayers

var feature2 = new OpenLayers.Feature.Vector(
  OpenLayers.Geometry.fromWKT("POLYGON((-120.828125 -50.3515625, -80.1875 -80.0078125, -40.40625 -20.4140625, -120.828125 -50.3515625))"
  )
);
vectors.addFeatures([feature2]);

I have made an edit circle (40 points in OpenLayers) (my client wanted to see a circle on the map for zones).

The problem I have is that I can only store the following details and not the 40 points or coordinates or vertices to make a circle in OpenLayers. I can only STORE 4 COORDINATES.

In the database I store the bounds top bottom left and right (bottom: -29.054153382197, left: 23.782779686138, right: 23.79286499053, top: -29.044068077805) I will replace the coordinates with the ones in my database.

The radius (525.627982303084)

And the center Longitude and Latitude (lon=23.787822338334,lat=-29.049110730001)

Now I made some calculations below.

My question is how do I now recreate a (circle) with the information I have above that is stored in my database?

I know how to get data from my database and display it on the map, what I don't know is how to make a circle if I can't store the 40 points and only have the radius, the bounds, and the center Lon/Lat to make a circle.

Please if anyone can help me I would be greatly appreciative.

I only want a circle for the look and for no other reason.


texts:
I am working on a conservation project involving rare species and we have a lot of sensitive data and about 50 people to whom we need to supply maps to.  At least at this stage we can not justify paying for the Pro version of QGIS Cloud.

I now see mention of QGIS Cloud Private but the details are scanty.  It sounds as if you have your own infrastructure then you can use it but there are no details.  We have IT expertises and resources.

Can someone point  me to some detailed documents on this option?


texts: Dictionary.get: Dictionary does not contain key: precipitation

texts:
I am trying to get 3 hourly rainfall data for my region using TRMM/3B42. There seems to be an error but I am unable to find it.
var rain = ee.ImageCollection("TRMM/3B42").select("precipitation")
var startDate = ee.Date('2020-10-01'); // set analysis start time
var endDate = ee.Date('2020-10-31'); // set analysis end time
var region = table
var ntime = ee.Number(endDate.difference(startDate,'hour')).round()
print(ntime)
var TimeList = ee.List.sequence(0, ntime,3).map(function (n) {
  return startDate.advance(n, 'hour').format('YYMMdd:HH');
})

print(TimeList)
var result = region.map(function(feature){
  // map over each month
  var timeSeries = ee.List.sequence(0,ntime).map(function (n){
    // calculate the offset from startDate
    var ini = startDate.advance(n,'hour');
    // advance just one month
    var end = ini.advance(3,'hour');
    // filter and reduce
    var data = rain.filterDate(ini,end).median().reduceRegion({
      reducer: ee.Reducer.mean(),
      geometry: feature.geometry(),
      scale: 30,
      bestEffort: true
    });
    // get the value and check that it has data
    var val = ee.Number(data.get("precipitation"));
    val = ee.Number(ee.Algorithms.If(val,val,-999));
    // return max
    return val;
  });
  // create new dictionary with date strings and values
  var timeDict = ee.Dictionary.fromLists(TimeList,timeSeries);
  // return feature with a timeseries property and results
  return feature.set(timeDict);
});

// print to see if it is doing what we expect...
print(result);


texts: Create bounding polygon from csv with min and max values

texts: I have a CSV file that has 40000 records with minx, miny, maxx, maxy attributes. I want to create a bounding polygon for each record from those values. I have tried using geometry replacer in FME 2016.1 but it is not creating the geometry (with no error given). I have FME, ArcGIS 10.4.1 and Global Mapper 17.2. Any clues on how to proceed?


texts: On a remote sensing project, I'm trying to identify areas that are sand using band math. I know there is an index for vegetation (NDVI). I was wondering if there is an index that calculates for sand. I tried googling it and I couldn't really find anything substantial.


texts:
In 3.2 and now 3.2.1 I get a Python error:

ImportError
cannot import name 'QCoreApplication'

I also see a yellow line highlighted as the problem line:
 from qgis.core import

Any ideas?


texts:
My OGR2OGR command is working very hard and I am kind of satisfied but not as fast as I expected.
What I am doing is Joining a table to a fgdb feature class and save it to another fgdb.
through my mac Activity Monitor, I recognized that it only uses one CPU core.

It does seem like Geotiff format can use multiple cpu cores but ogr2ogr cannot? (or I may be wrong)

If so, please guide me to use all the CPU cores as I wish.


texts: I don't know if anybody has met with the same problem, but it is quite frustrating. As you can see in the picture I have a shapefile with the specific territory and the settlements which have the same custom surface. However, the settlements are levitate randomly (at least for me). I didn't set up any elevation offset or elevation value. Does anyone know a solution for this?


texts:
I would like to interpolate with kriging data points from one shapefile that should fill out the Space of another shapefile i am using as a boundary.

I have set this boundary under Geoprocessing --> Environments --> Raster analysis, as i have understood this should be the best way to both limit the extent of the interpolation as well as force the interpolation to cover the extent of this layer.

When i try to carry out the interpolation, it fails and i get the following error messages regarding :

the Grid IO : 010429,
grid expression : 010067
and variance : 010079.

I have no idea how to fix this. i am sure the data is not corrupted, otherwise it wouldnt show in ArcMap 10.3.

i've tried increasing the cell size for the last error, also to no avail.


texts: Iterate through table to do geometric calculation

texts:
I've got two tables:

tableA holds the objects with it's geometry
tableB holds holds pairs
of two objects (ids, each in a separate column) from table1

Now I want to calculate the concaveHull for the pairs in each row coming from tableB.
The SQL (for one pair only) is quit simple:

SELECT ST_ConcaveHull (ST_Collect(tA.geom),1)
FROM tableA AS tA
WHERE id IN (250,214)

The "WHERE id IN (250,214)" is an example object pair stored in tableB.

How can I do this calculation for each pair from tableB iterative?
With joins or loops? I cannot get it work.


texts: Adding multiple layer on Map Canvas using pyqgis

texts:
I am facing issues on adding Multiple layer in Qgis3.0. I tried below code but its not working. I am unable to detect what wrong since its not giving error. Both Layers are valid, but cant be added simultaneously on canvas. I am using python console within QGIS.

from qgis.core import QgsProject
uri='file:///C:/Test/points.csv?delimiter=,&crs=epsg:4326&xField=Lat&yField=Long'
layer=QgsVectorLayer(uri,'Points','delimitedtext')
vectorLyr=QgsVectorLayer("C:/Test/demand/Demand.shp","BuildingLayer", "ogr")

vectorLyr.isValid()
canvas=QgsMapCanvas()
extent=QgsRectangle()
layers[]
layers=[]
QgsProject.instance().addMapLayer(layer)
#<qgis._core.QgsVectorLayer object at 0x00000000055261F8>
extent.combineExtentWith(layer.extent())
layers.append(layer)
QgsProject.instance().addMapLayer(vectorLyr)
#<qgis._core.QgsVectorLayer object at 0x0000000005526318>
extent.combineExtentWith(vectorLyr.extent())
layers.append(vectorLyr)
canvas.setExtent(extent)
canvas.setLayers(layers)
canvas.show()

Please check the sample data
https://drive.google.com/open?id=1v5riwWlzkXFhN_FGtawcGhBbmLg49yPn


texts:
I am trying to save a GeoJSON file in QGIS as EPSG:4326, but it keeps being saved as CRS84.

EPSG:4326 and CRS84 are the same except CRS84 saves coordinates as long, lat - and EPSG:4326 saves them as lat, long.

When I open the saved file in QGIS it's read as EPSG:4326, but really the file is CRS84. I know this because when I open the GeoJSON file in notepad it's listed as CRS84, and when I load the file in Shapely it's recognized as CRS84.

What's going on here?

I've tried this on both QGIS 3.6.3 and QGIS 3.4.8 with the same result.


texts: I previously downloaded a file named modis_lst.act from MODIS land surface temperature page somewhere. It seems to be a pallete (or colormap) thing. How to parse and use this .act file? Or, in other words, is there any pallette for MODIS products?


texts: Where do services that compute travel time get traffic data?

texts: Recently, I have been studying routing services that calculate travel time and distance. And I had a question, where do these services get traffic data from. I found a lot of information about Google. And if Google can take this information from applications, then where do other services get the data from? Perhaps they use cellular communications or mobile operators or combine some other data.


texts: ET Geowizards "configuration system failed to initialize Open Main Dialog - Click" error

texts:
The following error appears when I run any ET Geowizard extension:
"Configuration system failed to initialize Open Main Dialog - Click".
I am using ArcGIS 10.1 on Windows 7 Professional, SP1.
The ET GeoWizard version is 10.2

I have uninstalled and re-installed ET GeoWizard several times with the same error.  I have used the ET GeoWizard Uninstall tool as well with no success.

There is a fleeting mention to this error on an unrelated post but the proposed solution is unclear: it suggests removing a file from a folder which is not on my system, nor does it explain what it does or why the solution works.

Any thoughts would be appreciated.
Thanks
FH


texts:
While selecting the GRASS algorithms 'Processing algorithm: v.to.points - Create points along input lines'

The error message came up:

  The specified GRASS GIS 7 folder does not contain a valid set of GRASS
  GIS 7 modules. Please, go to the Processing settings dialog, and check
  that the GRASS GIS 7 folder is correctly configured.

Please suggest me the solution to run the GRASS algorithms?


texts: How to optimize the WFS service's CQL and ECQL?

texts:
I am using  wfs cql filters to get the attribute data but when the cql filter selects a large dataset say 1000+ point data the response time is large.

How can I optimize cql filter ?

The following are my guess

1)if there is option to skip the loading the geometry column then it might speed up the search process and also the network load will be reduced.

2)Also i don't know which index CQL filter is used ? Can i explicitly  use b-tree to make it faster?


texts: How to Convert Long/Lat from Excel into shapefile?

texts:
Possible Duplicate:
  How can I convert an excel file with x, y columns to a shapefile?

  Possible duplicate,
  How can I convert an excel file with x, y columns to a shapefile?

How do I convert (the attached image) from long/lats from my spreadsheet to drop into my shapefile for the Well locations?  I have Editor 10.0.  I never had to do this conversion before, so any help is appreciated.  The lats/long is located Eastern Ohio.  I know I have to do something with X/Y, but am newbie with this conversion.

Thank You...


texts: Label point according to cartographic representation position instead of geometry

texts:
I have set up a cartographic representation on a point feature class, which simply offsets the point. I would like to label the point at the representation, not at its physical location. I had a look at Moving cartographic representation of labels in ArcMap? but I am not editing the representations at all.

The purple points show the physical location, with the purple labels at default settings. The black points are the representations which have been offset, while the black labels show where I would like the labels to be.

Currently, I am showing the black labels on a different copy of the layer, with symbology turned off and the labels offset through Maplex. Is there a way to link the label placement with the cartographic representation, and not the physical features?


texts: PostGIS Raster layers not rendering in QGIS 3.14

texts:
I am having an issue with the rendering of PostGIS raster layers using QGIS 3.14
I have a PostGIS DB with multiple rasters and on QGIS 3.10 these are displaying as they should.
When trying to open the raster I am getting that the raster has loaded, as it appears in the Layers panel correctly, but it is not visible within my workspace, it just doesn't render on the screen
Is there anyway to correct this, has a setting been changed regarding this, or is this a regression when using PostGIS raster layers with QGIS 3.14
Im running Im running PostGRES 9.6 with QGIS 3.14.16 on Windows 10


texts: Determine if ArcSDE service or direct connect

texts:
Does anybody knows if there is the ability to check a layers datasource, if it is an direct connect to a database or if an ArcSDE service is used?

For both the esriDataSourcesGDB.SdeWorkspaceFactory is used. Maybe there is a interface?


texts: How to iterate through multiple raster based in a filename dates to calculate an index

texts:
I have a list of landsat 8 rasters in tif format and i want to calculate an index with python for each escene, using red and NIR bands.

The individual (simplified) script is:

from osgeo import gdal
from osgeo.gdalnumeric import *
from osgeo.gdalconst import *
import numpy as np
import os
import glob
import sys

L8_red = 'Z:/bands/LC08_L1TP_233087_20180325_20180404_01_T1_sr_band4.tif'
L8_nir = 'Z:/bands/LC08_L1TP_233087_20180325_20180404_01_T1_sr_band5.tif'

outFile = "out.tif"

# open
redds = gdal.Open(L8_red)
nirds = gdal.Open(L8_nir)

redband = redds.GetRasterBand(1)
nirband = nirds.GetRasterBand(1)

red = redband.ReadAsArray()
nir = nirband.ReadAsArray()

red = red.astype(np.float64)
nir = nir.astype(np.float64)

#The actual calculation
def SR_pqa(red, nir):
    SR = (nir / red)
    return SR

SR = SR_pqa(red, nir)

#Write the out file
driver = gdal.GetDriverByName("GTiff")
dsOut = driver.Create("out.tif", redds.RasterXSize, redds.RasterYSize, 1, gdal.GDT_Float32)
CopyDatasetInfo(redds,dsOut)
bandOut=dsOut.GetRasterBand(1)
BandWriteArray(bandOut, SR)

I need to do the same with all the scenes in the folder.

They match until the date (LC08_L1TP_233087_*_01_T1_sr_bandX.tif).

There's 50 different dates in the path, so is very slow to do individualy in QGIS raster calculator.


texts: Measuring / calculating curvature of linestring using QGIS?

texts:
How can I measure/calculate the curvature of a linestring?

I need just a boolean value: is curved or is not curved.

At the moment, I don't find a working strategy for that.


texts: GeoServer installed in external server - error to access to shapefile

texts:
I am trying to publish a web map using GeoServer. In my PC everything works fine. I have the GeoServer installed and through http://localhost:8080/geoserver/ I access my data.
However I require to publish my web maps, so the Geoserver was installed in an external server. I have access from my computer using credentials. Inside this GeoServer I import my data (shapefiles). However when I try to see the data using OpenLayers this happens:

What can I do?


texts: Manipulating map with zoomed city in QGIS?

texts:
I would like to make a shapefile where the the districts of London are zoomed. The shapefile should look like this: https://community.qlik.com/legacyfs/online/159644_ua_areas.PNG

The map with UK and the zoomed part of London must be saved as an shapefile  (not imagefile like JPG, PNG, SVG , TIFF etc.)

Is it possible to do this in QGIS ?


texts: Using openlayers to render UK National Grid maps

texts:
Is there a way I can use Openlayers with a 1 pixel = 1m/2m/4m OS Grid map at high resolutions (i.e. OS Street View), but switching to a Mercator projection when you zoom out (i.e. for Google Maps or OSM), but have markers and/or vector overlays reprojected with the change of zoom?

As OS grid and OS Street view is based on powers of powers of 10, I've split it into 250 pixel tiles, rather than the 256 pixels used for most web maps. I have a folder structure like:

xy/xy/xy/xy-z.png

where each folder is a power of 10 grid square, i.e. each xy represents hundreds of km, tens of km, km, and position within the 1km square respectively.

There are 4 zoom levels in the bottom folder, 1 being the whole 1km square, 2 is 4 500m squares and 4 is 16 250m squares.


texts: Connect symbol layer from Layers Panel to function

texts:
If I create a simple function:

def print_me():
    print 'Clicked!'

and I switch off the symbology for Elephant as shown below:

I would like the function to run. What would be ideal is if we can determine whether the symbology is checked or not so that the function can be expanded:

def print_me(checked):
    if checked:
        print 'On!'
    else:
        print 'Off!'

Is it possible to connect the signal emitted from a style layer (from the Layers Panel) to a function and determine if it is checked or not?

Edit:

I used the following to identify the layer's renderer state but can't seem to find a way to connect this to the function:

layer = iface.activeLayer()
for x in layer.rendererV2().categories():
    print x.renderState()

>>>True
>>>True
>>>False
>>>True


texts: Recounting lines which are crossing rastercell multiple times using Spatial Join in ArcGIS for Desktop?

texts:
I am performing a Spatial Join in ArcGIS.

Is there any possibility where i can recount a line that crosses a square multiple times?

With the normal way of the Spatial Join i get a Joincount where the line is just count as one even if the line crosses muliple times.


texts:
I am trying to import a shapefile into my database, but I got a error message when I typed the following command:

shp2pgsql -I -s 0 /home/IC/Ferramenta_carga/shp/tl_2016_us_state/tl_2016_us_state.shp state | psql -U postgres -d my_database

Error message:

ERROR: syntax error ar or near "["
LINE 1: [shp2pgsql-core.c:FindPolygons:441] FindPolygons[0]: allocat...

The syntax error appears as much as the number of geometries inside the shapefile.

What could be causing this?


texts: Problem with matplotlib when installing QGIS on mac

texts:
I have matplotlib installed on a Mac (Mavericks) via pip, which means the matplotlib files get installed under /System/Library/...

I tried installing the most recent version of QGIS, and the install fails because it can't find matplotlib. I'm thinking this is because I didn't use easy_install, which appears to put packages instead under /Library/...

Is there an easy way to tell QGIS to look for packages under /System/Library - is it merely a matter of setting some environment variable that QGIS looks at ?

thanks !

Update:

I'm installing QGIS from the .dmg package provided at kyngchaos.com
the error message started when I double click the .dmg to install it. I get a popup complaining that matplotlib is not installed even though it is installed and command line python can see it.

I believe (based on other notes at kyngchaos.com) that the difference is because of my use of python.org python and pip instead of system python, and the different place that libraries are placed in.


texts: How to specify field name in raster to feature conversion tool or intersect tool?

texts:
What I want to do :

input: raster file, polygon feature layer

process:

Convert raster to polygon using IConversionOp.RasterDataToPolygonFeatureData Method
Intersect resultant polygon feature class and input feature layer using Intersect tool from my c# code.

I am doing these two steps perfectly. But I need some specific field from intersected layer for next steps. So it would be helpful if I can specify field names in intersected layer. But I could not find any way to specify field names.

It would be helpful  if anyone can give me some idea how to specify some field names. If there is any process to take fields from one feature class and not from another feature class in intersect tool, that will also solve my problem. Or when I am converting a raster to a feature class, can I specify the value field name? Or is there any rule for value field name in the newly created feature class from the raster layer. By default the field of this value field in feature class is "GRIDCODE".


texts: Selecting area from raster layer as new layer

texts:
In QGIS 3.4.6, I tried to select an area from a raster map, to use the cropped area as a new layer or export the cropped area as a GeoTIFF.
I'm trying to use "Raster/Extraction/Clip Raster by Extent", but even with default settings, it fails.
This should be one of the most basic functionality, but I havent found examples or doku on how to extract/crop raster layers with this menu option.
"Clipping extent" was created by using "Select Extent from canvas".
But, even when using the dafault seetings from the dialogue, the gdal tranformation fails.
If I run the gdal code in the commandline, GDAL fails.
FAILURE: No target dataset specified
Processing algorithm…
Algorithm 'Clip raster by extent' starting…
Input parameters:
{ 'DATA_TYPE' : 0, 'INPUT' : 'type=xyz&url=https://mt1.google.com/vt/lyrs%3Ds%26x%3D%7Bx%7D%26y%3D%7By%7D%26z%3D%7Bz%7D&zmax=18&zmin=0', 'NODATA' : None, 'OPTIONS' : 'COMPRESS=JPEG|JPEG_QUALITY=75', 'OUTPUT' : '/home/vmuser/QA_DOKS/tester.tif', 'PROJWIN' : '952408.1511424138,960335.9112865862,7074131.045407576,7079189.42967867 [EPSG:3857]' }GDAL command:
gdal_translate -projwin 952408.1511424138 7079189.42967867 960335.9112865862 7074131.045407576 -of GTiff -co COMPRESS=JPEG -co JPEG_QUALITY=75 type=xyz&url=https://mt1.google.com/vt/lyrs%3Ds%26x%3D%7Bx%7D%26y%3D%7By%7D%26z%3D%7Bz%7D&zmax=18&zmin=0 /home/vmuser/QA_DOKS/tester.tif
GDAL command output:
/bin/sh: 1: /home/vmuser/QA_DOKS/tester.tif: not foundFAILURE: No target dataset specified.Usage: gdal_translate [--help-general] [--long-usage][-ot {Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/CInt16/CInt32/CFloat32/CFloat64}] [-strict][-of format] [-b band] [-mask band] [-expand {gray|rgb|rgba}][-outsize xsize[%]|0 ysize[%]|0] [-tr xres yres][-r {nearest,bilinear,cubic,cubicspline,lanczos,average,mode}][-unscale] [-scale[_bn] [src_min src_max [dst_min dst_max]]]* [-exponent[_bn] exp_val]*[-srcwin xoff yoff xsize ysize] [-epo] [-eco][-projwin ulx uly lrx lry] [-projwin_srs srs_def][-a_srs srs_def] [-a_ullr ulx uly lrx lry] [-a_nodata value][-a_scale value] [-a_offset value][-gcp pixel line easting northing [elevation]]*|-colorinterp{_bn} {red|green|blue|alpha|gray|undefined}]|-colorinterp {red|green|blue|alpha|gray|undefined},...][-mo "META-TAG=VALUE"]* [-q] [-sds][-co "NAME=VALUE"]* [-stats] [-norat][-oo NAME=VALUE]*src_dataset dst_datasetExecution completed in 0.13 seconds
Results:
{'OUTPUT': '/home/vmuser/QA_DOKS/tester.tif'}Loading resulting layers
The following layers were not correctly generated.

/home/vmuser/QA_DOKS/tester.tif

You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm.


texts: Combine checkbox with splitpanel widget in Google Earth Engine

texts:
I am trying to combine the checkbox widget with splitpanel widget so that everytime the checkbox is checked, GEE will split into two panels, and when unchecked, GEE will go back to one panel. However, it seems that it can split into two panels, but when I try to uncheck to switch back to one panel, there is the error:
Widgets can only be added to one panel at a time.

Is there anyway to make this work?

Here is my code:

var checkbox = ui.Checkbox('Show SRTM layer', false);

checkbox.onChange(function(checked) {
  // Shows or hides the first map layer based on the checkbox's value.
  ui.root.widgets().reset([splitPanel]);
});

Map.addLayer(ee.Image('CGIAR/SRTM90_V4'));
print(checkbox);

var image = ee.Image('LANDSAT/LC08/C01/T1_RT_TOA/LC08_045033_20171011');
// Make another map and add a color-NIR composite to it.
var linkedMap = ui.Map();
linkedMap.addLayer(image, {bands: ['B5', 'B4', 'B3'], max: 0.3}, 'color-NIR');
// Add a thermal image to the map.
linkedMap.addLayer(image, {
  bands: ['B11'],
  min: 290,
  max: 310,
  palette: ['gray', 'white', 'yellow', 'red']
}, 'Thermal');

// Link the default Map to the other map.
var linker = ui.Map.Linker([ui.root.widgets().get(0), linkedMap]);

var splitPanel = ui.SplitPanel({
  firstPanel: linker.get(0),
  secondPanel: linker.get(1),
  orientation: 'horizontal',
  wipe: false,
});


texts: Add-In Combo Box: populate with specific field's values and pass selection to select by attribute

texts:
I checked Passing Selection from Combo Box into Definition Query using Python AddIn?, but I am still stuck on code/syntax.

I created a simple add-in with a button that clips and exports tax parcels within a selected feature from the a grid. However, I want to include a combo box to prompt the user to enter or select the grid number rather than use the mouse to select from the data frame. It should accept user input in a drop-down bar listing the features for the GRID field in the grid layer and pass it as a definition query into 'select by attributes'. I'm still new to Python and am stuck on the selection process.

Script listed below:

import arcpy
import pythonaddins

log = file('//geodata/gisdata/Workspace/GIS/Rachel/Python_AddIn/Taddin4/Install/AddIn.log', 'a')
mxd = arcpy.mapping.MapDocument('current')
clipLayer = arcpy.mapping.Layer('Tax Map Small Grid')
gridCursor = arcpy.SearchCursor(clipLayer)
gridNums = []
for row in gridCursor:
    gridNums.append(row.GRID)

class Taddin4Box(object):
    """Implementation for Taddin4_addin.combobox (ComboBox)"""
    def __init__(self):
        self.items = sorted(gridNums)
        self.editable = True
        self.enabled = True
        self.dropdownWidth = 'WWWWWW'
        self.width = 'WWWWWW'
    def onSelChange(self, selection):
        clipLayer.definitionQuery = '"GRID"' + "=" + "'" + selection + "'"
        print >>log, 'About to select...'
        N = arcpy.SelectLayerByAttribute_management(clipLayer, "NEW_SELECTION", clipLayer.definitionQuery)
        print >>log, 'Selection completed...'
        return N
        arcpy.RefreshActiveView()
        pass
    def onEditChange(self, text):
        pass
    def onFocus(self, focused):
        pass
    def onEnter(self):
        pass
    def refresh(self):
        pass

class Taddin4button(object):
    """Implementation for Taddin4_addin.button (Button)"""
    def __init__(self):
        self.enabled = True
        self.checked = False
    def onClick(self):
        outpath = '//geodata/gisdata/Workspace/GIS/Rachel/Python_AddIn/Taddin4/Install/CAD/Shapefiles/'
        CADpath = '//geodata/gisdata/Workspace/GIS/Rachel/Python_AddIn/Taddin4/Install/CAD/'
        parcelsLayer = arcpy.mapping.Layer('Tax Parcels City')
        for row in gridCursor:
            gridField = row.getValue("GRID")
            num = gridField.replace('-','')
            print >>log, 'GRID number is: ' + gridField
        clipFC = 'TaxGrid'+num
        arcpy.Clip_analysis(parcelsLayer, clipLayer, outpath + clipFC)
        arcpy.ExportCAD_conversion(clipFC, "DWG_R2013", CADpath+gridField+'.dwg', "IGNORE_FILENAMES_IN_TABLES", "", "")
        print >>log, 'Done.'
        arcpy.SelectLayerByAttribute_management(clipLayer, "CLEAR_SELECTION")
        log.close()
        pass


texts: PyQGIS: Signal for plugin uninstallation

texts:
Is it possible to listen for plugin removal before the plugin is removed?
We save global settings as user interacts with the plugin, but want to reset plugin specific global settings when user uninstalls the plugin.


texts: Nominatim Installation Error: Importing and Index OSM data

texts:
I'm new to GIS and OSM. I've successfully installed OSM locally and now I want to add Nominatim to the mix. I've been following the installation instructions exactly from here: http://wiki.openstreetmap.org/wiki/Nominatim/Installation.

I run into an error when I try to import and index the osm data. The command the guide uses to do this goes as follows:

   sudo ./utils/setup.php --osm-file <your planet file> --all [--osm2pgsql-cache 18000] 2>&1 | tee setup.log

I get a permissions error that I'm not sure how to fix and also it doesn't seem to like the cache specification. This is the error:

    tee: setup.log: Permission Denied
    setup.php: Unknown option '18000]'


texts:
I tried the example for ST_OrientedEnvelope given in PostGIS website but that failed. This function is failing for my table geometry column also.

SELECT ST_AsText(ST_OrientedEnvelope('MULTIPOINT ((0 0), (-1 -1), (3 2))'));

Getting the error - ERROR:  function st_orientedenvelope(unknown) does not exist.

Postgis version - 2.5.1

What could be a possible reason?


texts: Creating custom polygon symbol using ArcGIS Desktop?

texts:
How can I create a custom polygon symbol? I already played with layering the symbol levels to no avail. I think that I need something a little more advanced than that.

I'd Like to get something that looks just like this.

I have also tried inserting this JPEG for the symbol but it creates a mosaic of images rather than one.

The outer edge represents the edge of a well pad. The circle in the center is supposed to represent a well head.


texts:
Sorry this is a novice question. I am completely new to the GIS domain and inherited a parser that expects a .bil file to get elevation at latlon points.

From what little documentation there was, it seems like the USGS NED database has all the information I need, but it now only provides the 1deg grid files in ArcGrid, GridFloat, or IMG formats.

I tried using GDAL and QGIS to convert the data for the parser but whenever I query it for elevation, it gives me a long int.

EX: at (39.5, -104.5), if I query from https://nationalmap.gov/epqs/ it's 6207.71ft, my predecessor ingested data from here and returns 6220ft (not exactly the same but reasonable difference). However when I convert GridFloat to BIL then query, I get 1156302165. I have no idea what this number is or means. The parser thinks it's elevation.

My questions are:

Did NED used to provide BIL format and recently changed? My predecessor did not leave notes on where to get files and did not even have example files from when he loaded data. And this was only 1 year ago.
Both GDAL and QGIS tools seemed to convert successfully, I got BIL files but obviously something is wrong with either my parser or the conversion.

I've been reading a lot from this site as well as various gov sites but the only solution I can come to is to update the parser to read one of the 3 provided formats and hope it works.

I am asking for insight from experts since I am absolutely brand new to this field and it's data.


texts: Receiving corresponding OSM raster tiles of .tfw files

texts:
I have a bunch of handdrawn map plans, referenced with .tfw files, and I need their corresponding geographical map of that exact part of the world as a raster image to compare to.

With the solutions that I found you only get to define starting x and y coordinates and the zoom level of the map your are referring to, but that isn't accurate enough for me. What I need is to define a bounding box via longitude and latitude and get only that as a raster image.

Is there a library, preferably in python, that offers this kind of functionality?

to illustrate, the function would be something like:

writeOSMRaster("C:/*/*/*.png",[11.189816154513968, 11.193589850095204, 53.42800434704876, 53.4292907361823])


texts: QGIS: special character in system user name (äöü) not showing correctly in global variable

texts:
My user name on the system (Windows Server 2016) has special characters in it, such as äöü. When opening QGIS, the global variable user_full_name does not display the characters correctly, but makes ? in boxes instead (see image).
I display the user name in a map layout, so it should be shown correctly.

I found a lot of resources online about characters not showing fine in database tables or shapefiles, but nothing concerning the global variables. I guess, the solution is simple, but I cannot figure it out.


texts: How to fix hasValues(x) is not TRUE error in raster package?

texts:
I am working with raster files that I uploaded from my system files/folders into R (having downloaded the files from Sentinel-2A). I am attempting to use the focal function from the raster package.

library(raster)
> ss <- brick("2017_05_16_B02_clip.tif")#load raster file using brick()
m=matrix(c(1, 2, 1, 2, 3, 2, 1, 2, 1), ncol=3, nrow=3)
focal(raster(ss), fun=mean, w=m)# where ss is a RasterBrick that I convert to RasterLayer with the subfunction raster()

However, each time I try, I get the following error message:

  hasValues(x) is not TRUE

There are no NA values in the RasterBrick and no values out of range. Here are some of the statistis for the raster file:

>cellStats(ss, min)
[1] 702
>cellStats(ss, max)
[1] 1125
>cellStats(ss,mean)
[1] 821.9172

And the general information on the RasterLayer is:

class       : RasterLayer
dimensions  : 50, 50, 2500  (nrow, ncol, ncell)
resolution  : 10, 10  (x, y)
extent      : 599500, 6e+05, 5027500, 5028000  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=utm +zone=18 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0