texts: Zooming to WMS layer after CQL filter in OpenLayers?

texts:
I created a layer that contains points and I added it to a map as WMS layer in OpenLayers. I did a CQL filter and it works but I'd like to zoom to the selected point when I worked with getextent or getdataextent it doesn't zoom to the right place. It missed with a few Km. Here is my the code of filter:

function filterNom(){
            var filterType ="cql";
            var filter = document.getElementById('batima').value;
            // by default, reset all filters
            var filterParams = {cql_filter: null};
            if (OpenLayers.String.trim(filter) != "") {
                if (filterType == "cql")
                    filterParams["cql_filter"] = "batiment='"+filter+"'";

            }
            // merge the new filter definitions
            wfs_layer.mergeNewParams(filterParams);
            var bounds =  new OpenLayers.Bounds
            bounds = wfs_layer.getExtent()
            map.setCenter(wfs_layer.getExtent(),18);
            var center = map.getCenter();
            center.transform(new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:900913"));
            alert(center.toString());
}

and here is the code to add the WMS layer:

  wfs_layer = new OpenLayers.Layer.WMS("Patrimoines",
        "http:// localhost/geoserver/cite/wms",
        {layers: 'cite:patrimoine' , transparent: true },
        {isBaseLayer: false, opacity: 1, singleTile: true, visibility: true,
         projection: 'EPSG:900913'});


texts: Displaying row and column of selected pixel in QGIS?

texts:
In QGIS, I can use the identify tool to get the pixel value and the coordinate for a selected pixel, I also have a coordinate capture tool to display the selected pixel in another coordinate system.

But how can I display the row/column of this particular pixel, which x and y of the total dimension this pixel is located at?


texts:
I am in the process of shifting my raster calculations over from manually entering them into Raster Calculator to executing them in a Python script. I am curious if I can execute equations such as the following in Map Algebra, which is Python friendly:

.00001 * Power("RasterLayer1",2) - 0.0145 * "RasterLayer1" + 79.16

For some background, there will always be one raster layer that I want to perform computations with in the script, as opposed to numerous.


texts: Calculating GPS uncertainty as a function of general position and time

texts:
Is it possible to calculate the uncertainty in a GPS measurement at a given point at a given time by taking into account the number and positioning of the GPS satellites overhead?
People throw around general numbers (plus/minus 5m is common), but it seems to me it would clearly be a function of the two factors mentioned above. Why does nobody ever do this analysis?
There are also other, separate factors that introduce a variable amount of uncertainty, such as time delay for signal propagation in the ionosphere. Is this correction (and its uncertainty) similarly known and charted by any agency? Could this be included in an uncertainty analysis?


texts:
I'm using QGIS.

How can I create a shapefile consisting of a grid 0.5° latitude and 1° longitude in size?


texts:
I Installed the 1.8.0v on Win7 profesional SP1 system (as administrator) and I take this message: "The procedure entry point sqlite3_open_v2 could not be lovated in the dynamic library sqlite3.dll".
QGIS 1.7 was working.
Help


texts: Generate unique ID upon creating a feature?

texts:
Looking for a way to generate a unique Global ID within a feature set when a new feature is created.  For example, every time a sewer manhole is added, we need to generate a new unique Global ID that will remain with that feature throughout the life of the data set.  I've looked at having a script tool but not sure that is the best approach.  Ideally we want to automate this function so it runs in the background each time a new sewer feature is created.

We are using ArcGIS platform.


texts: Feature Layer Information not showing in SQL table

texts:
I have a layer in ArcMap to which data is added via my platform. When the data is added I can see the added feature information by either right clicking on the layer open in arcmap and opening the attributes table to see the feature, or else by going to the SQL database to which the layer is connected and locating the information in the respectively linked table.

Up until end of last week this was working fine, however I ran some tests to check some performance issues by renaming the tables in SQL that were linked and creating new empty table in their place with the old names to preserve the links. When data was added to ArcMap like this all still worked fine as the feature additions were reflected in the new tables.

However I then decided to revert back by deleting the new tables and renaming back the old tables to preserve the links, and this is where the 'issue' occurred. Adding a new feature to the layer will add it on arcmap and will make it visible in the arcmap layer attribute table, however once I go to the SQL table it isn't visible there. I would assume that if there was an issue with storing the new feature it wouldn't be shown in the ArcMap attribute table either. I also restarted both SQL Server as well as ArcGIS Server but the results are still the same.

Is there any reason why data seems to be added but isn't being displayed in the SQL table?


texts: New layer added to directory doesn't show on GeoServer Layers

texts: I am learning to use GeoServer. I created shp store which is linked to a directory in my computer's C drive. The shps that were originally in the directory appears in Layers fine. But when I added a new shp, it doesn't show in Layers. I've tried restarting GeoServerand (using stop and start GeoServer) and resaving the store, but neither is working.


texts:
I'm working on a standalone script where I need to import arcpy. This usually takes close to 10 seconds, which is a little more than ideal. I'm only using a few Data Management tools and some base methods, so I was thinking it might be faster to only load the modules I'm using. I can see all the .py files in C:\Program Files\ArcGIS\Desktop10.1\arcpy\arcpy, but I'm not sure which ones to load. These are the methods I'm using:

Exists
Delete_management
CreateTable_management
AddField_management
InsertCursor
CreateRelationshipClass_management

Any help will be much appreciated!


texts: Loading a shapefile and image using DotSpatial

texts:
I am using DotSpatial 1.7 in my win form app. I have an image (original image) downloaded from  Universal Map Downloder and then loaded this file with a shapefile in QGIS and then georeferencing the image in QGIS using shapefile to produce an image that matches with shapefile (modified image).

Now:
I used code below to load two files in my app (shapefile and original image) and it works well and I can select the shapefile:

private void Form1_Load(object sender, EventArgs e)
{
    map1.AddLayer(@"C:\originalimage.png");
    map1.AddLayer(@"C:\shapefile.shp");

    MapPolygonLayer polygonLayer = default(MapPolygonLayer);
    polygonLayer = (MapPolygonLayer)map1.Layers[1];

    polygonLayer.Symbolizer = new PolygonSymbolizer(Color.FromArgb(0, Color.White), Color.DeepSkyBlue);

    map1.FunctionMode = FunctionMode.Select;
}

But, the code below:

private void Form1_Load(object sender, EventArgs e)
{
    //map1.AddLayer(@"C:\originalimage.png");
    map1.AddLayer(@"C:\modifiedimage.tiff");
    map1.AddLayer(@"C:\shapefile.shp");

    MapPolygonLayer polygonLayer = default(MapPolygonLayer);
    polygonLayer = (MapPolygonLayer)map1.Layers[1];

    polygonLayer.Symbolizer = new PolygonSymbolizer(Color.FromArgb(0, Color.White), Color.DeepSkyBlue);

    map1.FunctionMode = FunctionMode.Select;
}

I can not select the shapefile (modified image is on the shapefile ).
I also convert the .tiff to .png, but it is on the shapefile.

Any idea/solution?


texts:
I have the raster map of monthly precipitation of some years (download from CGIAR http://www.cgiar-csi.org/data/uea-cru-ts-v3-10-01-historic-climate-database) and I need the mean values on a specific area (polygonal shapefile). I tried with zonal statistic but I had not results, the attribute table was empty.

Is it possible that my region is too small for do this?

I'm a bit new in QGIS world.


texts:
I have created a few toolbars all of them have their own menu item in the main menu of QGIS.
Now I want to have them as sub-menus in one menu item, I managed to check if my menu item exists like so.

self.menu = self.iface.mainWindow().findChild( QMenu, '&MyMenu' )

# If the menu does not exist, create it!
if not self.menu:
   self.menu = QMenu( '&MyMenu', self.iface.mainWindow().menuBar() )
   self.menu.setObjectName( '&MyMenu' )
   actions = self.iface.mainWindow().menuBar().actions()
   lastAction = actions[-1]
   self.iface.mainWindow().menuBar().insertMenu( lastAction, self.menu )

But now when the menu exists already i need to check if a sub-menu already exists of if i have to create it.
I tried something like this but it still create the submenu again if the plugin is reloaded.

self.menuStrasse = self.menu.findChild(QMenu, '&MySubMenu')

if not self.menuStrasse:
   self.menuStrasse = self.menu.addMenu( "MySubMenu")

self.menuStrasse.addActions( [self.action1,self.action2])

Can someone point me in the right direction?


texts: Switching to a different projection based on zoom level

texts:
I have a map on my Geoserver, which I am displaying via wms and Openlayers. I am using a projection that is optimal for the whole area. However, when zooming in I would like to switch to a different projection which has proved to be best for a particular locality.

How can I achieve this? Any examples out there?


texts:
I'm trying to summarize some information in a map layout in QGIS controlled by an atlas. I have parks, and connected to that I have objects within these park (points, lines and polygons).
I want a list of all objects in the park (the specific one in the atlas window) on my layout and also some summary-statistics (e.g. the entire area of all polygon objects in my park).
So far, I've created a virtual layer combining all objects per park and use that virtual layer as a relational child to the park to display those objects with my atlas function. The same I did with a 'summary-virtual-table'.
Now the problem: if the area of one of the polygon-objects change, I'd usually work with a virtual field, so changes in the geometry automatically reflect in the 'area' column. But virtual fields can't be used in virtual layers, as far as I understand. So, with static fields I'd need to recalculate the area every time something changes and then also recreate the virtual layer.
Is there another way to deal with this, I might not be aware of?


texts: How to assign raster values to lines with PyQGIS functionalities?

texts:
I would like to assign the average of all raster pixels laying under a vector line as an attribute to the vector line. So the mean of the grey/white pixels to each of the red line segments in the following image:

I have found solutions to assign raster values to points and polygons link1 link2 link3, but not for lines. Here what I have tested so far:

To buffer the lines, calculate zonal
statistics per buffer segment and join the attributes by
location with the original lines. This seems quiet
time-consuming.
To convert each pixel to a point and
    assign its value to the closest line using v.distance . Here, I
    haven't figures out, how to update the distance to a 'dist' column
    of my line layer. I will open a new question for this (link to
    question).
To apply the GRASS module v.rast.stats. With
    the following command, some values from the raster map were attached
    to the red lines. However this update only worked for a limited
    number of lines (yellow lines in image). I don't know why the raster
    information is not updated to all lines.

processing.runalg('grass7:v.rast.stats',
                 {"map": red_lines,
                 "raster": rlayer,
                 "column_prefix": "ucm",
                 "method": 'median',
                 "GRASS_REGION_PARAMETER": "%f,%f,%f,%f" % (xmin, xmax, ymin, ymax),
                 "GRASS_OUTPUT_TYPE_PARAMETER":3,
                 "output": red_lines_update})

My main question is if I have overseen any more straight-forward way to solve this.


texts: Define spatial reference system and reproject CleanTopo2 raster?

texts:
I would like to use the CleanTopo2 raster from http://shadedrelief.com/ to generate a hillshade for a main map of the conterminous United States and inset maps of Alaska and Hawaii (plus portions of bordering and nearby countries within the map extent of each). However, when I try to project the raster and other map layers with an Albers projection, the vector layers look fine but the raster does not align with them. I initially thought that maybe I need to correct how the CleanTopo2's SRS is initially defined before reprojecting it, but I'm not sure if that is the only thing causing the issue since the CleanTopo2 and other layers initially align just fine with a WGS84 projection (and with a custom projection applied to the raster). I first created a custom projection based on Data_Info.txt file that came with the CleanTopo2 dataset--the text file contains the following information:

Projection: Plate Carree aka Geographic or "LatLong"
Earth ellipsoid: Sphere, radius 6370997 m
Datum: WGS84
Extent: 180 West to 180 East, 90 North to 90 South
Size: 10,800 height samples wide x 5,400 high
Resolution: 2-arc minute (about 3.7 km/degree)
Elevation range: -10,701m to 8,248m

I also tried simply defining the projection as WGS84 (ESPG:4326). I'm not 100% sure that I defined the custom projection correctly but both methods that I used to define the CleanTopo2 projection (i.e. custom projection and ESPG:4326) display the raster and other shapefiles (containing an ESPG: 4326) aligned.

However, when I next try to reproject the CleanTopo2 and other layers with an Albers projection (as a first step...I will need to reproject everything again with different projections for Alaska and Hawaii inset maps), the global shapefiles project fine but the raster gets extensively sliced up (see attached image) and doesn't align with the other shapefile layers at all. Can anyone please help me figure out how I can get this raster to project correctly and align with the other projected shapefile layers? I've tried to figure this out for a while but am really stumped.


texts: Exporting Nodes and Attributes with new CRS

texts: I am new to QGIS and having trouble exporting. I loaded a shapefile (.shp, .shx, .prj, .dbf) and displayed it on QGIS, which worked fine. The latitude and longitude were not correct, so I chose the .prj as the CRS and it updated to correct lat/long. Only now when I export the geometry to a CSV file, the updated coordinates do not come with it and I get the old coordinates, which won't work as I am trying to get the CSV's into a map on Tableau.


texts: Open source conversion of shapefile to ArcGIS Server JSON

texts:
Are there any open source command-line or python tools available to convert a shapefile (or other esri datasource) to ArcGIS Server JSON?

I'd like something that emulates the ArcGIS Features to JSON tool.

Alternatively, a tool to convert standard GeoJSON to ArcGIS Server JSON would also work, but I haven't been able to find one of those either.

My ultimate goal is to convert a shapefile to ArcGIS Server geojson, then POST that to an ArcGIS Service endpoint.


texts: Validation points for supervise classification

texts:
I have undertaken supervised classification (maximum likelihood) and planning to survey the ground to validate the output.

How many validation points do I need to take?

The raster is a landsat tile and I have 8 categories for classification


texts: QGIS OTB Machine Learning algorithms do not create output

texts:
I am attempting to calculate and save an image statistics file on a landsat 8 scene. When attempting the virtual raster and separate band files no output is created:

2016-04-01T16:26:13 0   OTB execution command
            C:\OSGeo4W64\bin\otbcli_ComputeImagesStatistics
            -il
            "C:\Users\Rion Lerm\Desktop\Bulk Order 628994\L8 OLI_TIRS\2015-07-16\reprojectedToWgs84\PAN_LC81680772015197LGN00_B5.TIF " "C:\Users\Rion Lerm\Desktop\Bulk Order 628994\L8 OLI_TIRS\2015-07-16\reprojectedToWgs84\PAN_LC81680772015197LGN00_B4.TIF " "C:\Users\Rion Lerm\Desktop\Bulk Order 628994\L8 OLI_TIRS\2015-07-16\reprojectedToWgs84\PAN_LC81680772015197LGN00_B3.TIF " "C:\Users\Rion Lerm\Desktop\Bulk Order 628994\L8 OLI_TIRS\2015-07-16\reprojectedToWgs84\PAN_LC81680772015197LGN00_B2.TIF "
            -bv
            0
            -out
            "C:/Users/Rion Lerm/Desktop/olifantsRiver_scp_classifies/otb_trainingClassifier/image_stats_bands2to5"
2016-04-01T16:26:13 0   OTB execution console output

...and then no output?

Attempted kmeans unsupervised via OTB (orfeo) and the following error appeared (QGIS 2.14). I performed it on a virtual raster composed of various landsat 8 bands:

2016-04-08T10:23:01    0   OTB execution command
            C:\OSGeo4W64\bin\otbcli_KMeansClassification
            -in
            "C:\Users\Rion Lerm\Desktop\Bulk_Order628994\L8_OLI_TIRS\2015-07-16\reprojectedToWgs84\landsat_projectedToWgs84.vrt"
            -ram
            7000
            -ts
            100
            -nc
            7
            -maxit
            1000
            -ct
            0.0001
            -out
            "C:/Users/Rion Lerm/Desktop/olifantsRiver_scp_classifies/2015_landCover_classify_olifantsRiver_kmeans.tif"
            -outmeans
            "C:\Users\RIONLE~1\AppData\Local\Temp\processing9b135f51bd084ee9a73e3f9100b6ae29\77bd7262ce7948e8bc780c22999c2dcf\outmeans.file"
2016-04-08T10:23:01 0   Adapter for adaptKMeansClassification not found
2016-04-08T10:23:01 0   OTB execution console output
2016-04-08T10:23:01 2   Error loading result layer:
            Traceback (most recent call last):
              File "C:/Users/Rion Lerm/.qgis2/python/plugins\processing\gui\Postprocessing.py", line 76, in handleAlgorithmResults
                out.name))
              File "C:/Users/Rion Lerm/.qgis2/python/plugins\processing\tools\dataobjects.py", line 194, in load
                + '\nCheck the procesing framework log to look for errors')
            RuntimeError: Could not load layer: C:/Users/Rion Lerm/Desktop/olifantsRiver_scp_classifies/2015_landCover_classify_olifantsRiver_kmeans.tif
            Check the procesing framework log to look for errors

