texts: What is wrong with my WFS-T protocol setup?

texts:
So I want to transfer some Vector Layer Features from javascript code to my geoserver and then to postGIS, my code looks like this:

    saveStrategy = new OpenLayers.Strategy.Save();

    saveStrategy.events.register("success", '', alert('Success'));
    saveStrategy.events.register("failure", '', alert('Failure'));

    stationsMarkersLayer1a = new OpenLayers.Layer.Vector("ODC_Private_Graphics_Data", {
        strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy],
        projection: 'EPSG:4326',
        protocol: new OpenLayers.Protocol.WFS({
        version: '1.1.0',
        url: "file://http://localhost:8080/geoserver/wfs",
        featurePrefix: 'leoforia',
        featureNS: 'http://leoforia/application/catalogLayer',
        featureType: 'no 1 points',
        geometryName: 'geom',
        extractAttributes: true,
        srsName: 'EPSG:4326',
        isBaseLayer: false,
        visibility: true ,
        schema: 'http://localhost:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0&;typename=leoforia:ODC_Private_Graphics_Data'})
        });

    stationsMarkersLayer1a.id = '1' ;
    stationsMarkersLayer1a.name = 'Blah Blah';

    var stationMarkers_1a = new OpenLayers.Feature.Vector(
            new OpenLayers.Geometry.Point(22.96336,39.35071).transform(fromProjection, toProjection),
            {description:'Mark1'} ,
            {externalGraphic: 'redMarker.png', graphicHeight: 25, graphicWidth: 21, graphicXOffset:-12, graphicYOffset:-25  }
        );

    stationsMarkersLayer1a.addFeatures(stationMarkers_1a);

    map.addLayer(stationsMarkersLayer1a);

    saveStrategy.save() //I have seen this command with a semi colon and without and I have tried both.

Supposing 'leoforia' is the name of the workspace,Workspace URI is right and I have a layer in PostGIS and GeoServer named 'no 1 points' and the column name is indeed 'geom', what is wrong with my code? Why won't it save the Geometry Points/Feature to the database?  Also have in mind that all this code is inside my init() funciton that runs on page load.

For any additional information, please ask!


texts: Interpolating point data using scipy/python is not covering rectangular extent

texts:
I am trying to write a python script with help of GDAL to a red point shapefile  and considering a field value as z vales where I need interpolation to get raster with interpolated values. I am using scipy grid data for interpolation.

My interpolation code is:

zi = scipy.griddata((x, y), z, (xi, yi), method='cubic')

then I tried to write the interpolated data to raster and I got the following result as screen shot:

It shows interpolation inside points. But, I want to interpolate my points to cover the whole rectangular space.

Does anyone have idea how it works?


texts: What is the SRS code for Lambert Conformal Conic projection and GCS Everest Definition 1962?

texts:
I have a shapefile with Geographic Coordinate System is "GCS_Everest Definition 1962" and the Projected Coordinate System is "Lambert_Conformal_Conic". I want to add this shapefile in Geoserver. But I don't know which code is used as the SRS for this Projection System. I don't know what to put in "Declared SRS" field.
Here is the WKT

PROJCS["Lambert Conformal Conic",
GEOGCS["GCS_Everest Definition 1962",
DATUM["Everest Definition 1962",
SPHEROID["Everest Definition 1962",
6377301.243, 300.8017255654936]],
 PRIMEM["Greenwich", 0.0],
UNIT["degree", 0.017453292519943295],
AXIS["Longitude", EAST],
AXIS["Latitude", NORTH]],
PROJECTION["Lambert_Conformal_Conic_2SP"],
PARAMETER["central_meridian", 68.0],
PARAMETER["latitude_of_origin", 32.5],
PARAMETER["standard_parallel_1", 35.31445944444445],
PARAMETER["false_easting", 2743196.4],
PARAMETER["false_northing", 914398.8],
PARAMETER["scale_factor", 1.0],
PARAMETER["standard_parallel_2", 29.655283888888892],
UNIT["m", 1.0],
AXIS["x", EAST],
AXIS["y", NORTH]]


texts: Connect two points on a map that has the same label/name

texts:
We have two sets of coordinates for a list of places and ideally the coordinates should match, but they don't.

We would like to illustrate this on a map to connect pairs of coordinates that have the same place name/label.

If we map all the points, we just get two sets of different colored markers and we do not know which point from one layer corresponds to the same point on the other layer.

Please help!  Or, if there is a better idea of how to depict these discrepancies on a map, please let me know.


texts: Optimal point distribution within polygons

texts: I have a polygon and want to distribute a certain number of points within that polygon. The Points should have almost the same distance to each other and also to the boundary.


texts: How to add multiple attributes to a newly created feature with PyQGIS

texts:
I am creating a form for updating the attribute values of the newly created feature. But when i am updating the values only one attribute field is getting updated. So if i want to update the multiple attributes values of the feature how can i do that? Following is the code which i have created:

var1= None
var2= None
Dialog = None

def formOpen(dialog,layer,feat,listFields):

    global myDialog, myLayer, myFeat, var1, var2
    Dialog = dialog
    layer = layer
    Feat = feat
    var1= dialog.findChild(QLineEdit,"blockId")
    var2= dialog.findChild(QLineEdit,"lineEdit_2")
    buttonBox = dialog.findChild(QDialogButtonBox,"buttonBox")
    buttonBox.accepted.connect(validate)
    buttonBox.rejected.connect(Dialog.reject)

def validate():
    if len(str(var1.text())) > 0 and len(str(var2.text())) > 0 :

        pr = layer.dataProvider()
        idx1 = pr.fieldNameIndex("name")
        idx2 = pr.fieldNameIndex("city")
        print idx1, idx2
        attr1 = [None] * len(pr.fields())
        attr2 = [None] * len(pr.fields())
        attr1[idx1] = var1.text()
        attr2[idx2] = var2.text()
        layer.startEditing()
        Feat.setAttributes(attr1)
        Feat.setAttributes(attr2)
        pr.addFeatures([Feat])
        layer.commitChanges()
        qgis.utils.iface.mapCanvas().refresh()


texts: Google Earth Engine, Supervised Classification

texts:
I am trying to perform a supervised image classification to detect water surface area change on two different LANDSAT TM 5 Images, separated by several years. How can I add the numeric property, 'class', to store the binary landcover values water or non-water in my ground truth points? After creating a collection of points on my image, I  tried splitting the data into the validation and training sets. The points didn't extract the landcover type into the feature collection properties though. I tried editing the feature collection properties from the settings displayed in the imports section at the very top, but I could not specify a numeric property in order to store landcover type.

Here is a link to my code: https://code.earthengine.google.com/9b906a6e605dcdb08c367480f68a7ff7


texts: Adjusting UTM and geographic coordinate data

texts:
I have a dataset with several points in space within a given area.  UTM coordinates (easting, northing in m) or geographic coordinates were recorded for a single point in the vicinity of these points.  Then, locations of each of the other points was recorded based on the distance of a given point along the x- and y-axes (e.g. 5 m, 7 m) from the point where UTM or geographic coordinates were recorded.

Now, how can I determine the UTM coordinates or geographic coordinates of each of these points based on the x,y distances from the point where UTM or geographic coordinates were recorded?

Isn't it appropriate to simply just add the x and y distances to the utm coordinates of the known point to determine the unknown utm co-ordinates of the other points (then use a utm to lat-long converter for determining geographic coordinates)?


texts: How can I make leaflet zoom less with mouse wheel ? If I move my mouse wheel as little as I can, it zooms like 3 levels.


texts: is plotkml no longer updated for current R release?

texts:
I am attempting to use plotkml to read gpx files and plot them using R. Many others have done this with great success. A few examples are below:

https://www.visualcinnamon.com/2014/03/running-paths-in-amsterdam-step-2.html
http://flowingdata.com/2014/02/05/where-people-run/

However it seems like when I try to download the package it no longer is updated to work with the current release of R. I get the error you see below:

  install.packages("plotKML", repos=c("http://R-Forge.R-project.org"))
  Installing package into ‘\peter/users/My Documents/R/win-library/3.3’
  (as ‘lib’ is unspecified)
  Warning message:
  package ‘plotKML’ is not available (for R version 3.3.2)

How do I read in the gpx lat long data besides using plotkml's readgpx function?

I am a beginner when it comes to this sort of computing and just trying to get this visualization to work as a starter.


texts: Any way to extract NUTS-3 shapefile of Germany from Eurostat' shapefile in R (updated)?

texts:
I have downloaded shapefile from Eurostat website (download site for downloading Eurostat shapefile and direct download link of Eurostat shapefile that I am interested in). To be short, I need shapefile of Germany' NUTS3 region only (general concept for NUTS3). To do so, I used rgdal package. Here is the R script down below:

library(rgdal)
library(sp)
library(maptools)

url = "http://ec.europa.eu/eurostat/cache/GISCO/distribution/v2/nuts/download/ref-nuts-2013-03m.shp.zip"
download.file(url, basename(url))
gunzip(basename(url))
rname <- list.files(getwd(), "shp$")

but I got following error anyway:

> eu <- readOGR(dsn = getwd(), layer ="NUTS_RG_03M_2013")
Error in ogrInfo(dsn = dsn, layer = layer, encoding = encoding, use_iconv = use_iconv,  :
  Cannot open layer

don't know why does this happen. Any quick solution? How can I fix this error?

If I fix this problem, I want to retrieve shapefile of only Germany's NUTS3 region (please take a look overview of NUTS3). To do so, I come up with following solution:

nuts2 <- subset(eu, STAT_LEVL_ == 2)
proj4string(nuts2)
coordinates(point_data) <- ~LON + LAT
proj4string(point_data) <- CRS("+proj=longlat +datum=WGS84")
point_data <- spTransform(point_data, proj4string(map_nuts2))
over(point_data, nuts2, by.id = TRUE)

My ultimate goal is to get Germany' NUTS3 level shapefile. How can I correct my above solution? How can I refine my above approach? Is there any more efficient and straightforward way to get certain countries' NUTS3 level shapefile? Any idea?


texts:
I've been working to incorporate GPX file handling within my application with a pretty good degree of success but have just encountered an issue which I don't know how to solve.

When drag/dropping a file which contains shapes I've discovered that these are incorrectly interpreted as routes and it seems that the API can not read the extensions node by default. The trouble is I have no idea how to configure the readExtensions function of the GPX format to deal with this.

I don't really want to have to parse these features manually as the default drag/drop parsing is superfast and I'm sure there'd be a performance hit. This is what I have so far...

 var CustomFormatGPX = function () {
    ol.format.GPX.call(this, {
        // custom options
        readExtensions: function (feature, extensionsNode) {
            console.log(extensionsNode);
            console.log(feature);
        }
    });
};
ol.inherits(CustomFormatGPX, ol.format.GPX);

session.routeFeaturesGPX = formatGPX.writeFeatures(event.features);

So event.features is Openlayers' GeoJSON interpretation of the information and formatGPX.writeFeatures will rewrite this as GPX albeit without reading the extensions correctly. Is there a third party solution which will reparse this as GeoJSON or am I approaching this the wrong way?

There is an issue on the OL3 Github pages but my javascript knowledge is sometimes deficient and I'm struggling to understand what to place in this function. A colleague suggested XPath to try to read and manipulate the data but apparently cross-browser support is patchy. Does anyone have any experience of this?


texts: Replicated Point Pattern: Get Density Variance Between Replicated Patterns and Subtract from Composite

texts:
I have written a lengthy code that dissects differently shaped/sized windows into recognizable components (individual cells in the image), gets the point density within each cell, then builds a whole composite based on averages of each cell.

But because the points are randomly distributed via sf::st_sample() within each cell of the composite, there is some variation in the output composites with repeated runs of the code, even though the same information is being fed in.

I want to compare composite patterns under two treatments, but I would like to control for the variation created by my composite-creating code. Is there a way to remove variation in replicated patterns (e.g. I run my composite code on the same data multiple times, then compare the outcomes for variation).

Here's 100 reps of the composite function overlaid, and a single rep of the composite.

Any way to account for the variation before comparing it to another pattern?

(I am sure this is confusing, especially without code, please let me know what needs to be clarified.)

Edit: I am looking to compare the two patterns via spatstat::eval.im(treatment1finalcomposite > treatment2finalcomposite), and I am hoping to remove the background "noise"/variation in each finalcomposite via the methods ya'll suggest.


texts: Speed up GeoJSON clustering and rendering?

texts:
I am rendering 10,000 points with Leaflet's markercluster library.

I fetch these 10k points from our server. This takes about 700ms. It takes Leaflet about 3 seconds to cluster these points and display them on our map. How can I speed up this clustering and rendering?

Here is a minimal example of my leaflet code. We are using the vue.js framework.

createMapWithLeafletAndMapTiler() {
  // eslint-disable-next-line
  var satelliteTilesLayer = L.tileLayer(MAPTILER_SATELLITE_URL, {
    maxZoom: 18,
    minZoom: 2
  });
  // eslint-disable-next-line
  var streetTilesLayer = L.tileLayer(MAPTILER_STREETS_URL, {
    maxZoom: 18,
    minZoom: 2,
    attribution: MAPBOX_ATTRIBUTION
  });
  var baseMaps = {
    Satellite: satelliteTilesLayer,
    Streets: streetTilesLayer
  };
  // eslint-disable-next-line
  this.myMap = L.map("leafletMapId", {
    center: [-50.99404, 39.75621],
    zoom: 5,
    layers: [streetTilesLayer]
  }).setView([39.75621, -104.99404], 3);

  this.markers = L.markerClusterGroup();

  L.control.layers(baseMaps).addTo(this.myMap);

  this.getGeoJsonFromServer();
}

async getGeoJsonFromServer() {
  var timeBeforeFetch = new Date();
  var bounds = this.myMap.getBounds();
  this.swLat = bounds._southWest.lat;
  this.swLng = bounds._southWest.lng;
  this.neLat = bounds._northEast.lat;
  this.neLng = bounds._northEast.lng;
  axios
    .get("/maps/" + this.list_id, {
      params: {
        q: this.searchTerms,
        swLat: this.swLat,
        swLng: this.swLng,
        neLat: this.neLat,
        neLng: this.neLng
      },
      headers: { "Content-Encoding": "gzip" }
    })
    .then(
      response => {
        f (!response.data.exceedsLimit) {
          this.geoJsonObject = response.data.geoJson;
          this.geoJsonLayer = L.geoJson(this.geoJsonObject, {
          });
          this.markers.addLayer(this.geoJsonLayer);
          this.myMap.addLayer(this.markers);
        }
      },
      error => {
        store.setErrorMessage("Network error searching list", error);
      }
    );
}


texts: Convert WMS Layers into Image is not Working but it's working for WFS

texts:
I'm using this method to convert the Map containing WMS layer to image later use that image in PDF. Everything is working fine for WFS layers but not with WMS layers.

function CaptureImage()
{
    map.once('postcompose', function(event)
    {
               console.log(event);
               var canvas = event.context.canvas;
               console.log(canvas);
               if (navigator.msSaveBlob)
               {

                    navigator.msSaveBlob(canvas.msToBlob(), 'map.png');

               }
               else
               {

                    canvas.toBlob(function(blob)
                    {

                       var imgData= new Image();
                       imgData = canvas.toDataURL("png");

                       // Later I'm saving this image, but this is
                       //                 workingfor
                         //   WFS but not WMS Layers ;
                    });
               }

    });
}


texts:
I am installing geonode for the first time on CentOsS using this document. And have ran into an issue, when I run python manage.py syncdb --noinput I get the error:

Traceback (most recent call last):
  File "manage.py", line 29, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
    utility.execute()
  File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 346, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 394, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 445, in execute
    output = self.handle(*args, **options)
  File "/usr/lib/python2.7/site-packages/django/core/management/commands/syncdb.py", line 25, in handle
    call_command("migrate", **options)
  File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 120, in call_command
    return command.execute(*args, **defaults)
  File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 445, in execute
    output = self.handle(*args, **options)
  File "/usr/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 93, in handle
    executor = MigrationExecutor(connection, self.migration_progress_callback)
  File "/usr/lib/python2.7/site-packages/django/db/migrations/executor.py", line 19, in __init__
    self.loader = MigrationLoader(self.connection)
  File "/usr/lib/python2.7/site-packages/django/db/migrations/loader.py", line 47, in __init__
    self.build_graph()
  File "/usr/lib/python2.7/site-packages/django/db/migrations/loader.py", line 191, in build_graph
    self.applied_migrations = recorder.applied_migrations()
  File "/usr/lib/python2.7/site-packages/django/db/migrations/recorder.py", line 59, in applied_migrations
    self.ensure_schema()
  File "/usr/lib/python2.7/site-packages/django/db/migrations/recorder.py", line 49, in ensure_schema
    if self.Migration._meta.db_table in self.connection.introspection.table_names(self.connection.cursor()):
  File "/usr/lib/python2.7/site-packages/django/db/backends/base/base.py", line 162, in cursor
    cursor = self.make_debug_cursor(self._cursor())
  File "/usr/lib/python2.7/site-packages/django/db/backends/base/base.py", line 135, in _cursor
    self.ensure_connection()
  File "/usr/lib/python2.7/site-packages/django/db/backends/base/base.py", line 130, in ensure_connection
    self.connect()
  File "/usr/lib/python2.7/site-packages/django/db/utils.py", line 98, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/usr/lib/python2.7/site-packages/django/db/backends/base/base.py", line 130, in ensure_connection
    self.connect()
  File "/usr/lib/python2.7/site-packages/django/db/backends/base/base.py", line 119, in connect
    self.connection = self.get_new_connection(conn_params)
  File "/usr/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 176, in get_new_connection
    connection = Database.connect(**conn_params)
  File "/usr/lib64/python2.7/site-packages/psycopg2/__init__.py", line 164, in connect
    conn = _connect(dsn, connection_factory=connection_factory, async=async)
django.db.utils.OperationalError: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

The steps seem straightforward, what am I missing? The only thing I did differently than the doc is I specified a remote geoserver instead of a local one but it is on the same network and reachable.  What is that error?

Edit :1

Just to check and see if it was a problem with my remote server I also declared the OGC-Server as http://localhost/geoserver/ as the instructions say and the result is the same


texts: How does QGIS determine the first located feature option when using QGIS Join by location?

texts:
I have used QGIS process 'Join Attributes by Location' in one of the models I have built and I have now been asked to explain in detail exactly how the model is determining the results.
I am using it to fill in spaces in the data by joining by location using the touching option with 0.1 precision and taking attributes of the first located feature.
I have tried making mock squares and applying the same principles to determine what way QGIS picks the first located feature but I have been unsuccessful in determining how exactly it is doing it.
I have considered N-S, E-W and also the order of which the Data being transferring has been created but none of them seems to explain how it chooses the feature.
I have looked for answers to this online and in the QGIS website but have found no explanation

Above is a sample of what results when trying this technique. The light blue are the original polygons with their creation order attached in the attribute table and the purple is the number that joins when testing join by location to assign a number to the blank purple polygons from the light blue ones.
Does anyone know exactly how QGIS selects this number to assign?
QGIS Version 2.18.28


texts:
In OpenLayers, the geolocation object has a "once" event:
https://openlayers.org/en/latest/apidoc/module-ol_Geolocation-Geolocation.html#once
How can I use this event?
This throws an error:
// Vue
export default {
 data() {
  return { geolocation: null }
 },
 mounted() {
  this.geolocation = new Geolocation({ ... })
 },
 methods: {
  geolocAtPoint() {
    // Here I would expect geolocation data that is return only once...
    console.log('this.geolocation.once("change:position") =',
    this.geolocation.once('change:position'))
  }
}

Eventually, I would like to be able to tab on the map and get the geolocation data of that very point (corresponding to the vanilla "navigator.geolocation.getCurrentPosition(...)").


texts: Convert contour shapefile to MicroStation dgn file in QGIS

texts: I have a contour shapefile in QGIS with labels on (elevations for labels). I am able to convert it to MicroStation dgn file but the elevation labels of the contour shapefile are not converted with the actual contour lines. I can manually add elevations to the contour lines in MicroStation but it is time consuming. Is there a way to convert not only the contour lines in shapefile but also its labels to dgn?


texts: How to authenticate secured layer on Geoserver from javascript (leaflet/openlayers) requests

texts:
I have a Geoserver instance on a docker container that sits on an Ubuntu host. At the moment, requests to the Geoserver container are forwarded on through the host's Apache web server. I am making these requests from a javascript web application.

I would like to secure some of my layers on Geoserver.

My question: how can I provide the proper credentials (presumably, username and password) to access these layers from my javascript app without displaying them in plain view in my source code?


texts: Cause of ExecuteError: ERROR 000539: Invalid field County Insets.OBJECTID Failed to execute (CalculateField)?

texts:
The following script joins two layers on a common id and attempts to use the OBJECTID in the joined table to update records for a field in the input table.  In running it in "current" mode, it moves through the join process ok but then errors out with Calculate.  OBJECTID is from a joined table and I am joining it to an Annotation class, but I'm not sure that is relevant.  Any ideas as to why this doesn't complete?

    mxd = arcpy.mapping.MapDocument("Current")
    dflist = arcpy.mapping.ListDataFrames(mxd)
    for df in dflist:
        if df.name == "County":
            for lyr in (arcpy.mapping.ListLayers(mxd, "", df)):
                if lyr.name == "County Insets":
                    CoInset = lyr
                elif lyr.name == "County Insets Anno":
                    CoAnno = lyr
            print 'Joining ' + CoInset.name + ' to ' + CoAnno.name
            arcpy.AddJoin_management(CoAnno, "TempID", CoInset, "TempID")
            expression = "!" + CoInset.name +".OBJECTID!"
            arcpy.CalculateField_management(CoAnno, "FeatureID",  expression, "PYTHON")

This gives me the following error:

Runtime error  Traceback (most recent call last):
File "<string>", line 14, in <module>   File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\management.py", line 3129, in CalculateField     raise e <br>
ExecuteError: ERROR 000539: Invalid field County Insets.OBJECTID Failed to execute (CalculateField).


texts: Modifying QGIS's quick finder plugin to select the feature after clicking on a search reasult

texts:
I wanted to modify the python code of the quick finder plugin so that it selects the feature being found. At the moment it goes to the location of the feature and shows a QgsRubberBand on it, but does not select the feature..

I don't know much of python. My approach:

I think the only thing reamining is to add the id of the selected feature as a parameter to cLayer.setSelectedFeature(). How can I do that?


texts: Counting animals using near infrared imagery from a drone

texts:
I am playing around with an idea of using a near infrared camera to fly transects to count animals on the ground. I have been involved in such work earlier, but on bigger mammals and observer based from small planes only.

Does anyone know if a near infrared camera on a drone could give images which could give indications on the presence of an animal being warmer than the surrounding ground? The initial animals in question are birds (for example grouse) on the ground with late autumn temperatures (0-5 degrees centigrade). Other animals and background temperatures could be considered.


texts: Load a shapefile into geopandas from a request.files

texts:
I'm trying to receive a simple .shp file, without been zipped, via web request and convert it to a geopandas dataframe. I tried to use io.BytesIO to wrap the file but also didn't worked.. I tried to load directly to geopandas but this is what happened:
File "fiona/_shim.pyx", line 81, in fiona._shim.gdal_open_vector

fiona.errors.DriverError: '/vsimem/9ead9a26f6de48e987cc6474e377012b/9ead9a26f6de48e987cc6474e377012b' not recognized as a supported file format.

The code:
import geopandas as gpd

...

file = request.files[filename]

if file and allowed_file(filename):
    geo2 = gpd.read_file(file)
    print(geo2)


texts: Create a large polygon from separate smaller polygons

texts:
I am working with ArcMap 10.3 using a Basic license.

The Problem:
I have a vast number of sequential, individual polygons that I need to merge into larger pieces.
Every piece that contains the same identity number needs to be merged into one large shape representing the whole.

What I have:

  What I need:
  The Question:
What tools do I have access to that can accomplish this?
My options are very limited, using a Basic license level.
Thousands of these edits will need to be made. Drawing each piece by hand, as I did for my example picture, is a last resort.


texts: Get all displayed layers currently visible in the map

texts:
Angular: 8
Openlayers: 5.2

I am trying to build a dynamic legend that only shows the displayed layers in the map. With a getLegendGraph from mapserver I want to create the legend.
This works great when I filter with getVisible and loop through all the layers.
But now i only want to show layers that you can actually see, to build a legend for example a print.

This is what I have tried.

    // Loop through all the layers
    this.mapService.map.getLayers().forEach((function(layer) {
        // Filter only the visible layers
        if(layer.getVisible()) {
            // create an array with all the created url's
            for (let i = 0; i < layer.values_.source.params_.LAYERS.length; i++) {
                let tempUrl = layer.values_.source.url_ + "&request=GetLegendGraphic&format=image/png&service=wms&version=1.1.1&layer=" + layer.values_.source.params_.LAYERS[i];
                this.visibleLayers.push(tempUrl);
            }
        }
    }).bind(this));

Every layer comes from mapServer.

How can I get all the current displayed layers in the map?


texts: Mean value of pixels nearest to point (per image per point of collections) (Earth Engine)

texts:
I'm trying to extract the nearest pixel value of an Image Collection. So, for a Feature Collection, I get a time series with the mean value of the nearest pixel.

The question here shows how to do it for an Image, I would like to expand this to an Image Collection.

var point1 = ee.Geometry.Point([-92.99620494440309, -37.40033329085335]),
    point2 = ee.Geometry.Point([-96.86339244440309, -41.668454262169]);

var start = ee.Date('2018-12-25');
var finish = ee.Date('2018-12-31');

var chla_collection= ee.ImageCollection('NASA/OCEANDATA/MODIS-Aqua/L3SMI')
  .filterDate(ee.Date('2018-12-25'),ee.Date('2018-12-31'))


texts: I have 88 gdb files on Arcmap that I need to export to csv format. Is it possible to do this in batches? maybe, without using the python window


texts: Vector Ruggedness Measure (VRM) tool does not add output map to display?

texts:
I'm trying to use Vector Ruggedness Measure (VRM) tool with ArcMap 10.2.2 an the tool runs somewhat smoothly, but the output raster won't show in the chosen folder. Tool creates slope and aspect rasters and the output raster shows in the result window, but when I click add to display from result window, nothing happens.

Any ideas what I'm doing wrong? Is there any way to fix this?


texts: Convert Large Number of labels to annotations in ArcGIS

texts: I have Parcels counting to approximately 35000 for which I want to create feature linked annotations. But when I am ready with all the symbol and labelling properties and right click the layer to "convert labels to Annotations" after converting about 5000 records, ArcGIS crashes, I have tried it several time but no luck. If someone has go through this issues and have a solution, please let me know it will be a great help.


texts: Creating address for streets based on direction and hierarchy of streets using ArcMap, QGIS or python?

texts:
I have a street layer with the correct direction for each line. I want to make a geocoding address based on the direction of lines and hierarchy (highway, main way, alley, etc). For example, in alley 1 i want to create a text like ( alley 1, main street 2, highway 4).Because of line 3 is an alley, this line not included in the address. I want to create this for all of the street lines in a city.
I try to use  Feature vertices to point tool Compute start and end points of lines, then join the results and find the hierarchies, but sometimes it did not work.
Is there any ArcMap, Qgis or python solution for my issue?


texts: Extraction of monthly image from two-16 day images?

texts:
I need to combine two-16 day NDVI image into monthly NDVI image.

To do this, what kind of function and formula are used in ENVI, ArcGIS Desktop or ERDAS?


texts:
I have successfully added legends in Map using Qgis QgsComposerLegend () python programming .(using Qgis python console) but legends are added vertically.I wanted to place legend horizontally.
If you guys have any idea of adding them horizontally,please share with me.


texts:
I have wms layers like:

LAYERS=layer1,layer2&CQL_FILTER=(type=10);INCLUDE

it works fine but when I add another filter with 'and' operator to layer 1 it does not show on map. I am adding second filter like:

LAYERS=layer1,layer2&CQL_FILTER=(type=10 and range='20_100');INCLUDE

result returns text/html instead of png.

Here is my loadWMS function:

loadWMS: function (index, layerNames, cqlFilters, opacity, styles) {
        var customParams = [
            "FORMAT=image/png",
            "LAYERS=" + layerNames,
            "CQL_FILTER=" + (cqlFilters ? cqlFilters : "include"),
            "SRS=EPSG:900913",
            "EXCEPTIONS=application%2Fvnd.ogc.se_inimage",
            "STYLES=" + (styles && styles.length ? styles : "")
        ];

My params:

["FORMAT=image/png", "LAYERS=ADR_geo:yatirim_fiyat_adet_ek_all_10_view_all,ADR_geo:lake_sea_river_turkey", "CQL_FILTER=(type=10 AND range ='20_100');include", "SRS=EPSG:900913", "EXCEPTIONS=application%2Fvnd.ogc.se_inimage", "STYLES=ADR_geo:yatirim_grid_10_kirmizi,ADR_geo:yatirim_grid_10_kirmizi"]

What is wrong with cql_filter?

Edit for @iant : The html is 0 KB. so it comes empty screen. In Geoserver's map preview, the cql filter works like type=10 and range'20_100'


texts: Calculate Polygon Angle of Rotation about the centroid

texts:
I have a collection of polygon geometries in a projected spatial reference.

How can I figure out each polygon's angle of rotation about the centroid?

I am using Python (2 or 3 doesn't matter) to do the calculations.


texts: Shapefile attributes to Autocad Annotation

texts:
How can I export the attribute information for the shapefile/feature class to Autocad Annotation/Text?

I'm able to export the shapefile to autocad but unable to get the attributes in annotation.

Also Let me know if there any any way we can append attributes in autocad without using blocks.


texts: Using Python to execute merge of rasters

texts:
I need help with a python script to iterate merge (gdal_merge.py) of rasters:

For each folder located in /home/geodata/sentinel2/ look in subfolder IMG_DATA and merge the three rasters with filenames ending with B08.jp2, B04.jp2 and B03.jp2 to output /home/geodata/outputfolder/raster1.tif

and then move to the next folder in /home/geodata/sentinel2/ and do the same thing and output raster2.tif to the same output folder as raster1

and so on...


texts: How to batch set symbology to Proportional Symbology in ArcMap?

texts:
I am mapping Noxious weed infestations using point data in ArcMap 10.3. Each point has the square footage of the infestation listed in the "WeedArea" field in the attribute table. Depending on the situation, sometimes we need to display this using a standard Single Symbol point for each datapoint, and other times we want to display the data proportionally (using Symbology -> Quantities -> Proportional Symbols) so that the symbol for each point appears bigger or smaller based on the number of square feet reported for each point.

However, we have a lot of feature classes (one for each species) and need a way to simultaneously set the symbology for each of the feature classes without having to do it manually for each species. I have tinkered with the "Apply Symbology from Layer" tool and it allows me to copy symbology from another layer and set it for multiple layers at once, BUT this also copies the color from the source layer, so I have to go back and manually set each layer to have a distinct color.

Is there anyway to make a tool using scripting or just ModelBuilder that would allow me to change symbology of multiple featureclasses to a particular symbology without it giving each of the featureclasses an identical color?

I would like to make it so I can use this tool to go back and forth between the regular single symbol point display, and the proportional display - Ideally, while maintaining the same point color for each featureclass.


texts: Python: finding angle between 3 points while considering elevation

texts:
I have a pandas DataFrame that contains three points's lat/lon and elevation.

I used the Vincenty's formula to calculate the distance between each pair.
And now I want to calculate the angle of the triangle considering the elevation factor.

I have all the pair's distances and elevation data.

example:
https://ibb.co/FK8FmQw

-Get ABC angle


texts:
I've managed to create the below statement that creates a table based on a point in polygon query. However it creates a column that gives a true/false value which I then delete out all the f values from. Is there a better way of producing this statement?

CREATE TABLE crime_test AS
SELECT a.*, b.town, ST_within(a.the_geom, b.the_geom) "within"
FROM crime_data a, nh_areas b;
DELETE FROM crime_test WHERE within = 'f'


texts: Display data from geoserver on click map with openlayers

texts:
I tried to display data with popup from Geoserver or Postgres to my map, but it dosen't work at all. Can anyone please help me? I used this code:

    function Info(e)
        {
                if (e.features && e.features.length)
                {

                    //console.log(e.features[0].attributes);
                    var popupId = e.xy.x + "," + e.xy.y;
                    var popup = popups[popupId];
                    if (!popup || !popup.map) {
                    popup = new OpenLayers.Popup.FramedCloud(
                    popupId,
                    map.getLonLatFromPixel(e.xy),
                    null,
                    " ",
                    null,
                    true,
                    function(e) {
                        delete popups[this.id];
                        this.hide();
                        OpenLayers.Event.stop(e);
                    }
                );
                popups[popupId] = popup;
                map.addPopup(popup, true);
                }
            popup.setContentHTML(popup.contentHTML + "nom_user:" +e.features[0].attributes.nomservice +" region_user :"+ e.features[0].attributes.region);
            popup.show();
                }

    selectcltr = {
        click: new OpenLayers.Control.WMSGetFeatureInfo({
            url: 'http://localhost/geoserver/wms',
            title: 'Identify features by clicking',
            layers: [ser],
            queryVisible: true
        }),
        hover: new OpenLayers.Control.WMSGetFeatureInfo({
            url: 'http://localhost/geoserver/wms',
            title: 'Identify features by clicking',
            layers: [ser],
            hover: true,
            // defining a custom format options here
            formatOptions: {
                typeName: 'projet',
                featureNS: 'http://www.openplans.org/topp'
            },
            queryVisible: true
        })
    }


texts:
Can I add QGIS as a Plugin in .net application and access it using c# or vb.net?
As I can see QGIS plugins are consumed using C++ only.


texts: Getting JSON/JSONP/GeoJSON from GetFeature WFS request to ArcGIS for Server?

texts:
I'm trying to perform a GetFeature request to an ArcGIS 10.2.1 for Server WFS service and would like to get response in GeoJSON format.

If I look at the GetCapabilities from the service the only output format available is:

<wfs:OutputFormats>
   <wfs:Format>text/xml; subType=gml/3.1.1/profiles/gmlsf/1.0.0/0</wfs:Format>
</wfs:OutputFormats>

Is it possible to have JSON, JSONP, or GeoJSON?

How to configure ArcGIS 10.2.1 for Server to do that?


texts: Mapbox-GL-JS styles that use Mapzen's vector tiles

texts:
Are there any complete, public, styles in Mapbox-GL/JS format that use Mapzen's vector tiles? The only one I can find is Mapzen's own effort but it doesn't look like much effort has gone into it, it's ugly, and it's very incomplete. It doesn't even have road labels.

(There are, of course, several Mapzen styles for Tangram, but that's not what I need.)


texts: show relations between polygons by highlighting polygons

texts:
Is it possible to show relations (for example traffic flow) between polygons (for example counties) by highlighting related polygons by doing a query on a start polygon using QGIS?

Here is an example: Blue polygons represent counties, delaunay-lines with arrow show traffic flow in one direction and (purple) desire-lines without arrow show total traffic flow.

What im doing so far: Flow lines or delaunay lines (created by aequilibrae plugin for qgis)

What would be nice to have:

To explain the second picture: You do a query on the green polygon. The result is that related polygons get highlighted by the amount of traffic relations (red for a lot, yellow for not so much, blue for no traffic at all) to the green polygon.


texts: Generating Canal on DEM using ArcGIS for Desktop?

texts:
I want to generate a canal going from point A to B with a given slope.

The canal should be on the underlying DEM.

Is there any way to do this with the tools in ArcGIS 10 or do I have to do it manually?

I also have Qgis, Globalmapper and BricsCAD (with GeoTools) available if that helps in any way.

It's about an irrigation canal. We start at a dam with a given elevation. Now we go along the hill with a constant slope of let's say 0.1% downhill up to my endpoint (or end area). So eventually the endpoint is defined by the slope too. However I could figure out where the end point is and just linearly interpolate in between the two points then. The canal should be on the surface of the DEM.

We're talking about a canal on a hillside / in a valley so there is plenty of natural slope. The canal goes along the hillside from the start to the end of the valley. Basically following the contour lines but slightly sloping downwards in order to have some flow.


texts:
With my company switching to ArcGIS Pro, I am having to relearn some stuff that I've always known to work. In Pro I accidentally added "ft" to every column rather than just one.

Is there a way to get rid of the "ft" within each column?

Attached is the picture of my issue.


texts: How to insert a large feature using C# and ST_GEOMETRY in Oracle

texts:
I am using the st_polyfromtext command to insert features into an Oracle database like this:

INSERT INTO polygon_test VALUES (

sde.st_polyfromtext ('polygon ((10.01 20.03, 10.52 40.11, 30.29 41.56,
31.78 10.74, 10.01 20.03))', 0)
);

I am crafting the sql by hand in a C# web service and using OracleConnection and OracleCommand to execute the sql. I am using bind variables (:) and OracleParameter to bind the attribute values i send in with the spatial feature.
My issue is that if the feature is very complex and has alot of vertices then i get an Oracle error about literal string too long.
How can i send this coordinate string into Oracle and have it recognized as a feature when i keep hitting this cap?
I have tried to assign the OracleParameter as a CLOB datatype and then bind the :SHAPE to that but it still balks.


texts: Force ESRI Silverlight Navigation control to adhere to tile cache zoom levels?

texts:
Is it possible to force the Silverlight Navigation control to stick to the zoom levels associated with a particular tiled map service? The map tiles don't look very good when the images are being stretched by Silverlight to a zoom level they were not intended for. Labels are hard to read, etc.

This doesn't look so good:

This is a little better:


texts: Wrong tiles generated in OpenLayers XYZ layer

texts:
I am creating a map in OpenLayers using Base layer as ESRI online map server. And second layer as our own Esri map server serving the overlay. The base layer shows correctly, but OpenLayers requests some extra tiles at lower zoom levels which do not exist. Check this image too see what I mean:

Now if I zoom in everything looks fine and the data in the overlay is correct. But how do I make OpenLayers not request those pink tiles?

Here is the related code:

  For Base Map:

// layerURL loaded using OpenLayers.Protocol.Script()
var baseLayer = new OpenLayers.Layer.ArcGISCache("Street Map", layerURL, {
    layerInfo : layerInfo,
    type : 'png'
    });

    map = new OpenLayers.Map('map', {
    maxExtent : baseLayer.maxExtent,
    units : baseLayer.units,
    resolutions : baseLayer.resolutions,
    numZoomLevels : baseLayer.numZoomLevels,
    tileSize : baseLayer.tileSize,
    displayProjection : baseLayer.displayProjection
    });

    //The layer with the bad tile problem
    layer = new OpenLayers.Layer.XYZ("ESRI", "http://url_removed/tile/${z}/${y}/${x}", {
    format : "image/jpg",
    transparent : "true",
    isBaseLayer : false,
    opacity : 0.8
    });


texts:
I have a shapefile (points) and would like to add points using the attribute table and not the Add Feature tool at the main screen.

I went over the questions here, but didn't find a similar problem to mine.


texts: Creating C# SqlGeography point with Z value?

texts:
In C#, there appears to be only one method to create a SqlGeography Point object. It takes a lat/lon and SRID. But it can also have a Z and M value.

How are these created?

The Point class is immutable, so I would think you can only pass this when creating the Point.


texts:
Trying to import gdal for Python 2.7.3 on Windows XP:

>>> import gdal
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python27\lib\site-packages\gdal.py", line 2, in <module>
    from osgeo.gdal import deprecation_warn
  File "C:\Python27\lib\site-packages\osgeo\__init__.py", line 21, in <mo
    _gdal = swig_import_helper()
  File "C:\Python27\lib\site-packages\osgeo\__init__.py", line 17, in swit_helper
  _mod = imp.load_module('_gdal', fp, pathname, description)
ImportError: DLL load failed: The specified procedure could not be found.

Following suggestions from Installing GDAL with Python on windows? and elsewhere, here's what I've done so far:

removed all versions of python and started with a clean install of 2.7.3
installed gdal with the OSGeo4W installer
installed the native Win gdal binaries from http://www.lfd.uci.edu/~gohlke/pythonlibs/
added C:\OSGeo4W\bin; first in my Path variable
tried from osgeo import gdal
launched python from within the OSGeo4W Shell
run the procedure outlined in http://cartometric.com/blog/2011/10/17/install-gdal-on-windows/

The result is the same. Any other ideas about how to troubleshoot this?


texts: Orfeo Toolbox is installed but not visible in Processing Toolbox

texts:
maybe someone had the same problem and solved it already:
I did an "Advanced Install" setup of OSGeo4W enabling otb-bin, then started QGIS 2.18.15 and entered the following correct paths (my computer has Windows 7, 32bit) under Processing -> Options -> Providers:

OTB applications folder: C:\OSGeo4W\apps\orfeotoolbox\applications

OTB command line tools folder: C:\OSGeo4W\bin

The "Activate" button was of course enabled too, I confirmed and restarted QGIS (a couple of times): nothing happens, no Orfeo Toolbox visible in the processing toolbox...
Does anyone have an idea how to fix this?


texts: Seeking NRCS soil survey data at state or county scale?

texts:
Ideally, I would like to download all the NRCS's soil survey data for Pennsylvania, as is shown on Web Soil Survey.  However, if it's not possible, I would like to at least get the data for Bradford County.  With Web Soil Survey, AOIs are limited to 100,000 acres.

Is there a source where I can download larger AOIs?

I would be interested in any other soils datasets if you have them.


texts: What percentage of ArcGIS users are using version 10.1 already?

texts:
I'm planning on building an add-in using ArcPy, but some of the functionality I need is only available in 10.1. I want to distribute this add-in and was wondering if making it 10.1 only would limit adoption.
So would like to know what percentage of ArcGIS users are using version 10.1 already?


texts: Carto Maps: Display different points/objects at the same location

texts:
I know this question has been asked before, but I could not succeed with the help of the answers that are already out there. Can someone provide me with a detailed description (for dummies that cannot code very well ;) ) on the problem of displaying multiple objects with the same address?

I want to make a map showing the sites of the nuclear power plants and nuclear waste disposal in France using Carto. I use the column "address" for geo-localization and the column "group" to divide the data into two categories. The map so far displays only one point for each address. But often there are several power plants at one site and I would like to show that. How can I change my settings in Carto so that this works? In my data-set I have a new row for each new power plant, it is just the address that is the same.


texts:
I'm trying to use the openlayers vector class. And the error occurred:

Acess control allow origin header is present on the request resource. Origin null is therefore not allowed acess

I've put tileOptions and yet the error persists.
My GeoJSON file is in the www root of geoserver.

<!DOCTYPE html>
<html lang='en'>
<head>
 <meta charset='utf-8' />
 <title>My OpenLayers Map</title>
 <script type='text/javascript' src='OpenLayers.js'></script>
 <script type='text/javascript'>

 var map;

 function init() {
    map = new OpenLayers.Map('map_element', {});
    //Create a Format object
    var vector_format = new OpenLayers.Format.GeoJSON({});

    //Create a Protocol
    var vector_protocol = new OpenLayers.Protocol.HTTP({
        url:'stops.geojson',
        format: vector_format
    });

    //Create Strategy
    var vector_strategies = [new OpenLayers.Strategy.Fixed()];

    //Create a vector layer that contains a Format, Protocol, and Strategy class
    vector_layer = new OpenLayers.Layer.Vector(
        'More Advanced Vector Layer',
        {
            protocol: vector_protocol,
            strategies: vector_strategies
        },

     {"tileOptions": {
         "crossOriginKeyword": null
     }

    });

    map.addLayer(vector_layer);

  if(!map.getCenter()){
    map.zoomToMaxExtent();
 }
 }

 </script>
</head>

<body onload='init();'> <!-- Chama a função js init() -->

<!--Elemento HTML onde o mapa é exibido -->
 <div id='map_element' style='width: 500px; height: 500px;'>
 </div>

</body>
</html>


texts: Convert multiband GeoTIFF to dataframe using all bands (R, Python or QGIS)

texts:
I have a GeoTIFF file with 2 bands and I want to create a dataframe like this:
pixelID | band1Value | band2Value

I would like to do it in R, Python or QGIS.
As far as what I have searched, I could only find for cases working with single bands.


texts: Calculate Rhumb-bearing applicable for showing directly pointing arrow in EPSG:3067?

texts:
In short:
A pointer from one point towards another, angle calculated with any Bearing tool / formula in hand, did not show correctly, but some degrees wrong. Calculate made in lat / lon values and shown in another CRS than calculations were made. EPSG:3067 is used as map CRS.
How to "convert" the bearing from CRS to another and with which extra parameters?
Long story:
I want to have a pointer on map, which points from its current position over map to my desired destination - an arrow, that I can point from one to another, drawn as overlay on openlayers map. For that the tool seems to be to calculated correct Rhumb-Bearing.
So codewise I place a pointer symbol (circle where inside an centered arrow) and I rotate it with calculated bearing value.
I have learned about Bearing, that you can calculate it from [lat,lon] pair of coordinates either by hand 1 or using a library, like turf.js [2], [3]. I have tried all these three approaches, but my pointer does not point to correct direction. The issue is what is happening in my source [4]: I use a map with EPSG:3067 coordinate system, whereas

Turf.js library deals with GeoJSON vector data, so it uses unprojected WGS84 coordinate system, which is EPSG:6326.

and there comes the issue: in [4] they say that Bearing may vary depending on crs. So, my pointer, whether it is calculated with Bearing or Rhumb-bearing method, always has some deviation in the direction, at least on large distances, say > 200km.
I would like to be able to find a way to calculating the bearing in EPSG:3067 or somewhat to convert the one I get with turf.js or my current formula with lan-lot values. Any pointer how bearing is converted (one my source said it alone cannot be converted) would be appreciated. At least the formula and needed params.
I use map of Finland, which is quite north, may that have an impact?
Code:
import { transform as transform2 } from 'ol/proj'; // openlayers.

// From map coords come with EPSG:3067
// I convert to EPSG:4326, which is one part of same WGS84 [6] as EPSG:6326 used in turf.js.
const lonlat = transform2([parseFloat(X1), parseFloat(Y1)], 'EPSG:3067', 'EPSG:4326');

//.. same to another one, too.

// Then with turf.js:
var point1 = Turf.point([startlon, startlat]);
var point2 = Turf.point([destlon, destlat]);
return (Turf.rhumbBearing(point1, point2, true) + 360) % 360;

#Then in css of an arrow pointing up on an overlay in same point of map where is (X1,Y1):
transform: [{ rotateZ: direction + ' deg' }] # Program is react native, this is part of the css of the element inside React code.

The result kind of shows to correct direction, but not directly (some degrees wrong, if you see with a ruler.
Coordinates on pic: (EPSG:3067)
start:
289792.8753007395 6780621.145424524
target:
290219.31183128356 6781279.348593385, 290339.9582224339 6781381.352886491
target calculated from extent of a polygon, I gave the extent. Code for calculation:
function getCenterOfExtent(Extent){
        var X = parseFloat(Extent[0]) + (parseFloat(Extent[2])-parseFloat(Extent[0]))/2;
        var Y = parseFloat(Extent[1]) + (parseFloat(Extent[3])-parseFloat(Extent[1]))/2;
        return [X, Y];
    }

Sources:
1 https://www.movable-type.co.uk/scripts/latlong.html
[2] https://turfjs.org/docs/#bearing
[3] https://turfjs.org/docs/#rhumbBearing
[4] Azimuth (bearing) changes depending on map/project projection
[5] Do Leaflet and turfjs have different projections?
[6] https://tomroth.com.au/epsg/


texts: Which web maps work best for which web services

texts:
I'm trying to do a project, where I grab data from a MySQL database, and display it onto a web map API mashup (showing a chart on the map). I want to develop an example using REST, SOAP and possibly OSPF (still undecided) web services. Can anyone help me with info on which map APIs would work best for these web services?

Would Google API maps work for this?


texts: Is there a way to clip a jpg layer in QGIS?

texts: I have a jpg image as a layer in QGIS but want to clip it to get rid of the white background is this possible? As it is not a raster file, when I convert it to a raster it losses its image quality!


texts: Can Mapnik 2.2 and Qgis 2.0.1 be installed together?

texts:
I'm using LM15 (== Ubuntu 13.04 Raring) with the Launchpad repos for Qgis Unstable 2.0.1 and Mapnik 2.2.0.

Quantum wants libgdal1h;
Mapnik wants libgdal1. As soon as I install one, the other gets uninstalled. Is it possible to install them both together?

I'm willing to try compiling from scratch if that's the only way to get things working.


texts: Adjusting Points While Maintaining Line Network Node Connections

texts:
Currently I am working, within ArcGIS 10.4, on a pipe network for our water and sewer infrastructure which also contains all valves, hydrants, manholes, etc. These points are snapped to the line features, however, these are all assets that were converted from CAD and are not spatially correct.

Is there a way to adjust the points for the above ground assets, like shutoff valves, and it drag with it the vertices of the line it has previously been snapped to? The goal is to adjust the points features to a more correct location, without breaking the snapping of the lines to the point features, as well as, not breaking the node connections within each line feature class.

As a visual reference and example, you can see in the below image Hydrant 07-3-048 which is residing in the street. It needs to be moved about 10 feet east to the walkway against the darker building. I am wanting to move this hydrant point without losing the connection it has to the lateral water line, valve, and water main it is connected to.


texts: Accessing "Save Vector Layer As" algorithm in QGIS Processing Model?

texts:
I'm building a Processing Model in QGIS that ultimately exports a points shapefile (vector layer) as a CSV in a different coordinate system than the shapefile.

I ordinarily accomplish this in the "Save Vector Layer As" window (see image below) which I access by right-clicking on the shapefile in the Layers Panel. In this window, I uncheck field_1 and field_2 for export (I do not need those fields), and I export GEOMETRY "AS_YX" (I do need coordinates in the desired coordinate system to be written to the CSV).

Can I access this "Save Vector Layer As" algorithm for use in a QGIS Processing Model?


texts: Coordinate Systems for tile packages used in Collector for ArcGIS

texts:
I have a geodatabase with multiple shapes, domains etc. Everything works fine in ArcGIS online and as well on the Collector for ArcGIS. For better performance while using a tablet for data collection i created tile packages of aerial images to load onto the pads. This as well all worked out. My Geodatabase and all the underlying layers are in the projected coordinate system CH03 LV03 and the tile package is as well.
So what’s the problem?
The created aerial base map has an offset of about 160 meters to NNE in comparison to my GPS located position.
Any idea what the problem could come from?


texts:
I downloaded data here: https://nycopendata.socrata.com/dataset/Pavement-Edge/gydf-ksfn

I opened this up in QGIS but when I export it I can't open it up in another GIS program called indiemapper. Perhaps I'm not exporting it correctly with proper projection? Can someone run down the proper way to export so I won't run into problems down the line?


texts:
I am trying to transform a masked array, result of a NETCFD4 file, to a raster.

The array is saved as a masked array, with shape (500,805), and the mask is the value 32768.0. The array looks like:

import os
import gdal, ogr, osr
import numpy as np
import fiona as fn
import pandas as pd
import geopandas as gpd
import rasterio as rt
import scipy as sp
import matplotlib.pyplot as plt

masked_array(
 data=[[--, --, --, ..., 16.31, 16.39, 16.35],
       [--, --, --, ..., 16.31, 16.42, 16.34],
       [--, --, --, ..., 16.29, 16.330000000000002, 16.39],
       ...,
       [--, --, --, ..., 27.650000000000002, 28.54, 28.57],
       [--, --, --, ..., 26.64, 28.59, 27.92],
       [--, --, --, ..., 27.84, 27.830000000000002, 27.54]],
 mask=[[ True,  True,  True, ..., False, False, False],
       [ True,  True,  True, ..., False, False, False],
       [ True,  True,  True, ..., False, False, False],
       ...,
       [ True,  True,  True, ..., False, False, False],
       [ True,  True,  True, ..., False, False, False],
       [ True,  True,  True, ..., False, False, False]],
 fill_value=32768.0)

I have written the following method, based on many posts from around. However, it fails whenever I save the file as a raster. The maximum value I get, is the one for the  fill = 32768.0

def array2raster(newRasterfn, rasterOrigin, pixelWidth, pixelHeight, array, path):

   reversed_arr = array[::-1]
   cols = reversed_arr.shape[1]
   rows = reversed_arr.shape[0]
   originX = rasterOrigin[0]
   originY = rasterOrigin[1]

   driver = gdal.GetDriverByName('GTiff')
   outRaster = driver.Create(newRasterfn, cols, rows, 1, gdal.GDT_Float64)
   outRaster.SetGeoTransform((originX, pixelWidth, 0, originY, 0, pixelHeight))
   outband = outRaster.GetRasterBand(1)

   outband.WriteArray(reversed_arr)
   outband.SetNoDataValue(-999)
   outRasterSRS = osr.SpatialReference()
   outRasterSRS.ImportFromEPSG(4326) # http://spatialreference.org/ref/epsg/32614/
   outRaster.SetProjection(outRasterSRS.ExportToWkt())
   outband.FlushCache()

I call the function like this.

jan_1950raster = array2raster('jan1950' + '.tif', [lon,lat], cell_size, cell_size, jan_1950, gis)

How can I proceed from here?

I have changed outband.SetNoDataValue(-32768.0) but the problem remains, I have a raster with these values.


texts:
I am trying to add heatmap layer to my map. I have tried the following plugin:

http://www.patrick-wied.at/static/heatmapjs/example-heatmap-leaflet.html

From this plugin the data came from heatMapData.js. If I put the static data in heatMapData.js like following my heat map is working.

var testData={
  max: 500,
  data:[
    {lat:23.6681520914, lon:90.0811805, value:0.3},
    {lat:23.9010258772, lon:90.2883834839, value:0.9},
    {lat:23.7930778593, lon:90.423535, value:0.7},
    {lat:24.0279042498, lon:90.371648, value:0.5},
    {lat:24.1049427335, lon:90.2680428995, value:0.8}
  ]
};

For this I am using the following code in my index page:

$(function() {
    var baseLayer = L.tileLayer(
        'http://{s}.tile.cloudmade.com/ad132e106cd246ec961bbdfbe0228fe8/997/256/{z}/{x}/{y}.png',{
            attribution: 'Map data &copy; OpenStreetMap contributors, CC-BY-SA, Imagery © CloudMade',
            maxZoom: 18
        }
    );

    var heatmapLayer = L.TileLayer.heatMap({
        // radius could be absolute or relative
        // absolute: radius in meters, relative: radius in pixels
        //radius: { value: 15000, absolute: true },
        radius: { value: 20, absolute: false },
        opacity: 0.8,
        gradient: {
            0.15: "rgb(0,0,255)",
            0.35: "rgb(0,255,255)",
            0.65: "rgb(0,255,0)",
            0.95: "yellow",
            1.0: "rgb(255,0,0)"
        }
    });

    heatmapLayer.setData(testData.data);

    var map = new L.Map('map', {
        center: new L.LatLng(23.7588, 90.38967),
        zoom: 7,
        layers: [baseLayer, heatmapLayer]
    });

    // make accessible for debugging
    layer = heatmapLayer;
});

Now I want to add data from my database. I have written a heatMapData.php which gives me following data as JSON format:

[{lat:23.6681520914, lon:90.0811805, value:0.3},
{lat:23.9010258772, lon:90.2883834839, value:0.9},
{lat:23.7930778593, lon:90.423535, value:0.7},
{lat:24.0279042498, lon:90.371648, value:0.5},
{lat:24.1049427335, lon:90.2680428995, value:0.8}]

What should I do to implement dynamic data layer that comes from heatMapData.php?


texts: Select area which is at least x meters away from other geometries

texts:
In my table I have the build-up area from a region as a big number of polygons.

  urban_area: id | name | geometry(polygon)

I was wondering if and how I would be able to find the area within a bounding box that is at least x-meters away from any geometry in the urban_area table. In  schematics:

With the orange being the geometry in urban_area, the grey the offset and the dotted area the desired area.


texts: Creating TopoJson from shapefile with the Shape Escape (shpescape)

texts:
Does shpescape really work for creating TopoJson from shapefiles? I always get errors if uploading there zipped shapefiles.

The usual error message is:

OSError at /mix/uploads/296e3bc4a4073272c90904ba2e3f04c6/
[Errno 2] No such file or directory


texts: Is it possible to create a shapefile from a geometry with Python?

texts:
I use a GEE asset to describe the geometry of a country. I can transform this geometry into different format such as shapely.geometry or GeoJSON:
asset = 'users/bornToBeAlive/aoi_PU'

aoi = ee.FeatureCollection(asset)
aoiJson = geemap.ee_to_geojson(aoi)
aoiShp = sg.shape(aoiJson['features'][0]['geometry'])

rootDir = os.path.expanduser('~') + '/'

Unfortunately the gdal.warp function requires a shapefile as input. Is there a way to export these structure to a shapefile ?
EDIT
# Now convert it to a shapefile with OGR
driver = ogr.GetDriverByName('Esri Shapefile')
ds = driver.CreateDataSource(rootDir + 'my.shp')
layer = ds.CreateLayer('', None, ogr.wkbPolygon)
# Add one attribute
layer.CreateField(ogr.FieldDefn('id', ogr.OFTInteger))
defn = layer.GetLayerDefn()

# Create a new feature (attribute and geometry)
feat = ogr.Feature(defn)
feat.SetField('id', 123)

# Make a geometry, from Shapely object
geom = ogr.CreateGeometryFromWkb(aoiShp.wkb)
feat.SetGeometry(geom)

layer.CreateFeature(feat)
feat = geom = None  # destroy these

# Save and close everything
ds = layer = feat = geom = None

I tried to use this solution but I obtain a very small version of my geometry centered in [0,0] when I open it in QGIS, am I missing something ?


texts:
I would need to find out which is the best location to plant new trees on a plot of land I already have.
I´ve created a vector file for the plot(polygon) and another one (points) to indicate the already existing trees.
According to these information (the spatial location of the already existing trees), I would like to understand where to plant new trees which must be at a distance of at least 6 metres from each other, as well as from the already present trees there.


texts: OSM updates with Osmosis -> Osm2Pgsql resulting in missing features?

texts:
For my project, I have successfully created a PostgreSQL database of the entire planet file using osm2pgsql.  My next task was to sucessfuly update the database using daily change files through the well renowned osmosis -> osm2pgsql (append) process chain.

To test updates, I added some hiking trails to the OpenStreetMap.  The nodes were auto snapped to the edges of existing roads in the forest in the OSM editing session (website). I pulled the change file with osmosis using the sequence id, per standard, and used the osm2pgsql --append command, as outline by numerous help sites and forums.  My new trail came through, and was visually proven using a Geoserver platform to serve the postgres data.

Here is the problem...any existing road that was modified was absent in the osm_line data after the update.  The two roads to which either end of the newly digitized trail were gone.  They are still in the map, as confirmed by a Geofabrik download of the local area, as well as by simply going to the OSM website.  Additionally, an existing trail that was incorrect and I moved a few nodes within is also gone.  It seems my command (either Osmosis or Osm2pgsql append) is wrong, and is only applying new features and knocking out anything that changed.

Hoping we have some OSM gurus that can help.

My two commands are as follows:

osmosis --read-replication-interval workingDirectory=D:\osm_updates --simplify-change --write-xml-change D:\osm_updates\changes.osc.gz

osm2pgsql --append -d planet -U postgres -S default.style -E 4326 -C 8000 --slim --number-processes 6 d:\osm_updates\changes.osc.gz


texts: Georeferencing Large Image in Hilly Terrain

texts:
I've recently gotten my hands on some fairly high resolution (0.5m) imagery that needs to be georeferenced.  I had been using the Georeferencer plugin in QGIS - using Google Imagery XYZ layer as the basemap - with good success.
My successful georeferencing has been in mostly flat areas.  I've moved into more hilly terrain, and now I just can't get the RMS down to a usable level. Using a Polynomial 2 transformation, the reported mean error is 20+.
The image am I currently working on is a large geographic area - approximately 20km x 15km.  Finding usable control points is not difficult.  I've tried a few strategies.  First, I tried a 'minimal approach' adding control points regularly spaced around the perimeter of the image, and then just a few more in the interior of the image (regularly spaced).  That didn't produce a good result.  So then I've tried just adding many control points (currently 100+) regularly spaced across entire image - and still not getting a good result.
I'm not sure what strategies I should try?  I was thinking maybe tiling the large image into smaller tiles (say 5km x 5km) and georeference those independently?  My thinking there is that the smaller images will contain less total distortion compared to the entire image - and maybe easier to fix.  Any other ways to deal with this situation?


texts: Creating regular point grid inside polygon in PostGIS

texts:
How to create, inside a polygon, a regular grid of point spaced x,y in PostGIS?
Like the example:


texts: Geoserver with native JAI and ImageIO yields holes in tile rendering with Leaflet

texts:
I have been trying to improve the performance of my Geoserver installation (on xenial 64-bit), so I installed JAI and ImageIO as described here: http://geoserver.geo-solutions.it/edu/en/install_run/jai_io_install.html. Things went fine, and in the server status page Geoserver says that native JAI and Image IO are present (true). The WMS seems faster now, and the JAI memory usage is > 0, so I know it's in use.

I am serving single-band, uncompressed GeoTiff hillshades that I have prepared with inner tiling and overviews, which are 1-2gb in size.

But now I have this issue: at some zoom levels, there are gaps and unrendered sections. It doesn't even seem to be on a per-tile basis, as you can see below.

So it seems like this drawing issue is related to JAI and Image IO, because this same tif draws fine on my other instance which doesn't have those libraries installed natively.

Any ideas?

edit: This is GeoServer 2.11.1.

edit 2: The GeoTiffs are in Web Mercator so Geoserver is not doing any reprojection. I am using Leaflet on the front end.


texts:
Up until now for reprojection of my WGS84 vector (.shp) and raster files (.tif), I have been using EPSG projections based on vector/raster central point's UTM zone.

But what happens if the envelope-area of the vector or raster file spans through two UTM zones?
Here is an example of a raster spanning through UTM zones 40 and 41:

In that case is it even possible to use some EPSG projection or not?
Should one of the two UTM zones be picked?


texts:
I am trying to calculate NDVI anomalies for three years satellite images in ArcMap 10.2. I am doing it by using formula:

[{(NDVImax_2000) - (mean_NDVImax)} / (mean_NDVImax + NDVImax_2000)] * 100

I am getting values ranging from -1,186,718.25 - 28,256,364
I am not sure if the software is calculating it properly. Also, the image I get in the result turn dark not showing any pixel, see below:


texts:
I would like to add this TMS layer as my baseLayer. You can see the layer specs here

I am doing like this to create the layer:

var tmsLayer = new OpenLayers.Layer.TMS(
    "Gouvernement du Quebec",
    "http://pregeoegl.msp.gouv.qc.ca/cgi-wms/mapcache.fcgi/tms/",
   { layername: 'carte_gouv_qc_public@EPSG_3857',
     type: "png",
     serviceVersion:"1.0.0",
     gutter:0,
     buffer:0,
     isBaseLayer:true,
     tileOrigin: new OpenLayers.LonLat(-20037508.342789,-20037508.342789),
     numZoomLevels: null,
     maxZoomLevel: 16,
     minZoomLevel: 4,
     zoomOffset:0,
     animate: true,
     visibility: true,
     transitionEffect: 'null',
     units:"m",
     maxExtent: new OpenLayers.Bounds(-20037508.342789,-20037508.342789,20037508.342789,20037508.342789),
     projection: new OpenLayers.Projection("EPSG:3857".toUpperCase()),
     sphericalMercator: true
     }
  );

As I am using an API that automatically create OpenLayers Map, I can't create the map myself but I use to modify it after loaded. I know that sucks, but you can see the map object definition in the console from this web site: https://carto48dev.mels.gouv.qc.ca/Infogeo/test/wms.html

What is the cause of the misalignment between the TMS layer and the map?


texts: Clip/Make difference between line and polygon layers [QGIS]

texts:
I need to clip one layer out of another, both are vector layers (one of them i got from vectorizing a raster layer). When i try to clip out "LowNitro" out of "FlandersAgriculture"

Intersect doensn't work either. I also checked whether the CRS (layers and project) are the same and they are.

When i checked the geometry of the layers, i had some invalid output out of the agriculture layer.

Is this the problem and how can i solve it then?

Do i just ignore the invalid data in there or is there a possibility to also take it into account?

Im using Qgis 3.10.0.

error message


texts: Alternative to 'Editors Merge' feature using ArcPy

texts:
I'm looking for a work around that has had me in a pickle for sometime. It involves combining a multi-part feature polygon into a single feature. Obviously if you were editing a shape you would select the features in question, start editing then "Editor" > "Merge.

Seems simple enough. However, I'm looking to do this via QGIS/ArcPy/Python (any method that will work).

Is there a way to append to a new shapefile and have it move into one feature?

See the end result example below:

Before:

After:


texts: Choosing Point to Raster vs Feature to Raster in ArcGIS for Desktop?

texts:
I am converting point vector data to a raster dataset using nearest neighbor. I am using arcgis 10.2. The first step is to use the conversion toolbox, but there are two possible options:

Point to raster
Feature to raster

What is the right application for each of these? When should I use one vs the other?


texts: Highlight areas without overlapping Shapefies in QGIS 2.16

texts:
I have a dataset with several hundred shapefiles and need to ensure that there is at least double overlap throughout. I need a way to extract the areas without double overlap, or at least a way to color by number of overlapping shapefiles.

The image is of multiple shapefiles colored black with 50% transparency. As you can see there are areas with one, two, and even three overlapping shapefiles. With the 50% transparency, you can see the gaps with only single overlap, and I could manually delineate them, but I am looking for a way to do it automatically.


texts: python crashes with returned gdal band object from a function

texts:
I wrote these two functions in a module when I want to read the band in NetCDF or HDF files and return the band outside the function. Each HDF and NetCDF has many subdatasets. Each subdataset in a NetCDF file has 365 bands while HDF subdataset has only one band.
When I run readFile1, there is no problem.
However, when I run readFile2 and return the band, I type out.GetNoDataValue() (or other functions attached to it) on the interpreter or in another function, python crashes. In readFile1 function, out.GetNoDataValue() return no data value of the band successfully.
When you return the band like in readFile2, you can not do anything with it. When you do, python crashes.

my gdal version is '1100000' (gdal.VersionInfo())
My operating system us ubuntu 12.04 LTS

I think this could be a bug in gdal, I am not sure about it.

from osgeo import gdal

def readFile1(inputFile,variableNo,bandNo):

    filereadtemp=gdal.Open(inputFile)

    fileread=gdal.Open(filereadtemp.GetSubDatasets()[variableNo][0])

    out=fileread.GetRasterBand(bandNo)
    nodatavalue=out.GetNoDataValue()

    return nodatavalue

def readFile2(inputFile,variableNo,bandNo):

    filereadtemp=gdal.Open(inputFile)

    fileread=gdal.Open(filereadtemp.GetSubDatasets()[variableNo][0])

    out=fileread.GetRasterBand(bandNo)

    return out


texts:
I have a problem with the Charts widget.
I try to represent rainfall following the month of the year by stations.

To display the widget mixture Charts month. There is a problem with the order of the bars of the charts.
There is no logic, following stations.

Examples:

station 1
August / February / December / etc ...

station 2
November / January / May / October / etc ...

Anyone know how to fix this problem ?


texts:
Using data exported from Google Earth I ma trying to plot restaurants over a large area. To collect all the data for the area I had to use several searches in Google Earth and these are shown when converting the KML file in to a layer file in ARC. It is only one file which I have converted but when created into layers it separates these.

Ideally I want these all to be in one layer and one attribute table so I can use symbology to classify different types.

Is there a way which these can all be put into one file?


texts: Finding documentation for changes to syntax/parameters of ArcPy tools/functions in ArcGIS Pro?

texts:
In a Q&A on this site I recall @KHibma pointing out where in the ArcGIS Pro Help any changes to the syntax (like extra parameters) of a particular tool/function since ArcGIS Pro 1.0.0 could be found.

I have searched hard to try and relocate that Q&A without success so, if my recollection is correct, can anyone point me at where to find that documentation or that Q&A (which this will be a duplicate of)?


texts: How to add Attributes to a polygon with arcpy

texts:
I have a question about arcpy. I want to create a polygon FeatureClass with attributes. The code below is just test-code that generates some polygons for speed testing. I want to add some additional attributes like ID (integer) and Material-Type (string) to each polygon. I know that this is possible with the insert.cursor function. But I want to do it with the CopyFeatures function, because this is faster (I have to generate some 100'000 thousand's polygon).

import arcpy
import time

# Variablen definieren
workspace = "E:/GeschiebeGIS/Python/Sandkasten/CreatePolygon"
shapeCursor = "polygonCursor.shp"
sr = arcpy.SpatialReference(4149) # Spatial reference GCS_CH1903

# Zeitmessung starten
startTime = time.clock()

# shape Datei löschen
arcpy.Delete_management(workspace+"/"+shapeCursor)

# shape Datei erstellen
#arcpy.CreateFeatureclass_management(workspace, shapeCursor, "POLYGON", "", "DISABLED", "DISABLED")

# feature List erstellen
featureList = []

# leeres Array erstellen
array = arcpy.Array()

# 100 Testpolygone erstellen
for c1 in range (0, 100):
    point1 = arcpy.Point(c1,c1)
    point2 = arcpy.Point(c1+1,c1)
    point3 = arcpy.Point(c1+1,c1+1)
    point4 = arcpy.Point(c1,c1+1)
    point5 = arcpy.Point(c1,c1)
    array.add(point1)
    array.add(point2)
    array.add(point3)
    array.add(point4)
    array.add(point5)
    polygon = arcpy.Polygon(array)
    array.removeAll()
    featureList.append(polygon)

arcpy.CopyFeatures_management(featureList, workspace+"/"+shapeCursor)

print "Fettich"
print time.clock() - startTime, "seconds"

is it possible to add the attributes to the polygon object in the For loop?


texts: Make a shapefile with geopandas from polygons

texts:
I am new in dealing with shapefiles. I have a dataset with points that represent centroids of polygons. I want to do a Voronoi tessellation and create a new shapefile with the obtained polygons arising from the tessellation.
The code I wrote is the following:

import geopandas as gp
import numpy as np
import pytess

outfile = 'example.shp'

list_centroids = [[5602414.710853475, 2276953.868022472], [5602811.942643783, 2277014.42599593], [5602786.520959574, 2277078.203081659], [5602757.831566737, 2277135.13165023], [5602726.400724698, 2277190.140619183], [5602494.021571051, 2277170.492366924], [5602550.460524382, 2277207.810717136], [5602690.650712324, 2277265.214973784], [5602788.200198333, 2277290.096373509], [5602855.037044225, 2277326.977219126], [5603079.663762391, 2277456.471662892]]

points = np.array(lista_centroids)
voronoipolys = pytess.voronoi(points)
poligons = list()
for i in range(len(points)):
    centroid =  voronoipolys[i][0]
    pol = ''
    polygon = voronoipolys[i][1]
    #Here I create a string POLYGON ((x y),(x2 y2).. ))
    for j in range(len(polygon)):
        if not j == len(polygon)-1:
            pol += str(polygon[j]).replace(',', '').replace('(','').replace(')','')+', '
        else:
            pol += str(polygon[j]).replace('(','').replace(')','')    .replace(',', '')
    pol = 'POLYGON (('+pol
    pol = pol+'))'
    poligons.append(pol)

df = gp.GeoDataFrame()
df['geometry'] = poligons
df.to_file(outfile,driver='ESRI Shapefile')

But I cannot create the shapefile. I am sure I am making a mistake in the construction of the polygons or in assigning them to the dataframe. The error I get is

raise ValueError("Geometry column cannot contain mutiple "
ValueError: Geometry column cannot contain mutiple geometry types when writing to file.


texts: GDAL2Tiles: MapTiles from BSB/KAP are Switched

texts:
As an example I have a BSB file from NOAA which is a navigational map. The map has a SRS of WGS84 and a Mercator projection.

I initially translate the file from BSB format to GTiff format using the following command:

gdal_translate -of GTiff 18554_1.kap noaa.tif

I can view this GTiff file using Paint Shop Pro quite fine. I then translate the file from GTiff format to VRT format using the following command:

gdal_translate -of vrt –expand rgba noaa.tif noaa.vrt

I then try to generate a tile matrix set using the following command:

gdal2tiles.py noaa.vrt tiles_folder

Where the map tiles are located in tiles_folder. If I try to open the openmaps.html or google.html, the map zoom in and out looks good. However, on tiles generator like MBTiles, I see tiles swap. See the image below. I am pulling my hair off to get the tiles to line up. I am guessing it is projection error. I am not understanding those projection types. It would great someone can explain it while finding the error. I am planning to use on a tiling airplane maps/charts app like this. By the way, on GDAL how do I specify the BSB (reference) file that is associated with KAP (data) file? I have seen cases where only one BSB file referred by multiple KAP files.


texts: Workflow to convert a DWG CAD file to a shapefile

texts:
I'm trying to develop a workflow where I can convert a .dwg file to .shp. I don't have a good understanding of which tools I should be using. My preference is to use software that runs on OSX, is open-source (or free).

My current workflow is as follows:

Convert .dwg to .dxf using Draftsight (http://www.3ds.com/products-services/draftsight/overview/ )
Load .dxf into Sketchup
Scale/rotate imagery in Sketchup and geolocate
View in Google Earth

Once I reach step 4, I'm unsure how best to proceed. As far as I can tell, Google Earth is actually rendering a Collada model, and not loading a kml file that I can access, so I don't know how to extract the underlying file.

I thought about using ogr2ogr (http://www.gdal.org/ogr2ogr.html ) but I'm not sure if I can interact with a CAD file this way (as I need to specify the projection and location). I also have QGIS and PostGIS available. I also considered FME but would prefer not to have to have a Windows OS just for this conversion process. I've also read through the following related question:
Transforming from DWG/DXF to GIS?


texts: Preventing text labels from overlapping other markers in QGIS?

texts:
Is there a way within QGIS to prevent text labels from overlapping icons used to label a point layer?

In the example map shown below, there are two layers:

Roads layer which is labeled using the new labeling engine.
A point layer which uses svg icons to show highway shields.

I have other use cases for this such as preventing overlapping of rail station icons. In this example, I could simply move the point, however, in other cases, such as a subway station, that is not a workable solution.

A possible solution which I am considering would involve:

Adding a column to the point layer's dbf file.
Filling the added column with either Null or a space.
Enabling QGIS's [new style] labeling for the added column.

Is this the way to go or is there a better method?

QGIS info: I am using versions 1.7.4 and a recently compiled version of 1.8 on Mac OS 10.7.4. Linux and Windows versions are also available to me.

Progress Update:
The method I described above works though two modifications to the process are required.

Instead of using a space character or a Null, a non-breaking space has to be used. While testing I found, fields with Null are not rendered and fields with only a space(s) are converted to Null. (See this Wikipedia page for information on how to type a non-breaking space.)
While setting the Layer Labeling Settings, on the Advanced tab, set the Placement to Over Point. Also set the Priority such that it is higher than any other labeled layers.

Depending on the size of the icon used, some experimentation may be required to get things to work as expected. Depending on the circumstance, it may be easier to use multiple characters rather than attempting to increase the font weight and/or size.

Tested with QGIS 1.7 and a recently compiled of 1.8 on Mac OS 10.7.4.


texts: Upgrade PostGIS from 2.3.3 to latest version

texts:
Current I have the following Version of PostGIS

POSTGIS="2.3.3 r15473"
GEOS="3.5.1-CAPI-1.9.1 r4246"
PROJ="Rel. 4.9.3, 15 August 2016"
GDAL="GDAL 2.1.2, released 2016/10/24"
LIBXML="2.9.4"
LIBJSON="0.12.1" TOPOLOGY RASTER

And my Postgresql version is

psql (PostgreSQL) 10.3 (Debian 10.3-1.pgdg90+1)

I want to upgrade from this version to the latest 2.5.0 version.

How can I update this?

This upgrade will take place in a production server.


texts: How do you export a .COR file from an ArcPAD checkout in GPS Pathfinder?

texts:
We use ArcPAD and sometimes Terrasync for data collection. However, when using ArcPAD, I'm finding it difficult to export data in Pathfinder from my .COR file.

Can you only check in data using the ArcPAD extension after it's collected?

We're trying to utilize the export settings from Pathfinder, and include fields like Horizontal Precision.


texts: Decimals are in wrong place in latitude and longitude in Excel

texts:
Somebody gave me an Excel table and the latitude and longitude had the wrong place for decimals. Is there a workaround to fix the problem? I am pretty much stuck trying to figure it out. Here is the example of what I am talking about:

The latitude and longitude should be like this:

3854.6 = 38.546, -10612.68 = -106.1268


texts: Unable to publish a service from ArcGIS Desktop to ArcGIS Online

texts:
I have an ArcGIS Online account based on my Google account, and I want to publish a service into it via ArcMap.

I first signed in into my account via Google, and then tried to share my map as a service. Yet when I came to the "Choose connection" step, I can't find my account in the list and I'm told to create a new one. I can't understand it, is it maybe an account issue?

What's going wrong?


texts:
I have world oceans vector layer in .shp format.
It looks like this.

This vector has only one feature, which represents world ocean. I need to create raster mask with 1 - ocean, and 0 - land. When I try Rasterize, as output I have fully black raster image. Then I have tried to create new numeric field

and use this field for rasterizing, but QGIS doesn`t see this new field.

How can I solve my problem?


texts:
I have an RGB from which I detected the edges and I'm curious if I can use it to optimize a segmentation or as a mask to improve the segmentation to identify cultivated fields.

Could you do that? If yes, how?

import cv2
image = cv2.imread('path_to_RGB.tif')

canny = cv2.Canny(image, 100, 200, 1)

cnts = cv2.findContours(canny, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
cnts = cnts[0] if len(cnts) == 2 else cnts[1]

for c in cnts:
    cv2.drawContours(image,[c], 0, (36,255,12), 2)

cv2.imwrite('C:\\canny.tif', canny)
cv2.waitKey(0)


texts: Are there any efficient methods for processing ArcGIS-based database tables outside of the ArcEtc program library?

texts:
Let us say, for the sake of argument, that you are working with a table that is over 2 GB in size (so .dbf is automatically ruled out... right?). To even create such a document, ArcGIS requires that you make it a "table" inside a File Geodatabase. Ignoring the hours-long conversion time in such an endeavor, working with the final product can prove to be an even larger nightmare. ArcGIS simply does not work for me when the size of a dataset gets to be several gigabytes. Can anyone suggest alternative programs or methods for processing such large sets of data? I am trying to avoid working with joins between 40-odd million records and the headache-inducing wait times involved there-in. I have been told in passing that using "backend RDBMS" programs can achieve this, but my own research has proven ineffectual.

I turn to you, StackExchange.

Edit: To further specify the requirements of the data, the table itself will have nothing to truly make it "spatial." There will be fields for X/Y Co-ordinates, but they will be simple double/float fields. I am looking for a proper way to do joins and relates across very large tables, in essence. The data is not spatial in the strictest sense; SDE is not something I need consider, I think.

I am hoping that any solution will allow me to host the data locally without creating a server or other such mumbo jumbo. Only I will need to access it, and if it needed to be shared, I would expect a simple export would be possible to a more ubiquitous format than ESRI's geodatabases.


texts: How to convert an image .jpg to GeoTIFF (with georeference)

texts:
I did a linear regression of 26 images with the same structure (rows, columns, resolution, DATUM, projection) using MATLAB. The result that I have got is an image without spatial reference, other resolution and less columns and rows (I loose all the metadata).

How can I copy the metadata from the input images to the output image?


texts:
I'm using rasterio's sample function to get values from a (single-layer) raster based on a list of x,y locations:

for val in myraster.sample(locations):
    print(val)

This works fine for the first couple of locations until I get the following error:

IndexError                                Traceback (most recent call last)
<ipython-input-49-9f9c2dcab22c> in <module>
      1 # Sample at these projected locations
----> 2 for val in myraster.sample(locations):
      3     print(val)

~/miniconda3/envs/UHI-NOAA/lib/python3.6/site-packages/rasterio/sample.py in sample_gen(dataset, xy, indexes)
     21             window = Window(col_off, row_off, 1, 1)
     22             data = read(indexes, window=window, masked=False)
---> 23             yield data[:, 0, 0]

IndexError: index 0 is out of bounds for axis 1 with size 0

So I'm assuming there is no data at that point, but I'm trying to understand how to fix that, so here's my current thinking:

Is there a way to also print out the location that rasterio is currently looking up?
I have also tried to skip the faulty lookup, but a try/except block doesn't help either – the sample method simply stops at that one faulty lookup and skips the rest.

Any leads on how to fix this?

Edit:

I'm on rasterio version 1.0.22, this is what my data looks like:

myraster.bounds

BoundingBox(left=-17619594.54744353, bottom=-6484970.538131511, right=17877405.45255647, top=8750529.46186849)

myraster.meta

{'driver': 'GTiff',
 'dtype': 'float32',
 'nodata': None,
 'width': 141988,
 'height': 60942,
 'count': 1,
 'crs': CRS.from_wkt('PROJCS["World_Mollweide",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.017453292519943295]],PROJECTION["Mollweide"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],UNIT["Meter",1.0]]'),
 'transform': Affine(250.0, 0.0, -17619594.54744353,
        0.0, -250.0, 8750529.46186849)}

locations[0:5]

[(-6021233.438259625, 2104298.5232515177),
 (-6020901.044539964, 2106315.744995676),
 (5226731.125781265, 3092960.1175713995),
 (5214407.124651566, 3083679.52532036),
 (5168501.71150224, 2985740.157238809)]

The coordinates in the locations list have been been projected to Mollweide from lat/lon coordinates with pyproj:

inProj = Proj(init='epsg:4326')   # lat/lon
outProj = Proj('+proj=moll +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs', preserve_flags=True)   # Mollweide

locations = []

# go through the list of stations and project each one to Mollweide
for index, station in stations.iterrows():
    locations.append((transform(inProj,outProj,station['lon'],station['lat'])))

There are actually some locations that are North and South of the raster's bounding box; but IMO that shouldn't produce this error anyway:

xs, ys = zip(*locations)

print(min(xs) > myraster.bounds.left)
True

print(max(xs) < myraster.bounds.right)
True

print(min(ys) > myraster.bounds.bottom)
False

print(max(ys) < myraster.bounds.top)
False


texts: View image file from hyperlink in Arcmap identify tool result

texts:
I have a file path to an image file in an attribute table, eg;

C:\GIS\ScannedMaps\Map1.png

When I use the identify tool on the feature I can see the file path with the hyperlink lightening symbol next to it but when I double-click it nothing happens, 'right-click > View Hyperlink' has the same result. There are no error messages or anything, just nothing happens.
I have set the display properties for that field to support hyperlinks and have the 'Document' radio button selected.

If you navigate to the image in windows you can open it (so nothing wrong with the image).

I have tried other image formats .jpeg .bmp with no luck.

However, If I change the file from an image to a .txt file stored in the same folder, the hyperlink function works perfectly, launching notepad.

So how do you view an image file?


texts: QGIS view raster with no CRS without on the fly reprojection

texts: I have RADARSAT-2 imagery which is georeferenced with Rational Polynomial Coefficients (RPCs), but is not orthorectified. QGIS will reproject/resample the raster to a defined CRS like EPSG:4326, however there are time where I would like to view the raw raster without reprojection. Is this possible? I have tried setting the project CRS to unknown/no projection but the raster will still be reprojected.


texts: Adding text label with currently joined field name in QGIS?

texts:
I want to add text label in "print composer" with that column's name.

Is there any expression to return that field name?


texts: Snap pour points not recognizing sample sites as valid points when using ArcPy?

texts:
I am trying to go from a CSV of sample sites and a DEM to creating watersheds. I can process the DEM fine to stream networks and can import the points (first to event layer, then convert them to a feature class. The problem arises when I try to snap pour points (my sample sites) on to my flow accumulation raster to create the watersheds, the same error of "Sample_Sites do not exist" keeps popping up even though I can go to ArcMap and open them.

Any ideas on how to get around this problem?


texts: OGR to read from oracle, and then write a CSV

texts:
I need to read an Oracle (not spatial) table with OGR.

I have no problem with ogrinfo. I use this command:

  ogrinfo -ro OCI:user/password -sql "select * from HR.EMPLOYEES"

I have this kind of output:

OGRFeature(select * from HR.EMPLOYEES):106
  EMPLOYEE_ID (Integer) = 206
  FIRST_NAME (String) = William
  LAST_NAME (String) = Gietz
  EMAIL (String) = WGIETZ
  PHONE_NUMBER (String) = 515.123.8181
  JOB_ID (String) = AC_ACCOUNT
  SALARY (Real) =  8300.00
  COMMISSION_PCT (Real) = (null)
  MANAGER_ID (Integer) = 205
  DEPARTMENT_ID (Integer) = 110

Now I would like to export (in example) in CSV format, using OGR. This is the command:

  ogr2ogr -f "CSV" test.csv OCI:"user/password" -sql "select * from HR.EMPLOYEES"

I have this errors:

ERROR 4: Failed to create test.csv\select * from HR.EMPLOYEES.csv:
Invalid argument
ERROR 1: Terminating translation prematurely after failed
translation from sql statement.

I'm not able to find the syntax error. What's wrong?

I'm using gdal/ogr 1.9 and Oracle 11g for windows.

Thank you,

Andrea


texts: Should the IRelationalOperator.Equals return true regardless of vertex orientation?

texts:
I don't recall every having an issue with this method, but I am now.  As I understand  IRelationalOperator.Equals, vertex orientation shouldn't affect equality and if I take a polyline and reverse orientation, IRelationalOperator.Equals should still return true.

However, I am not usually seeing this: IRelationalOperator.Equals usually returns false although occasionally it will return true after a ReverseOrientation() (very strange--I'm seeing this maybe 1 out of 20 calls).

Is my understanding of this method correct?  If so, is this a bug or is there something wrong with my implementation?

IPolyline polyline1;
IPolyline polyline2;

//...other code

polyline2.ReverseOrientation();
IRelationalOperator relop = polyline1 as IRelationalOperator;
Trace.WriteLine(relop.Equals(polyline2 as IGeometry));


texts: How to change the language of all Web Applications of the ArcGIS Server manager (for ASP.NET)?

texts:
ArcGIS Server manager (ASP.NET) comes by default the English language. I would like to configure it to Portuguese of Brazil.

It is ok if the administrative tool is in English.

But I'd really like is that the maps Labels were in Portuguese. As in the words: Results, "Query Attributes", "Find", and others.

So my users to access my Web Applications in the native language of maps here.

I know I could edit the Labels in Visual Studio (VS), but this is laborious. And my co-workers do not know how to work in VS. Because I'm the Analyst Informatics and they cartographers. VS is complex for them who do not know how to program.

How to configure all Web Application to another language?

Thank you!


texts: Create multipolygons grouped by field, ogr2ogr

texts:
There is a large polygon data set which I would like to aggregate some of the polygons with the same values in a specific field to multipolygons.

I would like to do this using ogr2ogr. I have the following but it does not work:

ogr2ogr -nlt MULTIPOLYGON -sql "select FIELD from singles group by FIELD" multi.shp singles.shp

Does any one know if it is possible to do this and how?


texts: How do I import an ASCII grid using arcpy?

texts:
I'm trying to automate the setup of some flood depth/hazard maps. The user specifies a folder containing depth grids generated by a hydraulic model (.asc format) and some background mapping (geotiff format). I've got the mapping to import correctly using code similar to that below. But the code does not work for the ASCII datasets.

depthgrid = "<userspecifiedfolder>\\maximumdepthgrid.asc"
arcpy.mapping.AddLayer(df, depthgrid)

Upon running the code I get the error: "AssertionError"

Conversion from ASCII to another filetype is not really an option as I need the files in this ASCII format for various other tasks too and would prefer not to double up on data.

Example ASCII data:

ncols     2068

nrows     1522

xllcorner       516810.000

yllcorner       466168.000

cellsize        1.000

NODATA_value      -999.

-999.0000 -999.0000 -999.0000 -999.0000 -999.0000 -999.0000 ...

more data ...