Please assist!


texts: Unable to draw multiple polygons using Shapefile layer

texts:
I am new to QGIS.

I would like to draw a boundary and a few polygons (to represent buildings or concreted areas) on a map for planning out a farm soil delineation map (with some irrigation). I was planning on drawing polylines to include pathways and rivers.

I wanted the map to display the surrounding roads, so I tried to include some map information using the instructions from the following tutorial.

http://www.qgistutorials.com/en/docs/making_a_map.html

Using another online resource, I then tried to draw polygons using Shapefile layer.

https://github.com/mtop/speciesgeocoder/wiki/Tutorial-for-creating-polygons-in-QGIS

However, I am facing an obstacle now as the method provided works for drawing one polygon only. When I try to create any additional polygon or layer with new polygons, I get an error message saying there are duplicate nodes.

Searching online, there is a lack of useful information or guidance to explain what is going wrong.

What is going wrong?


texts:
In the picture below I am finding the bearing of two close lines. This is the picture of two complete lines. The brown line might be a bit large from the blue line.

Should not be the bearing of these two lines should be close to each other with a difference of may be few degrees?

I am checking whether they are equal or not by getting the difference of both lines bearing. I am using python to calculate the bearing and get the difference between there bearing.
The code I am using to get out the bearing is:

def calculate_initial_compass_bearing(pointA, pointB):
    """
    Calculates the bearing between two points.
    The formulae used is the following:
        θ = atan2(sin(Δlong).cos(lat2),
                  cos(lat1).sin(lat2) − sin(lat1).cos(lat2).cos(Δlong))
    :Parameters:
      - `pointA: The tuple representing the latitude/longitude for the
        first point. Latitude and longitude must be in decimal degrees
      - `pointB: The tuple representing the latitude/longitude for the
        second point. Latitude and longitude must be in decimal degrees
    :Returns:
      The bearing in degrees
    :Returns Type:
      float
    """
    if (type(pointA) != tuple) or (type(pointB) != tuple):
        raise TypeError("Only tuples are supported as arguments")

    lat1 = math.radians(pointA[0])
    lat2 = math.radians(pointB[0])

    diffLong = math.radians(pointB[1] - pointA[1])

    x = math.sin(diffLong) * math.cos(lat2)
    y = math.cos(lat1) * math.sin(lat2) - (math.sin(lat1)
            * math.cos(lat2) * math.cos(diffLong))

    initial_bearing = math.atan2(x, y)

    # Now we have the initial bearing but math.atan2 return values
    # from -180° to + 180° which is not what we want for a compass bearing
    # The solution is to normalize the initial bearing as shown below
    initial_bearing = math.degrees(initial_bearing)
    compass_bearing = (initial_bearing + 360) % 360

return compass_bearing

In the end what I am doing is calculate there difference like that:

DifferenceInBearing = abs(BlueLineBearing - BrownLineBearing)

My problem is that the difference between them is huge just around 179.71922333147256 degrees.

The WKT values of blue line is:

LINESTRING (327854.7919419953 6809188.658530097, 327854.2288694207 6809187.856443238)

The Wkt value for brown line:

LINESTRING (327854.139971 6809187.723519, 327854.714599625 6809188.541579125)

Shouldn't the bearing be close enough?


texts: openlayers - wms - map not loading - what Bounds/Extent/Scale to use?

texts:
I simply want a map on a webpage where I can zoomin and zoomout and navigate around.
I'm working on this for 4 days now, and can't get it to work:

I want to display the map using a WMS-service here in Austria with Openlayers. Here's the getCap XML:

http://gis.lebensministerium.at/wmsgw/?key=6ae2a41178c77ccee1db7248c9f92b04&VERSION=1.1.1&REQUEST=GetCapabilities&SERVICE=WMS

so this is my openlayers code:

function init() {
    map = new OpenLayers.Map("map", {
        controls : map_controls
            });
    wms = new OpenLayers.Layer.WMS("GIS", "http://gis.lebensministerium.at/wmsgw/", {
        layers : 'Orthophoto,Luftbild_MR,Luftbild_1m,Luftbild_8m,Satellitenbild_30m',
        key : '6ae2a41178c77ccee1db7248c9f92b04'
            }, {
                projection : new OpenLayers.Projection('EPSG:31287'),
                maxExtent : new OpenLayers.Bounds(110000, 250000, 690000, 590000)
            });
    map.addLayer(wms);
    if(!map.getCenter()) {
        map.zoomToMaxExtent();
    }}

and here's the link to take a look at the actual page: myMapSite

but it should look something like this (made it with an desktop app): Link_to_Picture

(I think the small rectangles are due to the free service and to not use it commercially)

So basically I want to see the whole map and then zoom in.

Since the only way to see a map (although the zoom-factor is way off) was to set the maxExtend with the boundingBox values from the getCapabilities-xml file, I'm assuming that my Bounds/Extent/Scale is wrong?

But what values should I use? or is there another problem?

I'm really desperate...


texts: Using Network Analyst to retrieve the shortest bus route with many lines

texts:
I am trying to use the Network Analyst to find the "best" route from A to B using the bus line. I have just a sample of the whole line, but my main concern at the moment is to find the best (in terms of time AND length) route such that I don't need to switch bus line.

For example (see figure below): to go from A to B I can use bus lines 1,  2, and 3, taking 10 minutes and 5 km. But I would likely waste time in changing from bus line 1 to  2 and again 3 (my 10 minutes would double!). Let's say bus line 4 is also close to my point A. I'd prefer to take bus line 4, which takes 15 minutes and 7 km, but I don't have to change any bus. This would be my "best route".

The "switching bus line" would become a variable contributing to change the "cost" of the route (as time and length). Is there a way I can retrieve my best route in such a way? Of course other variables will be as important for determining the best route, but at present this is the problem I would like to solve (hopefully).


texts: How to install a Reporter plugin for QGIS?

texts: I can not get the plugin Reporter or SimpleReport to run in 2.4 or 2.2.  The plugin manager in qgis says there is no metadata.txt.  This is obviously not true and is in there.  I have changed the minimumversion in the metadata file but no luck.  Is there a way to get around this to make the plugin work?  Or maybe there is another way to generate a report in Qgis?


texts: Error trying to import data to CartoDB using ogr2ogr

texts:
I have a local install of CartoDB in my Ubuntu 14.04. I have created a CartoDB account called "development" and been playing with it for a while. Now I'd like to import some data from a shapefile directly using ogr2ogr.

I've installed GDAL 2.0 since this post mentioned ogr2ogr wouldn't create new tables in CartoDB unless upgraded to 2.0, and tried this command:

ogr2ogr --config CARTODB_API_KEY XXXX -f CartoDB "CartoDB:development" myfile.shp

This is what I get:

ERROR 1: HTTP error code : 404
ERROR 1: HTML error page returned by server
ERROR 1: CartoDB driver doesn't support database creation.
CartoDB driver failed to create CartoDB:development


texts:
I have created the layer (geopackage data file) and when I do layer preview from, don't appeared tiles in the different zoom levels. Also I have tested in QGIS and everything is ok. Attached case you can find image in different zoom scales

How can I solve this issue?


texts: Join multiple features of same attribute name from a shapefile

texts: I have a shapefile of about 1300 species. In the shapefile some species has multiple features that makes about 3964 rows in the attribute table. I want to merge all features of a species into one using python code and the output will be a single shapefile of 1300 species with only 1300 rows (for example, all features of Emoia adspersa will merge into one). image of attribute table is attached herewith.


texts: Creating *.csv with Field name and Field type from feature class using ArcPy

texts:
I would like to create tool that will be generate *.csv with information about feature class (field_name, type).
You can find my code:
import arcpy
import os
arcpy.env.overwriteOutput = True
dataset_name = arcpy.GetParameterAsText(0)
Report_folder = arcpy.GetParameterAsText(1)
fields = arcpy.ListFields()

for field in fields:
    print("{0} is a type of {1} with a length of {2}"
          .format(field.name, field.type, field.length))

Could you advise?


texts: How to query against time using ArcGIS Desktop?

texts:
I have a date-time field in a feature class which I want to query. The field has values like "2011-01-01 00:00:29".

I want to query the data between the time 00:06:00 and 00:12:00. The date does not matter an shall be ignored.

Any ideas how to do this?


texts: GeoServer CSS how to force labels onto map where boundaries are tight or narrow

texts:
I'd like to force labels onto the map.  For instance, the Western Mountain label ideally could go just above Washington State.  I have tried various permutations, but I cannot seem to get the labels to display.
* {
  label: [REGION];
  font-size: 6;
}


texts:
Is there a solution to request the GML layer from Geoserver with filter like using bbox:

http://localhost:8080/geoserver/tiger/ows?service=WFS&version=1.0.0
&request=GetFeature&typeName=tiger:poi&maxFeatures=50&
bbox=-74.0104611,40.70758763,-74.00153046439813,40.719885123828675

The result will be specific filtering the bounding box (lat/lon), based on bbox parameter that user entered.

The Result:

<wfs:FeatureCollection xsi:schemaLocation="http://www.census.gov http://127.0.0.1:8080
 /geoserver/tiger/wfs?service=WFS&version=1.0.0&request=DescribeFeatureType&
 typeName=tiger%3Apoi http://www.opengis.net/wfs http://127.0.0.1:8080/geoserver
  /schemas/wfs/1.0.0/WFS-basic.xsd">
    <gml:boundedBy>
        <gml:null>unknown</gml:null>
    </gml:boundedBy>
    <gml:featureMember>
        <tiger:poi fid="poi.4">
            <tiger:the_geom>
                <gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
                  <gml:coordinates decimal="." cs="," ts="
                   ">-74.00857344,40.71194565</gml:coordinates></gml:Point>
            </tiger:the_geom>
            <tiger:NAME>lox</tiger:NAME>
            <tiger:THUMBNAIL>pics/22037884-Ti.jpg</tiger:THUMBNAIL>
            <tiger:MAINPAGE>pics/22037884-L.jpg</tiger:MAINPAGE>
         </tiger:poi>
    </gml:featureMember>
</wfs:FeatureCollection>

The problem now, I want to filter the data based on the <tiger:NAME>lox</tiger:NAME>,
already tried with entered the tiger:NAME=lox as a parameter when request, the result just same like when enter no parameter. Is there a solution for this?


texts:
In ArcMap, Zonal Statistics uses the centre points of the Rasters pixels to link to the under or overlying polygons.

Some of the polygons that I am using are small enough that they do not overlap the centroid point of the overlying raster pixel and subsequently do not retrieve any data.

Rough picture illustrates 4 raster cells and 4 polygons that would fail to retrieve zonal statistics data because they do not overlap the centroids of the pixels.

Model Based Approach?

At this point I am considering developing a model that defers to marginally displaced versions of the raster if Zonal Statistics initially fails (Displacing rasters so that the centroid of the pixel is artificially moved from the centre to the midpoint between the centre point and the top right corner (Doing this 4 times for each quadrant of the pixel)).

This model would conduct the initial Zonal Statistics on the polygon feature set before extracting all those polygons which failed to collect any data from the Rasters (because they were too small and didn't overlap a pixel centroid). It would then attempt zonal statistics with 4 blank rasters, all of which have been offset marginally so that the chance of a polygon overlapping is multiplied by 4. Once it has been determined which offset works for each polygon I could then offset the polygons relevant to the right offset or create offset versions of each raster layer that I am doing zonal statistics for.

Whilst I think this model would ultimately work it would be overly complex and convoluted to setup. Is there an alternative way that this issue can be gotten around?


texts: slope in model different value than slope in stand alone script

texts: When running slope(analysis) from model I receive a high value of somewhere around 71. After then exporting model as python snippet and changing only the output raster name (using same input raster) I receive a high value of 45 in the output raster.  This makes absolutely no sense.  Has anybody ever experienced this?


texts:
I am having an extremely difficult time importing my CSV file, with UTM points, to QGIS.

I am a very basic QGIS user, and the online information so far hasn't helped me figure out this problem.

I imported my CSV file using: Source Manager -> Delimited Text -> CSV -> Point Coordinates...

But I can not get around how to include the zone in all this.

The zone is in a different column. I have the Easting as the "X" and the Northing as the "Y". My Zone is 10U. When I import it, the data points are in a different hemisphere.


texts: ArcMap tables - copying multiple horizontal cells between rows

texts: I would like to be able to select a contiguous set of horizontal cells in a row, take a copy, then paste the values into another row at the same position in the same table.  I do not want to copy all the attributes, only a subset, but they are at least contiguous. At the moment I am doing a simple copy-paste cell-by-cell, and it is very time consuming, not to mention frought with error.  If it were in a spreadsheet, it would be as simple as highlighting the group of horizontal cells, taking a copy, move the cell cursor down one cell, and then doing a paste.  Is this possible without going through an export/edit/import process.  Thoughts greatly appreciated. Barrie


texts: Display pictures stored as bytea in postgresql column in qgis

texts:
does someone knows a possibility to visualize in a bytea column saved photos of a postgresql database in qgis?

I would like to store pictures directly into the database, not just the link/ url.


texts: How to reclass in Google Earth Engine with 'and' or 'or' statement

texts:
How do you reclassify in with an 'and' or 'or' statement? This piece of code is not working.
var reclass13 = ee.Image(1).where(y13.gte(mG13h),1000)
                        .where(y13.lt(mG13l),100)
                        .where(y13.lt(mG13h).and(y13.gte(mG13l),1));


texts:
I am trying to get a map in the Dutch Rijksdriehoekstelsel coordinates in a Leaflet map in R that is going in a Shiny app later. I am going to have to add polygons later, and changing their X and Y coordinates into the WGS84 would be horrible. I stole the proj4def and resolutions from the example posted at the bottom. However, I just get a grey screen with the zoom in and out buttons. Either I have screwed up the leafletOptions or the tileLayer.

library(leaflet)

leaflet(
 options =
    leafletOptions(
      crs=leafletCRS(
        crsClass="L.Proj.CRS.TMS",
        code='EPSG:28992',
        proj4def='+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +units=m +towgs84=565.2369,50.0087,465.658,-0.406857330322398,0.350732676542563,-1.8703473836068,4.0812 +no_defs',
  c(-285401.92, 22598.08, 595401.9199999999, 903401.9199999999),
    resolutions = c(3440.640, 1720.320, 860.160, 430.080, 215.040, 107.520, 53.760, 26.880, 13.440, 6.720, 3.360, 1.680, 0.840, 0.420),
      )
  )) %>%
  addTiles(urlTemplate='http://geodata.nationaalgeoregister.nl/tms/1.0.0/brtachtergrondkaart/{z}/{x}/{y}.png',
  tileOptions(minZoom=3,maxZoom=13,tms=TRUE,continuousWorld=TRUE)   ) %>%
  setView(52,5.1,13)

This is an example in Javascript that has done the same thing:
http://bl.ocks.org/webmappergists/raw/1ceac1353920b3810486/


texts: How to display HDF satellite image in real colors?

texts:
How do I display HDF satellite image in real colors as photo image ?

LoRes http://img.nsmc.org.cn/IMG_LIB/FY3C/FY3C_MERSI_GBAL_L1_YYYYMMDD_HHmm_0250M_MS.HDF/20140308/FY3C_MERSI_GBAL_L1_20140308_0305_0250M_MS.HDF.jpg

Full HiRes 357MB, use slow FREE download
https://ufile.io/uo0ha

In HDFView-3.0.0 or Igor Pro 7 (with HDF5 Browser package) I was able to display image in gray only.


texts:
function testPanZoom() {
    console.log("test func");
    var newPanZoom = new OpenLayers.Control.PanZoom();

    OpenLayers.Util.extend(newPanZoom, {
        onButtonClick: function(evt) {
            console.log("test button click");
            var btn = evt.buttonElement;
            switch (btn.action) {
                case "panup":
                    this.map.pan(0, -this.getSlideFactor("h"));
                    break;
                case "pandown":
                    this.map.pan(0, this.getSlideFactor("h"));
                    break;
                case "panleft":
                    this.map.pan(-this.getSlideFactor("w"), 0);
                    break;
                case "panright":
                    this.map.pan(this.getSlideFactor("w"), 0);
                    break;
                case "zoomin":
                    this.map.zoomIn();
                    break;
                case "zoomout":
                    this.map.zoomOut();
                    break;
                case "zoomworld":
                    this.map.zoomToExtent(new OpenLayers.Bounds(380983.55914508,
                                                                6668932.8432267,
                                                                392057.98129392,
                                                                6674994.9886843));
                    break;
                }
        }
    });
    return newPanZoom;
}

map.addControl(new testPanZoom());

However it does not seem to work. The control is added but zoomToExtent for worldicon in switch case does not really change anything.

Can you tell me what's wrong ?


texts: Create line from points while keeping attribute information

texts:
Is there a way (in QGIS) to create a line from a series of points, while maintaining (at least) a column of the attribute information for each point (ie one column containing the values for a certain variable for all points)? I've been able to create lines out of the points using the 'points to path' vector creation tool, but the attribute table of the resulting line has only two cells, listing the beginning and end values: I want to keep the values for each point from which the line has been constructed.

I'm using QGIS 3.4.4 on macOS.


texts: Geographic coordinate system - shapefile not matching other shapefile location

texts: I'm having trouble with the projection of one of my shapefiles (it's the roads network of the region I'm working on). I have a shapefile without any spatial reference information. When I use the define projection tool to assign it the same coordinate system as my other shapefiles it doesn't line up as it should.


texts: How do I lay a grid and count the number of points within each sector?

texts: I'm using QGIS and this represents a metro area that is 3,965 square miles.  I want to lay a grid over it and measure the number of points in each sector.  I haven't used any of the grid tools before and there are a lot to choose from.  What tool would be used to lay over this map and count the number of values?  Will the grid automatically count the number of values within it or do I need to run a separate tool?


texts: Only returning selected features on shapefile from ArcPy cursor?

texts:
I'm trying to only return information on a selected feature in a shapefile. According to other answers online, searchcursors should only act on selected features, but for whatever reason it's providing me with all the features in the shapefile.

Here's a basic example of what I'm working with:

for row in arcpy.SearchCursor(shapefile):
    print row.TEXT

This code prints the output from the "TEXT" field for all features, not only the one I have selected.


texts: Problems with Earth Engine own function output


texts: Show polygon features within a polygon from another layer in QGIS

texts:
In QGIS 3.14 I am using three polygon layers; one representing buildings, the second representing "city boundaries" and the third representing the municipal boundary.
My aim is to show all the buildings which are placed inside the municipal boundary but outside of the "city boundaries", i.e. buildings in "the open land". I am not interested in making any new data, I only want to visually hide/show features.
My idea was to use the geometry generator, but I don't know if there is any other way to do it?
I first tried to just show all the buildings indside the municipal boundary by typing the following code in the geometry generator:
intersection( $geometry,
geometry( get_feature( 'name-of-municipal-boundary-layer','gid','1')))

and that did work out fine.
Starting point:

After using the geometry generator:

My problem is that I don't know what to do from here.
I also tried to show all the buildings inside one of the "city boundaries" the same way as with the municipal boundary to just see if that was even possible, but that didn't work..
intersection( $geometry,
geometry( get_feature('name-of-city-boundary-layer','gid','1'))

It just gave me an empty layer looking like this:


texts: Orthorectifying or Georeferencing aerial photographs

texts: I got 3 aerial photographs from a mountainous area (~3500 - 4000 m.a.s.l), from 1956, 1965, 1977 (no metadata, no camera parameters, scanned white and black). My study catchment is relatively small (1 sq. km) and I would like to use those photos in order to assess potential vegetation changes. I know both the processes of orthorectification and georeferencing, however, I am not sure about which process should be used in this case. For orthorectifying I will require additional information, particularly the detailed DEM, which is very difficult to get for this area, while for georeferencing I will need some control points, a-priori the georeferencing process is 'easier' however I am not sure how comparable the results can be, with respect to orthorectification, and also in terms of overall accuracy assessment. Since the area of interest, is relatively small (each photography, covers approximately 10x10 km), I would not expect severe deformations, yet the area surface is very irregular.  Any reference or previous experience in this regard is welcome.


texts:
I need to transform multiple ASCII files into a .tiff.
I started by created the following python script but I don't see what I'm doing wrong. Maybe It's something with the loop? Does anyone have any idea what I'm doing wrong?

 import arcpy
 import glob

 asciiFolder = glob.glob('D:\Maxent\outputs\*.asc') print asciiFolder

 outRaster= "D:\Insectennetwerk Provincie Friesland\MR_ascii_naar_TIFF"

 for x in asciiFolder:
     arcpy.ASCIIToRaster_conversion(x, outRaster)

The error is telling me that the parameters are incorrect. But I almost exactly used the example code (tool page from Esri), so I don't understand what I'm doing wrong.

The error:

= RESTART: D:/Insectennetwerk Provincie Friesland/ascii_naar_tiff_script.py =
['D:\\Maxent\\outputs\\Aeshna_juncea.asc', 'D:\\Maxent\\outputs\\Andrena_chrysosceles.asc', 'D:\\Maxent\\outputs\\Argynnis_niobe.asc', 'D:\\Maxent\\outputs\\Autographa_gamma.asc', 'D:\\Maxent\\outputs\\Bombus_pascuorum.asc', 'D:\\Maxent\\outputs\\Bombus_terrestris.asc', 'D:\\Maxent\\outputs\\Ceriagrion_tenellum.asc', 'D:\\Maxent\\outputs\\Cicindela_campestris.asc', 'D:\\Maxent\\outputs\\Coccinella_septempunctata.asc', 'D:\\Maxent\\outputs\\Erythromma_najas.asc', 'D:\\Maxent\\outputs\\Formica_rufa.asc', 'D:\\Maxent\\outputs\\Graphoderus_bilineatus.asc']

Traceback (most recent call last):
  File "D:/Insectennetwerk Provincie Friesland/ascii_naar_tiff_script.py", line 12, in <module>
    arcpy.ASCIIToRaster_conversion(x, outRaster)
  File "C:\Program Files (x86)\ArcGIS\Desktop10.7\ArcPy\arcpy\conversion.py", line 2467, in ASCIIToRaster
    raise e
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000878: Output raster: The length of the grid base name in D:\Insectennetwerk Provincie Friesland\MR_ascii_naar_TIFF is longer than 13.
Failed to execute (ASCIIToRaster).

>>>


texts: I am in desperate need of help. I've tried the answers to similar questions and nothing is working. Orfeo Toolbox appears as activated in Processing options but is not appearing in the toolbox. I checked to make sure the path was correct in the Options. Does anyone know how I can get it to show up in my toolbox?


texts: How to split the line features where point intersects without having intersection vertex in qgis

texts:
I have a polyline and a point layer. I want to split the line where point is intersecting with the line but sometimes vertex wont be present where point is intersecting.

def splitting():
    selectedFeatures = []
    for l_feat in l_layer.getFeatures():
        l_geom = l_feat.geometry().asPolyline()
        l_featid = l_feat.id()
        print('l_geom is',l_geom)
        g_layer.select(l_featid)
        sel_feat = g_layer.selectedFeatures()[0]
        sel_feat_geom = sel_feat.geometry()
        for p_feat in p_layer.getFeatures():
            if p_feat.geometry().intersects(sel_feat_geom):
                intersection_geom = p_feat.geometry().intersection(sel_feat_geom)
                if intersection_geom.asPoint() != l_geom[0] and intersection_geom.asPoint() !=l_geom[-1]:
                    print '------', p_feat.id()
                    l_layer.startEditing()
#                    l_layer.select(l_feat.id())
                    t = l_layer.splitFeatures([intersection_geom.asPoint()],True)
                    print('t is',t)
                    l_layer.commitChanges()
#                    l_layer.removeSelection()
                else:
                    pass
            g_layer.removeSelection()
    qgis.utils.iface.mapCanvas().refresh()

Here t = l_layer.splitFeatures([intersection_geom.asPoint()],True) is writing 0 but it is not spliting line.What is going wrong here.How to do it in QGIS


texts: Dynamically coloring a terrain surface based on extent/visible elevation

texts:
This application is being developed using ArcGIS JS.

I have a 3d rendered terrain surface of the ocean floor. I've created a raster file to represent this 3d surface, created a tile-cache from said raster, and exposed that tile-cache as a rest service. This means that I can pass the 3d rendered surface of the ocean floor (as an elevation layer) to ArcGIS JS to create a 3d terrain that can be flown over by the camera. Very cool.

The issue I now face is one of coloration. Without intelligent coloration of the 3d surface, everything is one color, and the shadowing effect of ArcGIS JS library can't reveal the level of detail I want. So, I created a colorized version of the raster, exposed this as an ImageLayer, and draped it on top of the elevation layer. All in all, I'm pretty happy with it.

My problem is this: The color ramp that I've selected is the largest available. Unfortunately, the range in elevation is so large that when you zoom into the terrain to see detail, you quickly descend into a tiny portion of the color ramp where everything looks the same. Even though you may be looking at a seamount that is in fact several hundred meters high, the top and the bottom are the same color because it's being squashed into the same color ramp as the entire range of elevation on the whole map.

My question is this: Is there a way for me to dynamically re-render/re-symbolize the color layer (it is currently an imagery layer, but it doesn't have to be. I can make it something else if that would help) so that the color ramp is fit to the elevations that are currently visible? For example, if from where the camera is positioned the highest visible elvation is say 100m of depth, and the lowest elevation is 500m of depth, can I re-render/re-symbolize the colors so that the color ramp is only stretched between 100-500m of depth? As opposed to the color ramp being statically fixed across the entire range of elevations on the entire map, regardless of what is in view. This would provide much more differentiation between elevations at both large ranges of elevation and narrow ranges of elevation.

I realize that I may not have worded that as clearly as I could have, but I can't think of a more eloquent way to explain it, so please let me know if I can clarify anything.


texts: How to open or import .sdc files in QGIS?

texts:
I have some .SDC files i want to look at but i dont have arcview installed. is it possible?

i couldnt even find a software that does sdc to shp conversion.

any idea?

i am using qgis 1.7.4 on both windows and linux, i googled to find a converting software with no luck.

i think i am missing something since sdc is very popular and i could not find enough questions on this subject.


texts: QGIS 3.4 Layout composer tool bars are too small to see

texts: I'm at a loss. I just updated to QGIS 3.4, and it was working fine, but now my Layout window has only tiny tool bars and the move item content tool is non-existent. Can anyone help?  The same thing seems to be happening in the georeferencer window as well


texts: Simplifying polygons made from binary rasters using ArcGIS Spatial Analyst?

texts:
I'm using MaxEnt to produce a species presence / absence raster layer.  It works fine but I have to choose a cut off point for what constitutes presence or absence.  As a result I end up with a lot of single cell polygons.  Using the "simplify polygons" check box in the raster to polygon tool helps a little but I still have a lot of single cell polygons (that come as triangles left).

I've tried using the exclude and dissolve tools but they seem to leave the outlines there.  Really I want to change all polygons under a certain area from 0 (absence) to 1 (presence) and then dissolve those boundaries and finally smooth out the boundaries of the polygons I have left.


texts: Problems with dividing multipolygons into polygons

texts:
I have a shapefile with countries boundaries downloaded from here and I am trying to upload it to PostGIS database with ogr2ogr. This file contains features of polygon and multipolygon types and because of that I cannot upload these features in one column.

I tried to divide the multipolygons into several polygons with QGIS and with python+fiona. But some countries got cut and have wrong boundaries.

What may cause that and how can I fix it?


texts: Using Geometry.fromJSON() gives unexpected results

texts:
I am trying to use Geometry.fromJSON() in the ArcGIS JSAPI 4.x to return a Point or an Extent geometry and I am getting some unexpected results.

Here is what I have tried.

const point = Geometry.fromJSON({x: 10, y: 10, spatialReference: {wkid: 4326}})
...and...
const point = Geometry.fromJSON({type: "point", x: 10, y: 10, spatialReference: {wkid: 4326}})
console.log(JSON.stringify(point.toJSON()))

Here is the result on the console.

{"spatialReference":{"wkid":4326}}

Should I be able to get a Point geometry with the JSON I am using with Geometry.fromJSON()?

My goal would be to do the following...

mapView.goTo(Geometry.fromJSON({....});

...using valid JSON for a Point or an Extent.


texts: How to get address coordinates from OSM?

texts:
I've got an osm file containing the city I live in. Now I've got a tool to render and display it in the browser (mapnik+postgis+tilecache+openlayers+geoext) and the task is to make an address search.

I know that I can use nominatim (and actualy I use it for now), but I'd like to create my own service.

So the question is: how can I (if I can) get all adresses and their coordinates from the osm file or it's exported to postgis version?


texts:
I'm using code from geom's answer at Is there an easy way to use Postgis GeoJSON in Openlayers 3 to load PostGIS layers into my OL3 map application.

Each time I pan/zoom far enough to trigger a different map extend, a new PHP call is fired and new data is catched. That's working as intended due to ol.loadingstrategy.bbox

The problem is: Each time I do that, panning performance keeps on dropping drastically. I guess, that's because multiple features are stacked upon each other. This can also be seen as layer's opacity seems to be increased each time I pan/zoom. I'm using latest OpenLayers version 4.2.

ol3Vector = function(options) {

var options = {
    title: options.title,
    visible: false,
    geotable: options.geotable,  // table name in PostGis-database
    fields: options.fields,      // field-names
    where: options.where,        // where-string passed to PostGis
    source: new ol.source.Vector({
        projection: "EPSG:4326",
        attributions: [new ol.Attribution({
            html: options.attribution
        })],
        strategy: ol.loadingstrategy.bbox,   //load only data off the visible map
        loader: function(extent, resolution, projection) {
            var extent = ol.proj.transformExtent(extent, projection.getCode(), ol.proj.get('EPSG:4326').getCode());
            $.ajax({
                type: "GET",
                dataType: "json",
                url: "../map/php/get_geojson.php?" +     // define path to the get_geojson.php script
                    "geotable=" + options.geotable +
                    "&fields=" + options.fields +
                    "&where=" + options.where +
                    "&bbox=" + extent.join(","),
                context: this
            }).done(function(data) {
                var format = new ol.format.GeoJSON();
                this.addFeatures(format.readFeatures(data, {
                    dataProjection: "EPSG:4326",
                    featureProjection: "EPSG:3857"
                }));

            });

        }
    }),
    minResolution: options.minResolution,
    maxResolution: options.maxResolution,
    content: options.content,
    symbology: options.symbology,
    showLabels: options.showLabels,
    label: options.label,

}

ol.layer.Vector.call(this, options);

};

ol.inherits(ol3Vector, ol.layer.Vector);

Furthermore:

var landkreise = new ol3Vector({
    title: "Landkreise in Niedersachsen",   // name of the layer to show up in the layerswitcher
    geotable: "tbl_landkreise_geb_f",
    fields: "KRS,sumarea",
    where: "KRS IS NOT NULL",    // You can use all the PostgreSQL or PostGis features here
    minResolution: 0.01,
    maxResolution: 50000,
    content: " ",
    showLabels: false,    // show labels on map
    label: "KRS"    // field used for labeling
});
baselayersArray=[OSM, landkreise];
baselayers.setLayers(new ol.Collection(baselayersArray));
landkreise.setVisible(true);


texts: Openlayers: Clustering in Openlayers.Layer.Text

texts:
I have a map that displays 5 layers of markers. Each layer is a group of POI's. I load the POIs from textfiles using

var cycling = new OpenLayers.Layer.Text( "Cykling", { location:"./textfile.txt"} );
var hiking = new OpenLayers.Layer.Text( "Vandring", { location:"./textfile.txt"} );
var sailing = new OpenLayers.Layer.Text( "Kano & Kajak", { location:"./kano.txt"} );
var fishing = new OpenLayers.Layer.Text( "Lystfiskeri", { location:"./textfile.txt"} );
var sleeping = new OpenLayers.Layer.Text( "Overnatning", { location:"./textfile.txt"} );

I am trying to cluster the POIs if the map is zoomed out but at first glance it seems clustering is not available for OpenLayers.Layer.Text markers.

Can anyone point me in the right direction? What are my options for clustering?


texts:
I am working on generalization of Geological map generalization and as part of it I am dealing with displacement of polygons from each others.
Because, in previous steps I enlarged small polygons which are small they became close to each others and now to be displaced.
Basic parameter is Object Separation constraint which is 1 mm on the map, meaning, if polygons are closer than 1 mm they should be made further from each other unless it reaches 1 mm distance.
Here, is the small portion of the map, with red line 14, 40 meters are distance between polygons before and after enlargement respectively. And in green line 25 meters, is the Object Separation distance, how far they should be.

I am considering using buffer as a solution though, is there any other ideas how can I do this better way?


texts: count features in polygon shapefile A that fall within each feature of polygon shapefile B

texts:
I have two polygon shapefiles, each of which contain multiple (possibly overlapping) polygons.

Is there some way, using GRASS, to calculate the number of polygons belonging to shapefile A that fall within each of the polygons that exist in shapefile B? Preferable would be a method that doesn't require rasterization, but I'm open to going down that route if necessary.

(I'm aware that this can be done in R, using the over() function, but these are large files I'm referring to, and so I'd prefer to do it in GRASS.)


texts:
I am trying to export an image collection of model results as an asset in GEE but I get the error message:

  Error: Unable to export features with unbounded geometry.

The images in the collection are calculated from the GDDP dataset and have the same global footprint as the source data. I have tried filtering the collection by bounds but still get the same message. Following is a code that replicates my problem:

var GDDP = ee.ImageCollection('NASA/NEX-GDDP').filterDate('2002-01-01')
Export.table.toAsset(GDDP, 'GDDP', 'GDDP')


texts: How to interpret this pgRouting shortest path result?

texts:
I am trying to use pgrouting's shortestpath function. It returns a set of edges for the shortest path. However, the start node of the next edge is not the end node of the previous edge. I mean they are not connected. So while displaying I am joining the end node of the first edge to the start node of the next edge.

However, I am seeing that the coordinates are repeating. I am not sure why, For eg plotting just the coordinates of the start and end node of each edge, I have something like this:

start end
A     B
C     D
A     E

As you can see the coordinates are repeating like A,A in the previous case. As a result there are lots of lines crossing over.

Any suggestions or clarifications?


texts: How do you symbolise a 32-bit raster in ArcObjects?

texts:
For rasters that are above 16-bit - you cannot apply a colormap. So what is happening when you symbolise in ArcMap a 32 bit raster - it's certainly possible. I'm trying to emulate this funcitonality in ArcObjects - but at the moment I'm getting a bit muddled.  Can anyone lend a hand here?

CODE - not working.

IRasterDataset rasterDataset = null;
IRasterLayer rasterLayer = new RasterLayerClass();
rasterDataset = GeodatabaseManager.RasterWorkapaceEx.OpenRasterDataset("fooRaster");

IRasterStretchColorRampRenderer rasterStretchColorRampRenderer = new RasterStretchColorRampRendererClass();
IRasterRenderer rasterRenderer = (IRasterRenderer)rasterStretchColorRampRenderer;
IRasterStretch rasterStretch = (IRasterStretch)rasterStretchColorRampRenderer;
rasterStretch.StretchType = esriRasterStretchTypesEnum.esriRasterStretch_MinimumMaximum;
IRaster raster = (IRaster)rasterDataset.CreateDefaultRaster();
rasterRenderer.Raster = raster;

IAlgorithmicColorRamp colorRamp = new AlgorithmicColorRampClass();
colorRamp.Size = 255;
colorRamp.FromColor = CreateRGBColor(0, 0, 255);
colorRamp.ToColor = CreateRGBColor(255, 0, 0);
bool createColorRamp;
colorRamp.CreateRamp(out createColorRamp);

rasterStretchColorRampRenderer.BandIndex = 0;
rasterStretchColorRampRenderer.ColorRamp = colorRamp;

rasterRenderer.Update();
rasterLayer.CreateFromDataset(rasterDataset);
ILayer layer = (ILayer)rasterLayer;
ArcMap.Document.FocusMap.AddLayer(layer);


texts: PostgreSQL-12.3 / PostGIS-3.0 - could not access file “$libdir/postgis-2.4”: No such file or directory

texts:
I am aware there are a few similar questions to this one, such as here and here. My problem is however a bit different.
I've recently upgraded my Ubuntu to 20.04 and there only PostgreSQL 12.3 and PostGIS 3.0 are fetchable on the official repo. This means that getting earlier versions is not very straightforward.
Thinking that the easiest way forward would be to also upgrade my Django database to the latest version above, I decided to try that. To my surprise, I keep getting the following error:
could not access file "$libdir/postgis-2.4": No such file or directory
This happened first in my Django app but naturally also when accessing the database via psql directly. I then proceeded to drop the database and create it again, as luckily the data I had there was still only test stuff. As soon as I try to create the PostGIS extension to it, guess which error I get...
mydb=# CREATE EXTENSION postgis;
ERROR:  could not access file "$libdir/postgis-2.4": No such file or directory

My conclusion is that it doesn't seem to be a problem directly related to the upgrade of postgis to 3.0, as I'm not even able to create the extension. Also, I don't understand why it tries to access the 2.4 version as it is a brand new database. Restarting the PostgreSQ service or even the computer wasn't of any help.
How can I approach this problem?


texts: Distinguishing Road Network according to the ward within a municipality ArcGIS

texts:
I have a polygon layer of a municipality containing 14 wards as shown in figure i.
I also have a polyline layer of road network irrespective of the ward.

The road network have following attributes - Road digital name, Road length, Road class, road width, road name as shown in figure ii.

I want to distinguish each road polyline according to 14 wards such that I could generate summary about each ward having so-and-so roads, with so-and-so length of roads. (Segments of one roads may lie on more than one ward). I want to generate Zonal Statistics but both of the layer is feature layer (as different from zonal stat tools in arcgis where one layer must be raster).

In summary, I would like to categorized each segment of the road (and not the single road network) for each ward.

Please suggest.


texts:
I have tried to add a layer from the Oracle database with SDO_GEOMETRY geometry, from the console that comes in QGIS, but it does not load anything, I occupy this because I want to put it in a plugin.

How can I load layers from oracle with the python editor that comes with Qgis?

SqlT = "select TABLE_NAME from all_tab_columns where data_type = 'SDO_GEOMETRY' and owner= 'GEOSERVER'"
cur.execute(sqlT)
tables = cur.fetchall()
uri = QgsDataSourceURI()
uri.setConnection("x.x.x.x","port","database","user","pass")

QgsProject.instance().writeEntry('WFSLayers',"/",[]) #investigar

for t in tables:
    print str(t[0])

uri.setDataSource(' ', str(t[0]), "GEOMETRY")
vlayer = QgsVectorLayer(uri.uri(), str(t[0]), 'oracle')
QgsMapLayerRegistry.instance().addMapLayer(vlayer)


texts: FCC Galileo Waiver: What does it mean in practice?

texts:
Today the FCC approved the use of Galileo navigation satellites in the United States.  According to gps.gov,

  The Federal Communications Commission (FCC) rules require licensing of non-federal receive-only equipment operating with foreign satellite systems, including receive-only earth stations operating with non-U.S. licensed radionavigation-satellite service (RNSS) satellites.

.  The FCC apparently waived the above at the EU's request.  However,

GLONASS has been widely used in the U.S. for several years without going through this process.  The FCC seems unconcerned by this and is certainly not issuing fines, injunctions, etc. in response.
A few phones (e.g. the Samsung Galaxy S9) already supported Galileo signals, apparently including their U.S. versions.

Given the above, what is the practical impact of today's ruling?  Is receiving GLONASS signals technically illegal despite the complete lack of enforcement?  Why did the EU seek this waiver when these FCC rules seem to have no impact on GLONASS usage in the U.S.?


texts: What do I need to change to get scale bar units other than degrees?

texts:
Measurements done in QGIS on my project are done properly using whatever unit is set in:

Settings > Options > Map Tools > Preferred measurements units

but the scale bar decoration and scale bar in print composer are still degrees. My data is all NAD83. Previously answered questions state that it must be changed in project settings but I don't see that menu option in QGIS 1.80.

How can I change settings so that my scale bar is in units other than degrees?

EDIT 1: I don't have that option in the menu (are you using 1.80?), but I do have a button for 'CRS status' on the status bar. If I click that and change layer units to feet, which it indicates are only used when CRS transformation is disable, I get the following:

As you can see, the scale bar measurement is completely off. I can change the CRS to other systems than use feet other meters and it's more accurate. Are there metric and imperial version of NAD83, WGS84, etc?

If the measure tool can give figures in feet or meters when using a CRS with degree units, why can't the scale bar do the same?


texts:
I noticed that, in contrast to the organic carbon content which is provided different soil layers, i.e. 0-15 cm, 15-30 cm, etc., the clay content is provided for specific discreet depths, namely 5 cm, 15 cm, 30 cm, etc.

Are these the values in that specific depths or is 5 cm representative for the 0-5 cm layer and so on?

Ultimately, my question is, what should someone do to obtain the average clay percentage for 2 m depth, meaning from 0 to 2 m?


texts: I have got a maps2winbugs.dll file, but what should I do to install it into QGIS, sorry for the first time using this software, doesn't have any experients in C or R.


texts: Recovering Model which crashed ArcGIS and was lost?

texts:
I was working on a very large model (that I now wish I had broken into more submodels) that crashed ArcGIS. Before it crashed I saw an error that I think said "temporary file could be loaded" (I can't remember the exact error.)

"I'm glad I saved recently," I thought to myself.

Then I open ArcMap and the model appears blank. When I view properties for the model, I still see the parameters, but when I edit the model there are no tools in there anymore.

Does anyone know how I could recover my work?


texts: Buffer output is different for same attribute value in different layers (QGIS 3)

texts:
I have two line layers with almost the same attribute table. And I want to create a buffer with "variable distance buffer" from the line's attribute "raiometade" and "raio_metade".

Layer 1 is getting the right result (a buffer with distance of 2572 meters), but the layer 2 output is incorrect and I don't know why (it is generating an output buffer with distance of 100 meters).

Both lines are located in the same location and the only real difference is that Layer 1 was generated directly using the tool box (variable distance buffer) and layer 2 was generated using the following code on the python console:

 processing.run("saga:variabledistancebuffer", {'SHAPES':line,'DIST_FIELD':'raio_metade','DIST_SCALE':1,'NZONES':1,'DARC':5,'DISSOLVE       ':True,'POLY_INNER       ':False,'BUFFER':'TEMPORARY_OUTPUT'})

Table of layer 1:

Table of layer 2:

Buffer resulted from layer 1:

Buffer resulted from layer 2:


texts: White grid appears when reprojecting DEM in ArcGIS Desktop?

texts:
I am using ArcGIS Desktop 10.5.

I have a DEM .tif archive, in WGS 84. The specifics are:

Then, I try to reproject it to WGS 84 UTM 19S.
Project and transformations -> Raster-> Project Raster
I use the original as the input, and in output coordinate system I choose WGS_1984_UTM_Zone_19S. However, when the process is finished, I get

Why does this happen, and how do I solve it?


texts: QGIS Updating three layers at a time by editing the edge where all the three layers concur

texts:
I have a map with three main layers:

Roads (Polygons)
Sidewalks (Polygons)
Curbs (Multilinestrings)

I need to adjust the edge where all the three layers concur to the cartography layer (the gray lines(the lines indicated by the red arrow)) using snapping to cartography layer. Note that the three layers concur in the curbs layers' Multilinestrings.

If I use the node tool, I can do it layer by layer. I have to do it aprox. 10.000 times so If I could move (adjust by snapping) the three layers at once I could saves days of work.

I tried by selecting the three layers and using the node tool but did not work.

I Know that in ArcView there is a tool in Topology -> Change the edge shape (I don't know if that's exactly the name of the tool because I have translated it from spanish (Topología -> Cambiar la forma del borde)).

I would like to know if there is a way to do this in QGIS.


texts: Comparing areas in scanned historical land use maps using QGIS?

texts:
I am a relative beginner to using GIS, and am running QGIS 2.0.1 in Linux. I have two historical maps which I want to analyze, that show land use patterns in the same area at two different moments in time. I have them scanned and geo-referenced as layers in one file. Side by side, they look like this:

The main thing I am interested in is to compare the extent of the light and dark green areas between the two maps. Is this possible, and if so, what is the simplest approach? Is there a way to do this based on raster analysis? And if I have to make a shapefile, what is the best way to do that?

What I have already considered:

Drawing shapefiles as polygons by hand, as described in this tutorial. That would be VERY tedious.
Creating simplified, high contrast raster images by using color selection, filters etc. by trial and error in the Gimp and converting that to a shapefile. The results were very sloppy.


texts: ArcSDE 10.1 Insert/Update Trigger on Adds (A) Table (Oracle 11g) and Feature Services on ArcGIS Server

texts:
I'm trying to use a trigger to update a versioned dataset in an SDE environment.
Basically, I wanted to implement a system of unique ids called GISID. Initially, when a feature is created (inserted), this GISID is generated by taking the ObjectID. We don't want to use ObjectID as our uniqueID because if a row with the an ObjectID is deleted, that object ID cannot be used in the dataset again. We have instances where some assets are tied to a GISID and it's essential the GISID stays uniform, even if we have to recreate that feature/record.
Anyway, I have a trigger that works great in an ArcMap Edit session.
PL/SQL Code here:

CREATE OR REPLACE TRIGGER "OwnerName"."A5461_GISID"
  BEFORE INSERT OR UPDATE ON OwnerName.A5461
  FOR EACH ROW
DECLARE
    gisidcntbasetbl NUMBER; --variable for count of same GISID in the basetable
    gisidcntatbl    NUMBER; -- variable for count of same GISID in the "A" table

BEGIN
    IF :new.gisid IS NULL
        OR :new.gisid = 0 THEN
      :new.gisid := :new.objectid;
      -- If statement to check if the new GISID
      -- being added is null or zero. If it is, then we give it the object ID.
    ELSE
      --Get count of GISID occurances in the base table
      SELECT Count (*)
      INTO   gisidcntbasetbl
      FROM   ES_WASTERECEPTACLES
      WHERE  ES_WASTERECEPTACLES.gisid = :new.gisid;

      --Get count of GISID occurances in the A table
      SELECT Count (*)
      INTO   gisidcntatbl
      FROM   A5461
      WHERE  A5461.gisid = :new.gisid;

     --If counts are greater than 0 then we set it to the new objectID.
      IF gisidcntbasetbl > 0
          OR gisidcntatbl > 0 THEN
        :new.gisid := :new.objectid;
      END IF;
    END IF;
END;

However, the problem arises when I go to create a feature using a web editing session using a ArcGIS Server Feature Service. Would anyone have any ideas about this? Possible pointers. The data gets written to the table accordingly, but the GISID trigger doesn't seem to run.

Update: I was able to configure the trigger the following way to get it to work with the feature service. However, I've been told by many parties that triggers on A tables is a bad idea. So I have since abandoned this method. We are using versioned views on feature classes to generate the unique IDs after hours.

TRIGGER "Ownername"."A5671_GISID"
  BEFORE INSERT OR UPDATE ON Ownername.A5671
  FOR EACH ROW
DECLARE
    gisidcntbasetbl NUMBER;
    gisidcntatbl    NUMBER;
    tblMutating Exception;
    Pragma Exception_init(tblMutating, -04091);
BEGIN
      SELECT Count (*)
      INTO   gisidcntbasetbl
      FROM   ES_WASTERECEPTACLES
      WHERE  ES_WASTERECEPTACLES.gisid = :new.gisid;

      SELECT Count (*)
      INTO   gisidcntatbl
      FROM   ES_WASTERECEPTACLES_VW
      WHERE  ES_WASTERECEPTACLES_VW.gisid = :new.gisid;

    IF :new.gisid IS NULL OR :new.gisid = 0 THEN
      :new.gisid := :new.objectid;
    ELSE
      IF gisidcntbasetbl > 0 OR gisidcntatbl > 0 THEN
        :new.gisid := :new.objectid;
      END IF;

    END IF;
EXCEPTION
  WHEN tblMutating THEN
    IF :new.gisid IS NULL OR :new.gisid = 0 THEN
      :new.gisid := :new.objectid;
    ELSE
      IF gisidcntbasetbl > 0 OR gisidcntatbl > 0 THEN
        :new.gisid := :new.objectid;
      END IF;

    END IF;
END;


texts: Joining multiple points to polygon to calculate values for polygons using QGIS?

texts:
I have a point layer with houses and their prices, and I have a polygon town layer.

If i join the point layer to the polygon layer in QGIS using 'spatial join' will the price associated with the specific town polygon be the average price of all the points associated in the polygon?


texts:
I am a beginner in working with geospatial data. What I have done so far:

1) I created a map chart visualization in spotfire.

2) I created a shapefile using QGIS.

3) I added the shapefile in the spotfire using Add Data Table -> File

4) I added a feature layer into map chart and used/applied the shapefile    data

So far so good.

But now I guess the shapefile is static data?

How can I refresh the shapefile so that it reflects the changes in the underlying base database? BTW the base or master data is in Oracle.

Versions:
OS - Windows 8.1

QGIS - 3.0.1

Spotfire - 7.11.0

This is the first time I am using either spotfire and qgis.


texts: How to Calculate fields for attribute table using ModelBuilder?

texts:
I am working with the ModelBuilder tool in ArcMap. I have created a simple model that takes the Strip Map Index Features as an input. I have added fields to the model to produce more fields in the attribute table. When I run my model, it works as the original Strip Map Index Features tool should work, however, in the attributes table, I see my fields that I added, but they are not being populated / calculated.

I am not sure how to calculate / populate these fields?

I have searched around the net for solutions but am not getting too may concrete answers as I am still pretty new to using ModelBuilder.


texts:
I have approximate coordinates of a box I need to work with the data, but I want the integer window in order to use the exact edge pixels.  Using gdal_translate I get the box using projwin but I want to know the computed srcwin and use that instead.
How can I get it?
gdal_translate -projwin -3073414.9453 1649666.7710 -1749065.1524 2345626.7903 ../data/goes16.abi-2021.0206.1601-CMI-C03_1km.tif goes16.abi-2021.0206.1601-CMI-C03_1km.tif
Input file size is 5000, 3000
ERROR 1: buildCS: missing UNIT
0...10...20...30...40...50...60...70...80...90...100 - done.

The data info is
$ gdalinfo ../data/goes16.abi-2021.0206.1601-CMI-C03_1km.tif
Driver: GTiff/GeoTIFF
Files: ../data/goes16.abi-2021.0206.1601-CMI-C03_1km.tif
Size is 5000, 3000
ERROR 1: buildCS: missing UNIT
Origin = (-3627271.328111211769283,1583173.512170388596132)
Pixel Size = (1002.008657743770527,1002.008657743770527)
Corner Coordinates:
Upper Left  (-3627271.328, 1583173.512)
Lower Left  (-3627271.328, 4589199.485)
Upper Right ( 1382771.961, 1583173.512)
Lower Right ( 1382771.961, 4589199.485)
Center      (-1122249.684, 3086186.499)
Band 1 Block=5000x1 Type=Float32, ColorInterp=Gray
  NoData Value=-1
  Metadata:
    add_offset=0
    ancillary_variables=DQF
    cell_methods=t: point area: point
    coordinates=band_id band_wavelength t y x
    grid_mapping=goes_imager_projection
    long_name=ABI L2+ Cloud and Moisture Imagery reflectance factor
    NETCDF_VARNAME=CMI
    resolution=y: 0.000028 rad x: 0.000028 rad
    scale_factor=0.00031746001
    sensor_band_bit_depth=10


texts: I need to use IObjectClassEvents in my project. I don't know how to start, can any one give me a simple explanation, or an example in C#.


texts: Export topojson from Mapshaper with an ID field that is a composite created from multiple fields

texts:
I've got some GIS data with many data fields for each feature. I'm using Mapshaper to simplify it into a light, lean topojson file.

I want the ID fields of these features in the output to be a modified composite of different fields, for example: fieldA_fieldB.

I've tried putting an expression in the export option:

"drop table" "id-field=fieldA+'_'+fieldB"

...but it didn't work. I can't immediately see anything in the command reference to do what I want to do.

For bonus points I'd also like to run an expression over the field to modify it in other ways, for example, one of my fields is a 3-digit number with preceding zeros (e.g. 092) and if possible I'd like to remove these while creating the topojson, e.g. taking 092 and someName and outputting the ID field as 92_someName. If this isn't possible in Mapshaper I can work around it.


texts: Accuracy of Google Maps geo-coordinates vs high precision GPS receiver

texts:
I need to know how accurate coordinates obtained from Google Maps/Earth are. Are they 'quasi absolutely' (I know there is no absolut location determination)?

In other words, if I record the coordinates of a field object (e.g. a small tree or shrub in a meadow) using a two-frequency geodetic GPS receiver and I also obtain coordinates of the same object from Google Maps, are these lat and lon coordinates identical or is there a deviation between the coordinates recorded by high precision receiver and the coordinates derived from the software?

Sorry for my question, but I am not a GIS expert, just a biologist, so I am a little bit confused regarding that. I need to know it for field measurement purposes.


texts: Showing top 5 through pie charts/graphs using ArcGIS for Desktop?

texts:
With ArcGIS, I have to display pie graphs for each community district. These pie graphs must show the top 5 cars for each district. I already have the spread sheet and the shapefile, where I can join the two. The problem is that there 10 types of cars within the spread sheet.
How can I make pie graphs that reflect only the top 5 brands, and excludes all else, on a per District basis?

The spreadsheet looks something similar to this:

The result has to look something like this (notice the charts per every district):


texts: Displaying previous and current year with dynamic text?

texts:
Is there a way to display previous and current year with dynamic text?

If so, what is the formatting?

I'm using ArcMap 10.0


texts: zoo-project missing lib libzoo_service.so.1.5

texts:
While running this command in zoo-project on ubuntu 14.04 , 64 bit

./zoo_loader.cgi "request=Getcapabilities&servise=wps"

./zoo_loader.cgi: error while loading shared libraries: libzoo_service.so.1.5: cannot open shared object file: No such file or directory

A file seems missing. How can I fix it ?


texts: "Spread" quantities from points to underlying raster map within a radius

texts:
I need to generate a raster map by "spreading" point values to the surrounding pixels, with spreading criteria based on the pixel Boolean value (T/F) and maximum distance.
For example, if I have a point with value 100 (representing kg of manure), I want to spread those 100 kg in the surrounding pixels within a maximum distance (radius) of 20 km. Ideally I would also like to flag pixels that should not be considered (do not receive manure) using the Boolean value. The spreading can be homogeneous (all pixel get the same value until I reach 100) or follow a distance gradient, it is not so relevant at this stage, but the sum of all pixels must correspond to the sum of all points values.

So far I have prepared the points layer, the underlying raster binary map and the distance map with max radius but I am struggling to find the GIS tools/workflow to accomplish the "spreading", I have checked the distance analysis tools with little success. I ideally work with QGIS but also ArcGis is fine. I am more concerned about the strategy to follow than the tool itself.


texts:
I'm working with the dataset Redwood (62 redwood trees in a 23^2m square).

I intend to test whether these are random or not.

In what cases would I prefer Nearest Neighbor Analysis and in what cases K Analysis?


texts:
I want to determine which points from a set of hundreds of geographic coordinates are located into a shape polygon. I was able to convert all the coordinates (latitude and longitude ) into a SpatialPointsDataFrame and I can read and plot the shapefile in R as well. A graph of my shp file together with the points is:

From similar questions I was trying to use the function point.in.polygon in the sp package as well as the the over() function.

Polygon: polygon1,
Points: spdf

pt.in.poly <- sp::over( spdf, polygon1, fn = NULL)

or:

new_shape <- point.in.poly(spdf, polygon1)

but in both cases the result I get is:

Error: identicalCRS(x, y) is not TRUE

The SpatialPointsDataFrame was created with the coordinates: CRS("+proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0") and the shapefile have the CRS arguments: +proj=cea +lon_0=0 +lat_ts=30 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0 , so they seem to be the same, I am not sure, Im not an expert on this.

If its a problem of coordinates system how can I fix it? or what am I doing wrong?


texts:
I have a shapefile containing streets that have to be counted.

But these streets in each case consist of several polylines.

Maybe I should buffer these polylines and union the generated polygons that have the same name as well as they overlap.

Is there a tool or do I have to write a VBA script or something?


texts: Search multiple GeoServer layers by conditions

texts:
I need a bit of help with GeoServer and querying information.
For example, I would like to search GeoServer for Locations where Location has specific fields:
My build-up query would look like:
 WHERE type ILIKE 'Gas'   OR  (   borehole_s ILIKE 'Prod'   AND   planned_td ILike '0'   )  )

type, borehole_se & planned_td are fields of Features on Layers, but I would like to search across multiple layers.
Is something like that even possible? I have read that using CQL Filter is a good set.
My query should look simmilar to this one:
layers=layer1,layer2,layer3 cql_filter=layer1.prop_name1 = 1 AND layer2.prop_name2 = 2 OR layer3.prop_name3 = 3

Is that possible with geoserver ?


texts: What is the difference between an IRow and an IObject

texts: In particular: what is the difference between an ITable and an IObjectClass? As far as I understand the latter may be asked to get all its related classes as well. Are there any more differences that affect when to use which? Furthermore every table within an DBMS is an ITable, whereas only those registered to the Geodatabase are also ObjectClasses.


texts: Getting Exported bands must have compatible data types; found inconsistent types: Float64 and Float32 using Google Earth Engine

texts:
I'm trying to export sentinel-1 bands with this code in Google Earth Engine but I have recently this error. I didn't have this problem in the past. So here is the code.

The code:

var start = new Date("02/05/2015");
var end = new Date("03/05/2015");

  var s1 = ee.ImageCollection('COPERNICUS/S1_GRD')
      .filterDate(start, end)
      //.filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VV'))
      // Filter to get images collected in interferometric wide swath mode.
      //.filter(ee.Filter.eq('instrumentMode', 'IW'))
      .filterBounds(geometry);

var count = s1.size().getInfo();

for (var i = 0; i < count ; i++) {
  var img = ee.Image(s1.toList(1, i).get(0));
  var geom = img.geometry().getInfo();
  Export.image(img, img.get('system:index').getInfo(), {
    'scale': 20,
    'crs': 'EPSG:4326',
    'region': geometry.toGeoJSONString()
});
}
s1 = s1.toUint16();

Export.table(s1,'Sentinel1_csv');

print(Chart.image.seriesByRegion(s1, geometry, ee.Reducer.mean(),'VH')
.setOptions({title: 'VH mean value over time on R3'}));


texts: Downloading Hec-GeoHMS for ArcGIS 10.3.1?

texts:
I can't download geohms from this link http://www.hec.usace.army.mil/software/hec-geohms/.

Can anyone help me to get Hec-GeoHMS for ArcGIS 10.3.1?

The doesnot responds and I could not get a Hec-GeoHMS module which is required for my project in Hydrology.

Please help me out to get a set-up file of that?


texts: Convert lat/lng to pixel in UTM image files

texts:
This is my first post on this site so please be gentle :)

I have a number of large image files that map locations around the world. These image files are in UTM projection and I am looking to write a simple algorithm that converts a lat/lng to a filename and then an x, y co-ordinate representing a pixel in the image file.

I would also like an equivalent algorithm that takes a filename and x, y co-ordinate as input and returns a lat/lng as output, although this is less essential.

Also, if converting a lat/lng to a filename is too tricky then I would settle for just having the algorithm return a pixel value (assuming you somehow manually point it to the correct image file).

Here is all the information I think may be relevant (but please let me know if more is required):

The image files are in PNG format
Each pixel represents 30 metres
The co-ordinate system is WGS84
The files depict information as follows:
From 60° N - 60° S: 5° (latitude) * 6° (longitude)
From 60 - 80° N and 60 - 80° S: 5° (latitude) * 12° (longitude)
The starting latitude for files in the northern hemisphere is the lower left corner of the file, while for the southern hemisphere it is the top right corner of the file
As an example, the filename which contains Sydney, Australia is s56_30 while the filename which contains Miami, USA is n17_25

My preference is to first write my algorithm in PHP, but I will also be writing a JavaScript version. For the purposes of this answer, pseudo-code will be fine. Does such an algorithm already exist?


texts: What is the new alglist and alghelp in QGIS 3.0 Processing?

texts:
Accessing the new QGIS 3.0 processing scripts through the Python console is proving to be a challenge for me, especially since the old processing.alglist() and processing.alghelp() commands appear to be defunct.

How does one call up a list of processing scripts?
How does one call up the help info for an individual script?


texts: Can I add WMS layers to a MapGuide 6.5 map?

texts: A bit of a long shot, but I recall a few years ago seeing a WMS 'connector' for MapGuide 6.5 that allowed you to add WMS layers to a MapGuide 6.5 map.  I can't seem to find it anywhere now, and am pretty sure it's impossible given the technology, but thought I would ask.  Does such a thing exist?


texts: GEE: How to Create a Buffer Around Canny Edges

texts:
In google earth engine I've managed to create a layer using the canny edge detection algorithm (which outputs an image).  That layer takes on values of 0 or 1. Now I want to create a buffer around those edges.

My first thought was to find the pixel values in the image that have value of 1 and then use the coordinates to make a multi-point, and then apply the buffer to that layer. Unfortunately though I'm stuck at the first step of finding the coordinates of the pixels that have the corresponding value.

Here's my basic code for reproduction, note the bottom two lines will throw an error but I'm not sure how to achieve it.

// Create a geometry representing an export region
var geometry = /* color: #0b4a8b */ee.Geometry.Polygon(
        [[[62.942261953123534, 33.91959535929101],
          [62.931275624998534, 33.47629096859868],
          [63.870606679686034, 33.45337831094604],
          [64.00244261718603, 33.9742779426479]]]);

//To view exactly where
Map.centerObject(geometry,10);
Map.addLayer(geometry, {color: 'FF0000'}, 'geodesic polygon');

// Load Landsat 5 data, filter by date and bounds.
var collection = ee.ImageCollection("LANDSAT/LE07/C01/T1")
  .filterDate('2003-01-01', '2003-05-01')
  .filterBounds(geometry);

// Also filter the collection by the IMAGE_QUALITY property.
var filtered = collection
  .filterMetadata('IMAGE_QUALITY', 'equals', 9);

// Create two composites to check the effect of filtering by IMAGE_QUALITY.
var goodComposite = ee.Algorithms.Landsat.simpleComposite(filtered, 75, 3);

// Add PC band
var Panchromatic = goodComposite.select(['B8']);
Map.addLayer(Panchromatic,
             {gain: 1.5},
             'Panchromatic');

//////////////////////////Edge Detection///////////////////////

// Detect edges in the panchromatic composite.
var canny = ee.Algorithms.CannyEdgeDetector(Panchromatic, 12, 2);

// Mask the image with itself to get rid of areas with no edges.
canny = canny.updateMask(canny);
Map.addLayer(canny, {min: 0, max: 1, palette: 'FF0000'}, 'CE Pan');

// definitely doesn't work
var canny_1 = (canny == 1).get(position);
Map.addLayer(canny_1);


texts: Fill a layer's attribute table from another layer's attribute table

texts:
I am working on ArcGIS 10.1.
I have a layer of polygons divided into squares of 200m/40m with the attribute table filled.
I have a second layer of polygons divided into squares of 200m/60m with an empty attribute table.

The second layer is the new division into squares of the first one, so they have the same attributes.

How can I fill the second layer using the data on the first one using ArcGIS 10.1?
I want the second layer to take the value of the centroids of the first layer.


texts:
I need to analyze differences (historical) in coverage of some species (seagrass Posidonia). Although its a marine species, subject area is very shallow and even from common satellite and aerial imagery, species can be observed significantly (screenshot attached).

I need to create 2 polygons (old - new imagery) that encompass coverage of that species and by vector overlay method need to to create third polygon which will show only gain/loss.

Is there possibility to automatically (by a GIS software) create polygon based on color differences?


texts: How to update column based on data from another table (Mapinfo Pro)?

texts: What I want to do is update column (Table A) by values from another table (Table B) using condition intersects. There are few objects in table B which intersects one object from table A. When I try to do this I get only one value to column (Table A), but these are not all. How to update column by all values from Table B?


texts: Domain values in Attribute sidebar window drop down not reflecting values in Domain properties after editing values in Geodatabase Domain

texts:
I have a File Geodatabase with a Domain called "Pipe Material" and it has about a dozen values listed in it.  These have been applied to feature classes for a bit.  We recently reduced the number of materials in the Domain values after re-coding the records in feature classes under those Domains.  For example incorrectly coded "C" value records became "CONC".

I went into the properties of the Domain in the Geodatabase properties and cleaned up the list, removing "C" but leaving "CONC" etc.

However when I am in an edit session and create/edit a feature that uses this Domain, I am not seeing the proper Domain values in the drop-down list of the attribute sidebar window, nor do I see the correct values in the regular attribute window's drop-down list for the Domain on that field.  I am still seeing values i have deleted from the Domain.

How can I make sure only values in the Domain are available in the attribute's drop-down list?


texts: Polygon holes/rings are showing up as polygons in QGIS

texts:
I am having an issue in both QGIS 2.18.17 and QGIS 3.0.1. It is to do with holes/rings. Where there are meant to be holes/rings, actual polygons are showing, these are effectively coming in as polygons on top of polygons. I haven't produced these shapefiles but this is a problem for display purposes. A workaround to this is to upload the shapefiles to a postgres database, this displays the polygons as they should with the holes/rings.

Is there a setting in QGIS that can be turned on or configured to consume these polygons in the correct way?

UPDATE

The problem appears to be with converting from MapInfo .TAB to .SHP. The .TAB is displaying properly, the conversion to .SHP loses the rings.

I have attached screenshots showing the issue (green correct, red issue).


texts: Which coordinate reference system should I use to have more precision while calculating polygon area? 4326 or convert to the one specific to my area?

texts:
We are saving our drawn polygons in our database with the coordinate system 4326.
The polygons drawn are all in Spain (where I came to find out the adequate coordinate system for Spain is EPSG:2062).
This been said, which one will calculate with more accuracy the area of the polygon?
"st_area(polygon)" or "ST_area(ST_Transform(polygon::geometry, 2062))"?
I know that using the one related to my country will give me (in theory) the most accurate results/georeferencing, but is it really true? Also, and since we are drawing in a map that only supports 4326, will we have a more accurate calculated area by converting the coordinate system and calculating afterwards, or should we calculate the area with the current coordinate system?


texts:
I want to calculate when a building close to a train tunnel construction project will (likely) be exposed to noise. I have set the noise limit in distance based on similar projects, so buildings closer than 200 meters need to be notified, and they need to know 4 weeks in advance. The noise will likely be excessive in a 3D radius around the tunnel boring machine head. How can I calculate which buildings will be affected by noise in a certain time period? It would be great to be able to visualise this using time slider or animation.

I have the following data (see illustration):

LINE (underneath points): train track line with time data (date, not time, of expected finishing of that train track segment)

POINTS (green): the same as the line, just with 1 point for each meter of the train track which is under construction and the planned finishing date of each meter, seen in illustration with date labels
POINTS (pink): nearby buildings who might be bothered by the noise of the train track construction
POLYGON (blue): 200 meter buffer zone around the train track, which is the distance that the noise is expected to exceed noise limits

I have tried creating 200 meter 3D buffer zones around each tunnel track point (each meter) to see which buildings fall into each buffer sphere, but some buildings are then included in 200 different spheres. Does anyone know of a simpler solution?

I am using ArcGIS 10.3


texts:
Can I have multiple server URLs with OpenLayers.Layer.TMS pointing at the mbtiles.php and my mbtiles file as in https://github.com/bmcbride/PHP-MBTiles-Server?

I have been trying to implement three servers as in this example to get multiple urls: http://openlayers.org/dev/examples/multiserver.html but have had no luck.

My three servers are:

tile1.dendrite.ca
tile2.dendrite.ca
tile3.dendrite.ca

My OpenLayers code is:

var normaltave06 = new OpenLayers.Layer.TMS("June Average Temperature", "mbtiles.php", {
        getURL: normaltave06URL,
        isBaseLayer: false
});
function normaltave06URL (bounds) {
        var db = "normaltave06.mbtiles";
        var res = this.map.getResolution();
        var x = Math.round ((bounds.left - this.maxExtent.left) / (res * this.tileSize.w));
        var y = Math.round ((this.maxExtent.top - bounds.top) / (res * this.tileSize.h));
        var z = this.map.getZoom();
        return "http://tile1.dendrite.ca/mbtiles.php?db="+db+"&z="+z+"&x="+x+"&y="+((1 << z) - y - 1);
}

This code is working with one server, can anybody suggest a way to return all three servers as the tile source in this example?


texts:
Given a Geometry object in OpenLayers 3. How would one go about getting its center?

Older versions of OpenLayers provided a getCentroid method. There was also a getBounds workaround. But these appear to be removed in OpenLayers 3.


texts: Where can I find the Forest Cover Density (FCD) mapping software

texts: Does anyone know where I can find the latest Forest Cover Density (FCD) mapper software, as introduced in this paper.


texts: Determining coordinates for CAD file using ArcGIS for Desktop?

texts:
I have a CAD file of a building and I want it to be replaced on Google Maps with coordinates.

The DXF-file is on a local coordinate system (undefined). I convert this file to SHP-file for editing. I have corner coordinates from Google Maps. I want to determine the WGS84 coordinates for this SHP-file.

Should i use the affine transformation method (what are the parameters?) or other method for ArcGIS?


texts: Creating generic coordinate system in QGIS

texts:
So I'm new to QGIS (3.4) and haven't touched any mapping software in 15 or more years.  I'm slowly finding my way around but I'm currently struggling to create a generic coordinate system for a map project of a generic world as I'm not familiar with proj4 format.  I've been going over proj4 but could sure use some help in getting started.  My simple generic world is as follows:

The X axis currently extends from -2045 to 2045

The Y axis also from -2045 to 2045

Z is 0 to 1000

Each X,Y unit is a meter

All I need to do at this point is define a generic coordinate system that will allow me to map simple vector data - X,Y points and later lines. Eventually I may want to work with elevation as well.

EDIT

I'm wanting (hoping) to use QGIS to make some simple maps of a fictional world that is flat, simply X, Y, and Z coordinates.  Since the world is flat and not round, I don't really need a projection per se. I just need to specify that each X, Y, Z unit is a distance of 1 meter with the world extending 2,045 units each direction of a 0, 0 center point. So -2045 to 2045 X(east, west) and -2045 to 2045 Y(north, south).  Also there is elevation (Z).  So I need to figure out how to define a "projection" and then add vector features (points, lines, polygons) as simply as possible using X, Y, Z coordinates.  Note; I won't be doing anything with elevation at this point but possibly later.  I've never used QGIS and my last experience with any mapping software was some version of ArcView 3.X years ago so I'm flying blind here.  I really just need to figure out how to specify my world and insert features with X, Y coordinates then make a map layout.