texts: Different searching results in local Nominatim and openstreetmap.org

texts:
I've just installed Nominatim using this guide. I've successfully import fresh osm.bz2 file with data for Saint-Petersburg, Russia into my postgresql database.

Nominatim search script works, but it shows another results, than openstreetmap.org and unfortunately can't find addresses with house numbers. For example, I try to find "60, Невский проспект". Openstreetmap.org works fine and finds a needful house, but local Nominatim finds only street with the same address, without house number.

So, what is the matter of such behaviour and how to aim the same search results as openstreetmap.org? Any ideas?


texts: Limiting search result to country using ArcGIS API for JavaScript integrated with Angular

texts:
I want to restrict my search results to a specific country (NZ) with ArcGIS Javascript/Angular API. I am using Angular for this project:
mygis.component.ts
async ngOnInit() {
await loadCss('https://js.arcgis.com/4.9/esri/css/main.css');
const [WebMap, MapView, _, Search, Locator] = await loadModules([
  'esri/Map',
  'esri/views/MapView',
  'esri/WebMap',
  'esri/widgets/Search',
  'esri/tasks/Locator'
])
// create a Map loaded from a webmap
const webMap = new WebMap({
  basemap: 'hybrid',
  portalItem: { // autocasts as new PortalItem()
    id: "f2e9b762544945f390ca4ac3671cfa72"
  }
});

const search = new Search({
  mapView: MapView,
  includeDefaultSources: false,
  sources: [{
    locator: new Locator({ url:"https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer"}),
    CountryCode: "NZ"}],
    name: "Geocode",
});

const mapView = new MapView({
      container: this.mapView,
      center: [175.1278, -36.7074],
      zoom: 9,
      map: webMap,
    });

mapView.ui.add(search, "top-right");

  }
}

I have created a stackblitz sample here but I get world wide results. Very similar to Limiting the search widget results to a country in ArcGIS JS API 4.9.


texts: Determine which points in a CSV are within a shapefile polygon using GDAL / OGR in Python

texts:
I have a csv file containing columns with latitude, longitude and some values, and a shapefile with a few polygons. Some of my points/rows in the CSV are within, and some outside the shapefile polygons. The CSV and the shapefile both EPSG 4326 (WGS84).

Using Python, I would like to add a column to the CSV that has as a value the polygon ID (a column called "num" in my case) in which these points/rows are located, using 0 or NA if points are outside any of the polygons. How can I achieve this?

The following code is my own answer to my question:

def check_pt_in_poly(shape_poly_fn, df, transform=False):
    trees_pd["plot_id"] = float("NaN") # Add empty column with data to replace

    # load the shape file with the polygons
    shp_driver = ogr.GetDriverByName('ESRI Shapefile')
    shp_in     = shp_driver.Open(shape_poly_fn)
    layer_in   = shp_in.GetLayer(0)
    #print(layer_in.GetFeatureCount())

    # Prepare the transformation to ensure that both data sources use the same CRS
    source = osr.SpatialReference()
    source.ImportFromEPSG(4326) # WGS84
    target = osr.SpatialReference()
    target.ImportFromEPSG(32636) # WGS84 36N
    transform = osr.CoordinateTransformation(source, target)

    def check(lon, lat):
        # create a point geometry from the given point
        pt = ogr.Geometry(ogr.wkbPoint)
        pt.SetPoint_2D(0, lon, lat)
        if(transform == True):
            pt.Transform(transform) # Apply the transformation (above)
        layer_in.SetSpatialFilter(pt)
        # Go over all polygons & check if one includes the point
        for feature in layer_in:
            # roughly subsets features, instead of go over everything
            ply = feature.GetGeometryRef()
            # Perform the check whether point is in polygon
            if ply.Contains(pt):
                return(feature.GetField('id')) # Returns the polygon id in which this point is
        return(float('nan')) # If it's in no polygon, return NaN

    # Iterate through rows of the dataframe and add information
    for i, row in df.iterrows():
        df.at[i,'plot_id'] = check(row.longitude, row.latitude)

    return(df)


texts: Arcmap: subset A.shp based on B.shp, then partially update B.shp

texts:
Okay, so I have 2 shapefiles:

US states outline file (very coarse/simple outlines)
Global Self-consistent Hierarchical High-resolution Shorelines, Level F
(much finer spatial resolution)

I am trying to make a map series for my employer using the GSHHS as my land/not land background, and overlaying the state outlines over top. I have other layers, but they're not relevant to this discussion.

This is what the smallest North America polygon looks like.

I am only interested in the western US, and only need a couple hundred miles into Mexico and Canada for background purposes.
I can't simply clip for obvious reasons, and there's another problem...
Case 1
and
Case 2
In both cases, the GCHHS runs inside as well as outside the rough state lines. I'd like to update the shoreline of the state file to match the GCHHS.
The only theoretical way I've come up with would be to do an Erase of the GCHHS based on the states, which would give me the bits outside the states, then maybe a Clip of the states based on the GCHHS to get the bits where the states overrun.
And once I get all these slivers, I'd have to dissolve them all into the proper state.

Should I just start looking for higher-resolution state polygons?
Thanks for any ideas or suggestions.


texts: Updating Multiple Fields in Feature Class from a Table

texts:
I have a Point Feature Class with 2 million records with 35 fields. I have another csv file (contain 25 fields) which have around 4000 records to update certain records of the Point Feature Class . Within these 4000 records, only around 70 are matched with the common field which is the Account ID and among these records the fields are needed to be updated. There are more than 20 fields that will be needed to update. I am trying to automate this process of updating the fields of the match records.

Currently, I am trying to use write Python Script to update the fields. I am still very new to Python and have no programming background thus I am having problems with my script.

My workflow is this:

Convert the csv file to Table in gdb
Join (AddJoin) the Table to Point Feature Class.

Then, I am trying to use UpdateCursor which has failed ever since I tried.

If I am using ModelBuilder, I can use Field Calculator tools to change each of the field but I think it will take a long time and it does not seem to be a very nice way of updating the fields.

I am not sure if there is easier way of updating the fields in the Point Feature Class from the given csv files.


texts:
I am trying to calculate the maximum value in a neighborhood on a raster using the Focal Statistics tool for Spatial Analyst in ArcGIS 10. Using python, I loop though several different radii, with each defining a circular neighborhood, as below:

bandwidth = [1609.344*.125,1609.344*.25,1609.344*.5,1609.344*1,1609.344*2,1609.344*4,1609.344*8,1609.344*16]
for bw in bandwidth:
    kd = "copc_kd_06_" + str(count)
    nhMax = FocalStatistics(kd, NbrCircle(bw, "MAP"), "MAXIMUM", "NODATA")

Note that the "1609.344" is the conversion from meters to miles, so I'm trying to find the neighborhood maximum at 0.125, 0.25, 0.5, 1.0... miles. The problem is that 0.125, 0.25, 0.5, and 2.0 perform well, while 1.0, 4.0, 8.0, and 16.0 produce extremely odd results, as shown below.

So, specifically, instead of the circular neighborhoods given in the command, it produces irregular neighborhoods of circles split in three.

Has anyone else seen this, or do you know of a workaround?


texts: Purge function to remove layers from a qgs file which are not present in the Layers pane using QGIS 3?

texts:
My QGIS3 projects tend to keep older versions of layers in the registry even after removing from the legend.

This is the same question as the one in:
Is there a purge function to remove layers from a qgs file which are not present in the Layers pane?

The solution proposed by Matthias Kuhn still works in QGIS 2.18.16 but when trying the master build of QGIS3, the python script proposed doesn't work anymore due to API changes in QGIS3. Is there a way in QGIS3 to remove these "ghost layers" from the registry like in QGIS 2.18.16?


texts:
I am new to CRS and wondering how to convert between projections.

From Wikipedia, I have obtained the Lat / Lon values for La Grande Soufirie Volcano which is in Guadeloupe. (16deg 02min 41sec N & 61deg 39min 51 W). I want to convert these coordinates to EPSG 32620. I am aware there are online converters, but the problem is I am not sure what coordinates system my input values are in (16deg 02min 41sec N & 61deg 39min 51 W).

Is it WGS 84 or something else?


texts: Extract a PostGIS dump from OSM with a particular tag

texts:
I'm new to OpenStreetMap. I want to extract all restaurants from Switzerland with their capacity if available. I am using osmosis. I tried:

osmosis --read-pbf file=switzerland.pbf --tf accept-nodes amenity=restaurant --write-xml output.osm

(I downloaded switzerland.pbf from http://planet.osm.ch/)

And it looks like it works. I would like to extract it not in XML but as a postgresql/PostGIS format. I tried

osmosis --read-pbf file=switzerland.pbf --tf accept-nodes amenity=restaurant --write-pgsql restaurant_osm.psql

But it fails with the following error:

INFO: Pipeline executing, waiting for completion.
Apr 8, 2014 1:06:08 PM org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskManager waitForCompletion
SEVERE: Thread for task 1-read-pbf failed
org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (The server requested password-based authentication, but no password was provided.)

I don't really understand this error. How should I do in order to extract sport facilities, leisure facilities, restaurants and shops from Switzerland version of OSM with their capacity if available?


texts: Way to filter outliers from point cloud in lidr?

texts:
I have an ALS point cloud. I have been able to successfully normalize the height, but am wondering if there's any way to remove/filter some points that are obviously errors/outliers (points below 0 and a handful that are 30-50m or even 100m above the tallest trees). The data I'm using was downloaded from the USGS National Map with only ground points already classified.
If I normalize with the tin() algorithm and create my chm straight from the normalize point cloud, my chm min/max values are:
values     : -5.23, 129.98  (min, max)

and if I normalize with a dtm:
values     : -14.65, 129.91  (min, max)

Ultimately, I'm trying to segment trees and generate products of tree heights, canopy cover, tree density, etc. But I can't run my analysis when I know the max tree height will be < 30m across my study site.
If I try to reclassify the ground, will that help with the points below 0? But that won't address the 129m max...
I was thinking maybe I'd be better off smoothing my chm and using the chm/tree tops to segment trees as I was having trouble finding a good way to utilize the li2012() algorithm.


texts:
I am doing some mapping for vegetation monitoring across a site. I have divided the property up into quadrats using the create fishnet grid function at the size I wanted. I have then intersected it with the boundaries of the property, and each quadrat has a number.
For the sake of the mapping I want to give each quadrat a score (0-4) for particular species cover.
How can I get each quadrat to display a different colour depending on the number (0-blue, 1-red etc.)? Below is what I have managed to create with the quadrat numbers on each grid. Would it be easier if I gave each a percentage value? (0=0%, 1=1%-24%, 2=25%-50% etc.).


texts: Gdaldem color-relief gives uniform-colored GeoTIFF

texts:
I have generated a GeoTIFF from grib temperature data in greyscale using:
gdal_translate -of GTiff -a_srs EPSG:4326 -b 28 2019-07-21-120000.grib2 output.temperature.tiff

This is a 32bit floating point image. I also tried using:
gdal_translate -of GTiff -ot Byte -a_srs EPSG:4326 -b 28 2019-07-21-120000.grib2 output.temperature2.tiff

which outputs an 8bit image. I am trying to use:
gdaldem color-relief input.tiff CET-D1A.csv output.tiff

to get a color visualization of the temperature values, which has values ranging between 220 and 320 Kelvin. The color table csv has lines like this:
220,23,41,114
220.4,24,42,117
220.8,24,43,120
...
319.2,107,7,3
319.6,105,7,3
320,102,7,2

Here is a screenshot of the data in Panoply:

and here is the result of the above gdal command on this data (in reduced dimensions to work in StackExchange). Both the 32bit and 8bit GeoTIFFs gave the same uniform blue GeoTiff.

What might I be doing wrong here? Incidentally, I would love to preserve the 32bit depth if possible.


texts: Add Marker on the polygons' centre using OpenLayers 2?

texts:
I have written a code to draw polygon from the WKT format. Now I need to add the marker at its centre. In the following code I have passed the centre and shape in WKT format(extracted from database).

function drawPolygon(id,shape,centre){
    var element = shape;
    var features = new OpenLayers.Format.WKT().read(element);
    features.geometry.transform(toProjection,fromProjection);
    var centre_poly = new OpenLayers.Format.WKT().read(centre);
    centre_poly.geometry.transform(toProjection,fromProjection);
    var featurePoint = new OpenLayers.Feature.Vector(
                centre_poly,{
                externalGraphic: 'img/map-marker.png',
                graphicHeight: 25,
                graphicWidth: 21,
                graphicXOffset: -12,
                graphicYOffset: -25
                }
            );
    features.id=id;
    vectorLayer.addFeatures([features]);//working But only Polygon drawn
    vectorLayer.addFeatures([features,featurePoint]); //Not working

    }

Can anyone help me to point my mistake here or give any other alternative Solution?


texts: Sorting table by multiple columns in QGIS

texts:
In 2012 the answer was NO!
Sorting by multiple fields at same time in QGIS?

My data is in a SHP file, I want to sort by 3 fields.

Has this changed in the last 4 years?

A solution like in ArcMap would be ideal -so it can be redone as required without hardcoding

http://desktop.arcgis.com/en/arcmap/10.3/manage-data/tables/sorting-records-in-a-table-by-multiple-fields.htm


texts: Is it possible to extract Coordinates of Polygon Centroid in QGIS?

texts: I have created polygon centroids using one of the "Geometry Tools" but I would like to extract the actual coordinates into Excel for further work. Is this possible?


texts:
I wanted to change the way shapes are rendered in QGIS composer.

I tried for example to add an ellipse in the composer and choosed geometry generator in the styling options. I let Polygon/Multipolygon in the geometry type.

Once modified with these parameter the ellipse disappear, giving me a "blank" object.

Does QGIS allow this kind of things ?


texts: get all the possible parameters of sql view

texts:
I have a Geoserver layer coming from a postGIS database. Among other attributes, I have one that is related to the date data we've collected, called departuretime. We use this attribute to display a layer on the map with Openlayers, by adding a layer with a GET request having a viewparams argument (we use a http protocol calling for a JSON and not a WFS because viewparams doesn't seem to be implemented in OL yet):

layer = new OpenLayers.Layer.Vector(date[i], {
    strategies: [new OpenLayers.Strategy.Fixed()],
    protocol: new OpenLayers.Protocol.HTTP({
    //options,
    url: "http://domain.com:8080/geoserver/test/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=test%3Av_trajectory&maxfeatures=50&outputformat=json&viewparams=departuretime:"+tmpDate+"T000000Z"
});

Since we will have in the end quite a lot of data distributed along a long period of days, I want to create a filter (via a datepicker) that displays only the layer of the selected days. Right now, I have something that works with the data we have, but the filter is hard coded into the JS, since I know what dates we have collected data. In the future, I want that if we add new data to the database, we can also add those, without modifying the JS script.

I couldn't find a way to query Geoserver so it returns me an array (or whatever) containing all possible values that departuretime can take. Is this possible, or do I have to create a new feature with a table containing the parameter?


texts:
I'm developing a web application using ExtJS 5 and OpenLayers 3. For displaying map I used the Google API and it worked fine. But when I switched to OpenLayers 3 I could not find any Ext.ux components for OpenLayers 3. For Google API there is Ext.ux.GMapPanel in ExtJS 5. For OpenLayers 3 the only component I could find was this. But since it uses OpenLayers 3 I cannot use that. Can anyone help me ?

Update

I am looking for a component like this for OpenLayers 3


texts: MakeXYEventLayer_management not creating final file?

texts: I'm using python to generate x and y coordinates for the start and end of lines in Arc. I have successfully done this part but when I try and generate the nodes I have no idea where the output file ends up or if it even exists. I get no errors when running the script but I just don't get an output points layer at all. I've tried defining the workspace and also tried not including this line. When I run the Make XY Event Layer from the toolbox it works fine. Can somebody help me with where I'm going wrong!?


texts: Interpreting Geographically Weighted Regression (GWR)

texts:
I have a question. As you know, we use Geographically Weighted Regression (GWR) to discover the association between exploratory and dependent variables.
Now the question:
Do the standardized residual values (shown in red and blue graduated map) indicate a positive or negative association and the direction of this association ? *Can it be concluded that where the standardized residual values are high and red, in these areas the correlation between the variables is positive and significant?? (I want only interpret the standardized residual values).


texts: Trying to Offset Overlapping Transit Lines/Routes - Is There a Way?

texts:
I am trying to create a bus route map in Los Angeles. I realize that it is shooting for the moon (perhaps it is impossible to do well) since there are so many overlapping routes, but I think I've gone a long way toward having at least the labels appear for each route.

I have used line-offset: -2; on the Rapid, Limited Express and Circulation routes and it seems to work nicely (it applies the offset to every part of the route), but I still have many overlapping Local routes. Is there a way to use Postgis to identify the overlapping lines and to generate new coordinates, offset from each other? Or, use it to at least identify where lines are overlapping (and then use line-offset: -2; to offset just that little portion?

The Map

In essence, I am trying to create a web-based, interactive version of a classic transit map.

Additional references/resources I've found helpful thus far:

https://www.mapbox.com/tilemill/docs/manual/carto/
https://www.mapbox.com/tilemill/docs/guides/styling-lines/
https://www.mapbox.com/tilemill/docs/guides/styling-labels/
https://www.mapbox.com/tilemill/docs/guides/labels-advanced/


texts: Using Geoserver ImageMosaic store with custom schema in postgis

texts: I'm trying to use the ImageMosaic data store to manage geotiffs that come from a range of vendors.  Using the indexer file, I was able to define a custom schema to populate some of the values but my goal is to have extra attribution that would get populated through a separate SQL process to build associations that you can use to run CQL_FILTERS with WMS.  My goal is to expose the granules using a CQL or FILTERING approach with WCS.  Is it possible to ingest imagery from a different location into the same data store with it's associated index table/schema?  I've looked at the UseExistingSchema parameter in the indexer but don't fully understand how this mechanism works.  If you want to add new granules to an existing ImageMosaic provider, do  you specify the target schema (e.g. Name=table_name) with the UseExistingSchema=true in the indexer.xml file?  Is there a way to set this up like a watch folder and then use the REST API to update the index?


texts: How to view french characters in QGIS attribute table

texts: I have a shapefile 'output' with encoding windows-1252 IANA encoding. The attributes of a column contains some french characters which appears as ?. Even i tried the changing the encoding of QGIS itself to francais, the special french characters were not visible in attribute table. How to solve this using QIS?


texts: How can I import KML/KMZ files to Google Maps Engine Lite?

texts:
MapsEngine seems to import only CSV, XLS files for creating a map.
How can I import my KML/KMZ files with Maps Engine Lite


texts:
Question about Search Widget:

As shown below in the snapshot the current search fields render as text boxes:

But i need to configure some of the search fields to render as dropdown lists as shown below in the expected design:

So how can i configure the search fields to render as dropdown lists?


texts:
How do I convert a shapefile to TIGER using GDAL (OGR). I try but it throws the following error:

(layer number)is not a known TIGER/Line layer.


texts: QGIS 2.13.0-Master breaks QGIS Web Client

texts:
QGIS 2.13.0-Master adds following line to every Project xml:

<WMSRootName type="QString"></WMSRootName>

Unfortunately this breaks QGIS Web Client.

Calling QGIS Server with "request=GetProjectSettings" returns no Name for the root layer:

<Layer queryable="1">
<Name/>
<Title>QGIS Mapserver Hello World</Title>
<CRS>EPSG:3857</CRS>
...

To get QGIS Web Client to function properly, we have to add the layer title (i.e. 'QGIS Mapserver Hello World') as WMSRootName or remove WMSRootName completely.


texts: Convert polygon bounding box to geodataframe?

texts:
I have a pandas dataframe that contains bounding box information for tiled raster data in the following format.

left            bottom              right           top
466583.40921    3135701.9763599997  466586.39673    3135704.9638799997
466583.40921    3135698.98884       466586.39673    3135701.9763599997
466583.40921    3135696.0013200007  466586.39673    3135698.98884
466583.40921    3135693.013800001   466586.39673    3135696.0013200007

Ultimately, I am looking to create a geopandas geodataframe that has a geometry column with the bounding box information in the following format:

geometry
POLYGON ((466586.39673 3135701.97636, 466586.39673 3135704.96388, 466583.40921 3135704.96388, 466583.40921 3135701.97636, 466586.39673 3135701.97636))
POLYGON ((466586.39673 3135698.98884, 466586.39673 3135701.97636, 466583.40921 3135701.97636, 466583.40921 3135698.98884, 466586.39673 3135698.98884))
...and so on...

I am aware that I can create a POLYGON object using the box method and referencing a single row:

box(df.left[1], df.bottom[1], df.right[1], df.top[1])

I have also tried hacking together a solution from a similar question:

b = [x for x in box(df.left, df.bottom, df.right, df.top)]

Which yields the following error:

ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().

How can I convert shapely bounding data as in the first dataframe to a geopandas geodataframe as in the second dataframe above?


texts: Problems with S3 georeferencing using Python-GDAL

texts:
I have to work with many Sentinel 2 and 3 images, with two different algorithms. I have to treat both images separately but only with Python and GDAL.

Concerning Sentinel-2 images, I download them on the Scihub, using the L1C-level. I do some corrections and operations on it, and the last step is converting the result into a netCDF file, reprojected in EPSG:4326. To do that, I use GDAL (my first result is in GeoTiff) as follows :

gdalwarp -t_srs EPSG:4326 inFile.tif outFile.nc

I tried to add "-of NetCDF" too, but when I add this, it does not work. Moreover, I have this problem when the output file is in GeoTiff too so I don't think this is where my problem comes from.

On the other side, I work on Sentinel 3 WFR (so downloaded on CODA) images. I only open them in Python, convert them in GeoTiff and crop them on the same Granules as my S2 images. When I try to convert them in GeoTiff via Python, I open the file with the module h5py. I open the file geo_coordinates.nc too, and extract the longitude and latitude on each pixel. Then I match the longitude and latitude to the file (here iop_nn.nc) and I create the GeoTiff with gdal_edit as follows (the file outFile.tif was created before by copying iop_nn.nc array in it) :

gdal_edit.py outFile.tif -a_srs EPSG:4326 -a_nodata -10000 -gcp pixel1 Line1 lon1 lat1 -gcp pixel2 Line2 lon2 lat2 -gcp pixel3 Line3 lon3 lat3 -gcp pixel4 Line4 lon4 lat4 -gcp pixel5 Line5 lon5 lat5 -gcp pixel6 Line6 lon6 lat6 -gcp pixel7 Line7 lon7 lat7 -gcp pixel8 Line8 lon8 lat8 -gcp pixel9 Line9 lon9 lat9

with the gcps taken at corners and centers. Finally, I use gdalwarp. I keep the result before warping and after.

Then I use QGIS to compare the results, and i can  notice a shift between S2 location and S3 location. The shift is about 5-6 S3-pixels (way too much). I found it weird, so I tried to georeference with SNAP and then I had no shift anymore !

I tried to use the file tie_geo_coordinates.nc but it did not work neither, and I can't explain it...

I only got one question : How can I create a weel-georeferenced raster from S3 images using Python and/or GDAL ? (And truly, I don't uderstand why my question is considered as "too broad"...)


texts:
I'm trying to get a map of contours that are detailed to a street level that I can then import into Rhino to get an accurate landscape map of an architectural site.

Does anybody know how I can get this info that I can then export as a .dxf or in what program I can do this?


texts: Relationship between “from-WGS” and “to-WGS” transformation parameter

texts:
I have some official Parameter for 3D Helmert transformation in direction “from-WGS”. Using the same in the other direction with just changing the sign of them, gives about 5cm difference.

Trimble Coordinate System manager recalculates those parameter – the values itself are slightly different than starting one, and using those parameter in transformation in “to-WGS” direction, differences are under 1cm.

Can anyone give me a hint, how to recalculate the “from-WGS” into “to-WGS” parameters?


texts: Calculating volume using polygon instead of contour line in ArcGIS Desktop?

texts:
What I'm attempting to do is calculate the volume of a lake using a polygon I created by classifying an image for water. I then extracted the polygon from the classification process. What I'm left with is a polygon showing the surface area of the water. I have a DEM of the lake. How do I determine the amount of water this lake contains? I don't want to use a contour line if I dont have to because the heights vary at the edges of the lake.

This is with ArcGIS Desktop.


texts: MS4W (MapServer 4 Windows) - version 3.0.3 Crashes JVM and Tomcat frequently. How to fix this?

texts:
I am using MS4W (MapServer 4 Windows with Java Mapscript) - v 3.0.3 for a GIS web application hosted over Tomcat 6.0.33 with Java jdk1.6.0_13 and PostgreSQL 9.1 with PostGIS 1.5.2 @ the database end. The GIS application has polygon,line and point spatial layers.

The problem is that ms4w(MapServer) crashes the JVM & Tomcat very frequently for simple map functionalities such as pan, zoom-in and sometimes even at first time loading of the map. Attached is log file generated in E:\Program Files\apache-tomcat-6.0.33-for-ME\bin\ folder.hs_err_pid3848.log

http://osgeo-org.1560.x6.nabble.com/file/n4995523/hs_err_pid5948.log

Is the MapServer MS4W Java API thread safe? Will making the method declarations in edu.umn.gis.mapscript.mapscriptJNI or edu.umn.gis.mapscript.mapObj classes as synchronized effect the API adversely?

I did try marking all the method declarations as synchronized in the edu.umn.gis.mapscript.mapObj class and few methods such as mapObj_draw(..), mapObj_drawQuery(..), mapObj_drawLegend(..),mapObj_drawScalebar(..) and mapObj_drawReferenceMap(...) in edu.umn.gis.mapscript.mapscriptJNI class. This helped reduce the tomcat crashing issue.

Is there any particular way to create (thread-safe) mapObj and using it? I have a common mapObj with all its properties like mapHeight,mapWidth,boundingBox coords shared by different mapping functionality methods such as zoom-in,zoom-out,pan,fullExtent,etc.

Can anybody suggest me about the best way (thread-safe) to create and use the mapObj in MapServer Java Mapscript API?


texts: v.distance.buffer does not create proper buffers with flat endcaps

texts:
I try to create flat end buffers for each of my line segments in QGIS (with Grass-algorithm v.buffer.distance).

If I use the tool with straight lines there is no problem creating the flat end buffer polygons but if i use my digitized line which is not straight i end up with strange artefacts as you can see in this screenshot:
( The left side buffers are the ones created by the tool and the ones on the right side are just there to demonstrate the way it roughly should look like.)

Is there a way I can prevent the flat-end-buffer-tool from creating these strange buffer polygons?

Edit1:

I tried the v.parallel-Tool but this also creates strange artefacts:

Result of v.buffer.distance:

Result of v.parallel:


texts: ArcGIS JS API - Masking a Layer - Changing the tilelayer source?

texts:
I am trying to reproduce and modify the mask effect found in this example from the ArcGIS JS API:
Masking effect using a custom layer view

There is a lot of fancy footwork to modify the underlying tile layer and apply the mask effect based on a polygon feature layer.  One thing I cannot seem to understand is how the underlying tile set is being called, and how I can change it.  It seems that this example is using the esri terrain / world imagery tile set, but I don't see where that is being referenced.  I want to try to recreate this mask effect using a different layer underneath, but I can't seem to find where I might reference a different layer to use underneath the mask.  What am I missing?


texts:
I am developing plugins and for some reason my QGIS keeps getting slower and slower. At first when I clicked on QGIS it opened right away, now it takes at least 2 minutes just to open and it also can take up to one minute just to close. Going into Manage and install plugins now times out because it takes forever to open. The way I'm pushing my changes is with this:
@echo off
SET OSGEO4W_ROOT=C:\OSGeo4W64
call "%OSGEO4W_ROOT%"\bin\o4w_env.bat

@echo off
path %PATH%;%OSGEO4W_ROOT%\apps\qgis\bin
path %PATH%;%OSGEO4W_ROOT%\apps\grass\grass78\lib
path %PATH%;C:\OSGeo4W64\apps\Qt5\bin
path %PATH%;C:\OSGeo4W64\apps\Python37\Scripts

set PYTHONPATH=%PYTHONPATH%;%OSGEO4W_ROOT%\apps\qgis\python
set PYTHONHOME=%OSGEO4W_ROOT%\apps\Python37

set PATH=C:\Program Files\Git\bin;%PATH%

cmd.exe

Which is located in C:\OSGeo4W64. I then just type in pb_tool deploy in the directory of the plugin.
I tried reinstalling QGIS 3.10.7 but it didn't change anything. Also tried on QGIS 3.12 and 3.14 and it didn't change anything.
Looking for a way to fix my QGIS being so slow. My codes use a couple of files and they are quite large so I can't really post everything here, but I'm mostly using processing algorithms from qgis and grass and I use "memory:" and "TEMPORARY_OUTPUT" for QGIS and GRASS algorithms respectively.
Just tried the Plugin Load Times and it doesn't seem to be because of my plugins:

Also here's the QGIS consumption when I just opened it and I have yet to even open a new project:

The problem seems to be coming from my QGIS3.ini. When I create a new user it's size is only 13KB while the default one is 547,018KB. The new profile's QGIS3.ini looks like this:

But the older one is actually insane it looks like this:

The [UI] part contains hundreds of millions of characters by itself and I don't know why.


texts:
What sort of infrastructure is needed to allow me to write a simple mobile app for indoor navigation?

Professor Mike Goodchild said:

  the average American only spends 13
  percent of the time outdoors.
  GIS-based services help us find
  restaurants and hotels, but they offer
  almost no support for navigating in
  the complex indoor spaces of shopping
  centers, hospitals, mines, or
  airports.

On my smartphone, I'd like to show a floor plan oriented to the real world, centered on my location.


texts: I have a DXF file that I need to attribute a map to, to locate it in QGIS

texts:
I have recieved a DWG file with no location information other than the parcel numbers.
I was told to open it in QGIS (I have QGIS 3.14), install the plugin HCMGIS and open a Google Satellite BaseMap to locate it.
However when I did all this, the map did not appear.
I am new to QGIS and don't know if there is more to do in order to reference this drawing.
I would like some guidance through the process of it.
I have read online that you need to use and OpenLayers but that doesn't appear in the plugins manager anyway.


texts: Creating a data layer on CARTO from an ical feed?

texts: Has anyone ever made a map on CARTO from an ical feed? Given that it uses a standard format which includes a location information, I envision that I can scrape the data into a CSV then geocode the location field. Looking for suggestions for how to attack it!


texts: Renderer error Could not create datasource for type 'postgis'

texts:
I am trying to setup osm on centos 7. I have been following this link http://qiita.com/nkmrtkhd/items/642ae1b8a996cc46d85c. Most of the steps work here but I needed to do some extra googling for styling etc. So I have got the latest mapnik cause I am using the git git clone https://github.com/mapnik/mapnik. My issue is similar to this question Mapnik render Error : Could not create datasource for type 'postgis'.

When I run this renderd -f -c /usr/local/etc/renderd.conf

Below are my errors.

 An error occurred while loading the map layer 'default': Could not create datasource for type: 'postgis' (searched for datasource plugins in '/usr/local/lib/mapnik/input')  encountered during parsing of layer 'landuse_gen0' in Layer at line 262 of '/usr/local/share/maps/style/OSMBright/OSMBright.xml'

I have tried dropping the database and rebuild also nothing happens.

Here is my renderd.conf details.

[renderd]
socketname=/var/run/renderd/renderd.sock
plugins_dir=/usr/local/lib/mapnik/input
font_dir=/usr/share/fonts/
XML=/usr/local/share/maps/style/OSMBright/OSMBright.xml
HOST=localhost

[mapnik]
socketname=/var/run/renderd/renderd.sock
plugins_dir=/usr/local/lib/mapnik/input
font_dir=/usr/share/fonts/
XML=/usr/local/share/maps/style/OSMBright/OSMBright.xml
HOST=localhost
;plugins_dir=/usr/lib/mapnik/input
;font_dir=/usr/share/fonts/truetype
font_dir_recurse=1

[default]
socketname=/var/run/renderd/renderd.sock
plugins_dir=/usr/local/lib/mapnik/input
font_dir=/usr/share/fonts/
XML=/usr/local/share/maps/style/OSMBright/OSMBright.xml
HOST=localhost

Here is the issue which its pointing to the OSMBright.xml

<Layer name="landuse_gen0"
  status="on"
  srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
    <StyleName>landuse_gen0</StyleName>
    <Datasource>
       <Parameter name="dbname"><![CDATA[gis]]></Parameter>
       <Parameter name="extent"><![CDATA[-20037508.34,-20037508.34,20037508.34,20037508.34]]></Parameter>
       <Parameter name="geometry_field"><![CDATA[way]]></Parameter>
       <Parameter name="id"><![CDATA[landuse_gen0]]></Parameter>
       <Parameter name="key_field"><![CDATA[]]></Parameter>
       <Parameter name="project"><![CDATA[osm-bright-imposm]]></Parameter>
       <Parameter name="srs"><![CDATA[+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over]]></Parameter>
       <Parameter name="table"><![CDATA[( SELECT way, way_area AS area, COALESCE(landuse, leisure, "natural", highway, amenity, tourism) AS type
  FROM planet_osm_polygon
  WHERE way_area > 100000
  ORDER BY way_area DESC
) AS data]]></Parameter>
       <Parameter name="type"><![CDATA[postgis]]></Parameter>
    </Datasource>
  </Layer>


texts: OpenLayers WMS Request speed against direct request

texts:
I'm using OpenLayers and I'm calling an Untiled 3rd party WMS service. I've run some tests to test performance\time differences between the following:

OpenLayers WMS call to the service (mostly slowest)
WMS URL directly into browser (sometimes slowest)
Calling 3rd party WMS service directly (quickest)

I'm using the exact same image dimensions and bounding boxes each time for all calls. I'm seeing differences of 1 to 2 seconds between calls 1 and 3. I'm calling the WMS layer correctly using OpenLayers.Layer.WMS... I've done it before but the time differnce is odd.

Can anyone enlighten me as to why there would be differences?


texts: How to just after adding point, save results and come back to previous active layer in PyGIS plugin?

texts:
I'm trying to build plugin which allow user to add point and just after adding point saves results and come back to previous active layer. I don't care about point table inputs what i need is only to allow user to manually click and add only one point.

For same reason i can detect when feature is added but cannot use it to save changes and change active layer.

That's code i written so far:

self.dockwidget.Add_point.clicked.connect(self.addPoint)

def addPoint(self):

    global count

    count = 0

    point = QgsMapLayerRegistry.instance().mapLayersByName('Point_feature')[0]
    qgis.utils.iface.setActiveLayer(point)

    # get the current layer and print out the feature count
    point_layer = self.iface.activeLayer()
    print point_layer.featureCount()

    # set the layer for editing
    point_layer.startEditing()
    print "editing layer"

    # toggle the add feature button
    qgis.utils.iface.actionAddFeature().trigger()

    ## disable feature popups
    point_layer.editFormConfig().setSuppress(1)

    #wait for mousedown
    self.iface.activeLayer().featureAdded.connect(self.logFeatureAdded)

    if count > 0:

       #save edits
        self.iface.activeLayer().commitChanges()

        #switch back to previous layer, that's test code i would like to change active layer to previous one if possible
        previousLayer = QgsMapLayerRegistry.instance().mapLayersByName('previouse')[0]
        qgis.utils.iface.setActiveLayer(previousLayer)

def logFeatureAdded(self, count):
    global count
    count = 1
    print count  #is printing count value but i cannot use it in addPoint def.

Can you help me? I am using QGIS 2.16.


texts: Rotating Marker Symbol in ArcGIS Desktop?

texts:
In ArcGIS Desktop 10.1, I am trying to create a marker symbol (and then save the symbol as a style), but the origin of the items makes them rotate improperly (see pictures).

Is there any way to merge all of the layers of the symbol? Or modify the origin of rotation?

I am using the simple marker with multiple layers.  The circle is the default circle with a second smaller white one added on top to create the label box.  The main problem is the triangle should rotate around the origin of the circle, but I don't know how to modify this is the style editor.  Thoughts?


texts: How to access Bing Map Metadata in ArcGIS Desktop?

texts: Is there any way to access the metadata of Bing Maps in ArcGIS desktop? Any good plug-in or extension?


texts:
I am using QGIS version 2.14.0 (Essen) and have dowloaded the latest version of the Time Manager plugin in order to do some spatial-temporal analysis.

I have imported a csv file into QGIS and made a join wih a shapefile in order to import all the time data on the shapefile. However, when I use this shapefile in Time Manager, it recognises the data as the start date appears in the player time frame, but the video and animation do not load. The following error message appears (in french as I am using it in french):

  Couche Impétrants_Verzoekers_p: OGR [3] erreur 1: "programmes_Date debut" not recognised as an available field.

Here is the data I am using in these two columns I imported from a csv file. Anybody know what is wrong?

Date debut              Date fin
2016-05-02 00:00:00 2018-09-30 00:00:00
2016-01-04 00:00:00 2018-12-10 00:00:00
2015-09-01 00:00:00 2017-12-31 00:00:00
2016-04-25 00:00:00 2017-12-15 00:00:00
2016-03-01 00:00:00 2018-03-30 00:00:00
2016-01-04 00:00:00 2017-12-29 00:00:00


texts: How to calculate corners of a rectangle based on Cartesian coordinates

texts:
I would like to draw a rectangle based on a center point lat and lon assuming a given length and width, let's say 4.5m and 1.5m, respectively. I guess, we need the bearing too. I've made a simulation by drawing a rectangle on Google Earth, getting the positions and putting them on my code. However, I need something automatic. My question is how can I link the Cartesian coordinates to those four points (rectangle) in meters.
Here is my code:
import geopandas as gpd
from shapely.geometry import Polygon

lat_point_list = [41.404928,  41.404936,  41.404951,  41.404943]
lon_point_list = [2.177339,   2.177331,   2.177353,   2.177365]

polygon_geom = Polygon(zip(lon_point_list, lat_point_list))
import folium
m = folium.Map([41.4049364, 2.1773560], zoom_start=20)
folium.GeoJson(polygon_geom).add_to(m)
folium.LatLngPopup().add_to(m)
m

I would like this:

I know this is basic trigonometry. If I split the rectsngle into triangles, we can find the different points. I know it is basic for simple exercises, however, I don't know of it changes when using Cartesian coordinates. Then, my goal is to get the points A, B, C and D, knowing the center of the rectangle in latitude and longitude, length and width.


texts: QGIS 3.10.8 and 3.14 crashes when opening attribute table after setting up a photo field and using lay-out form with attachment widget

texts:
I am looking for a way to address the following problem described at GitHub.
https://github.com/qgis/QGIS/issues/39063
I am looking for a repair method of the broken point layer, I mean a way
that:

The layer does not freeze or craches anymore and
A way that I can add the photo field in the problematic 2 forms ('GevaarlijkeBomen' and 'TBomen_overige'- both were
possible in the beginning, so should be possible again when the layer is
repaired?).

Note that I added the broken layer in the GitHub page/issue (zip-file). In other
words, one could replicate the problem if necessary.

Seems to be a bug because of data corruption... github.com/qgis/QGIS/issues/39063


texts:
I have a landmask derived from Landsat, transformed into polygons. Due to the raster origin, there are a lot of 4 line nodes (see picture), creating "holes" of unmasked area within the polygons.

Picture. Black polygon/raster land area, white unmasked/no value area.

The small contained white quadrats are a problem, while the uncontained must remain unmasked/no-value. I can not use these black polygons, since (fetchR) in R then complains due to "TopologyException /.../ Ring Self-intersection". I estimate the nodes to be at least a hundred. Can anyone think of

A. a workaround, fixing these nodes automatically, e.g. by at each node connected by >2 lines create two juxtaposed nodes OR filling these areas (either as polygon/raster).

B. a quick way to identify these nodes for manual fixing.


texts:
I have a layout created with (layout)snapping on and set to snap to guides only.  I have a series of rectangles for my title block.  Depending on the information within the rectangles, I may need to adjust the length to fit all the information.  My problem is that the rectangle boundaries aren't snapping to the guides.  They easily snap to guides when using ArcMap.

Is anyone else having this issue?

I didn't see a way to adjust the tolerance for guide snapping, only for editing snapping.

Software: ArcGIS Pro 2.1.3


texts: Extracting polygons coordinates in counter-clockwise direction

texts:
I am working with a polygon data set and as per the requirement I need to extract polygon vertices/coordinates in counter-clockwise direction/fashion.

Is there any tool or software available for extracting the same?


texts:
I have the following setup:

ArcGIS Server + ArcSDE on top of Oracle RAC.

I created a view merging some data that is in Oracle and ArcSDE. In ArcMap it all works just fine. Whenever a new location is added to the locations table, I can see the joined features, etc.

However I need this to happen in ArcServer. I mean, I have a MSD published and I can consume it via REST and OpenLayers. It seems to me that AGS is caching the generated tiles, although it's set to NOT cache anything.

Any ideas why this is happening?


texts: Client-side 3D surface generation in ArcGIS JS API

texts: Is there any way to create some sort of 3D surface (mesh, TIN, elevationLayer) from contour lines on the client side with ArcGIS JS API? Or alternatively edit a hosted 3D surface (any format)? In our application, the user can draw/edit contour lines, so I was wondering if there is way to generate a 3D surface from those edited contour lines on the client side.


texts:
I have created a custom tool for ArcMap with .NET and would like to know if there is any way to store user defined settings in a MXD.  The tool simply draws a graphic circle of a certain radius with the center snapped to the closest vertex in a polyline pointed at by the mouse.

Right now, the user has to select the layer and set the radius (with a custom dialog form) every time they open the mxd and use the tool.

This layer and radius rarely changes for a project mxd, so it would be convenient to store the name of the layer and radius setting somewhere, so that it can be automatically used by the tool.


texts: Calculating Polsby-Popper Score Using ArcGIS Pro Field Calculator gives ERROR 000539?

texts:
This operation is using the Field Calculator in ArcGIS Pro 2.1.

I am trying to calculate the Polsby-Popper Score for Congressional Districts.  I have calculated the Geodesic Area and Geodesic Perimeter for each feature using this formula:

(12.56637 * !AREA_GEO!) / (!PERIM_GEO! ^ 2)

It is returning the error:

  ERROR 000539: Traceback (most recent call last):   File
  "", line 1, in   TypeError: unsupported operand
  type(s) for ^: 'float' and 'int'

I am not sure what exactly this error means.


texts: Using ModelBuilder to Create Python Script for xls to csv Conversion?

texts:
I am currently trying to create a python script within ModelBuilder to convert an xls file to csv.

I created one already using the "Table to CSV" tool which was successful. However, I tried to add data to the xls file and run the script again and it choked on the "csv already exists". I tried adding  "Application.DisplayAlerts = False" to overwrite the csv already existing, but it still choked when I tried to run it again. (Script and error code below)

Script:

# Import arcpy module
import arcpy

# Load required toolboxes
arcpy.ImportToolbox("C:/Temp/Excel_and_CSV_Conversion_Tools/ExcelTools/Excel and CSV Conversion Tools.tbx")

# Local variables:
Sheet1_ = "R:\\Workspace\\Es\\Employee\\Maggie\\OptOut\\Test.xlsx\\Sheet1$"
test_csv = "R:\\Workspace\\Es\\Employee\\Maggie\\OptOut\\test.csv"

# Process: TableToCSV
arcpy.TableToCSV_tableconversion(Sheet1_, test_csv, "COMMA")

Error:

ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000732: Table Name: Dataset R:\Workspace\Es\Employee\Maggie\OptOut\Test.xlsx\Sheet1$ does not exist or is not supported
ERROR 000725: Output CSV: Dataset R:\Workspace\Es\Employee\Maggie\OptOut\test.csv already exists.
Failed to execute (TableToCSV).

My ultimate goal is to create a script I can set up in task scheduler to run on it's own everyday to convert an xls to csv, without using a script that requires macros to be enabled in the xls.

I am at the beginner beginner level when it comes to python script.


texts: Cannot find layer error with Execute SQL in QGIS Graphical Modeler

texts:
I'm trying to sort a shapefile by one of its attributes using "Execute SQL", in the QGIS Graphical Modeler.

Using a vector as input is working fine, but when I use a layer generated by an algorithm I have this error message : "virtual: Cannot find layer OUTPUT_shp20180419141642572".

Can someone help me with this ?

To sum-up :


texts: How to install the latest PostGIS in Ubuntu

texts:
I am wondering how can I install the latest PostGIS 2.2 (testing) from the Debian GIS project here:

https://launchpad.net/ubuntu/+source/postgis/2.2.0+dfsg-3

I tried apt-get install -s postgis after

sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update

and the reported version to install is:

Inst postgis (2.1.4+dfsg-3~trusty ubuntugis-unstable:14.04/trusty [amd64])

Since I need the 2.2 version and don't necessarily want to compile from source, I looked around and found the debian/ubuntu package at the top of this package. The available downloads are:

Downloads
File    Size    MD5 Checksum
postgis_2.2.0+dfsg-3.dsc    2.8 KiB     df4642773d269767e05d89df90ad45ff
postgis_2.2.0+dfsg.orig.tar.gz  9.7 MiB     0704ebb3261388bb3e532193b06982d5
postgis_2.2.0+dfsg-3.debian.tar.xz  36.8 KiB    5bdc005b6073d3f9578cf42dd0c1a22a

I am not familiar with this format. Can any one explain how to use these?

By the way, I am using Ubuntu/Lubuntu 14.04 LTS (I can switch to newer versions, or use a way to backport 16.04 to 14.04 if possible). I also looked at OSGeoLive, and they are offering 2.1.x as of Jan 2015.


texts: How can I do a soft upgrade from PostGIS 2.1.4 to 2.2.2?

texts:
I am running PostGIS on Linux Mint 17.2 using versions in ubuntugis-unstable PPA. I recently updated from 2.1.4+dfsg-3~trusty to 2.2.2+dfsg-2~trusty0. Using soft upgrade instructions http://postgis.net/docs/postgis_installation.html#soft_upgrade_extensions I tried:

ALTER EXTENSION postgis UPDATE TO "2.2.2";

However, the result is:

ERROR:  could not access file "$libdir/postgis-2.2": No such file or directory

Other info:

$ pg_config --libdir
/usr/lib
$ pg_config --pkglibdir
/usr/lib/postgresql/9.3/lib

Neither location has a postgis-2.2 folder. Extension control files and upgrade scripts (such as postgis--2.1.4--2.2.2.sql) are in /usr/share/postgresql/9.3/extension. Additionally, I have a /usr/share/postgresql/9.3/contrib/postgis-2.2 folder which has the postgis_upgrade.sql file, which is littered with references to $libdir/postgis-2.2. Presumably this is the script that gets called by the ALTER EXTENSION statement, triggering the "no such" error.

How can I correctly do a soft upgrade? I am trying to avoid doing a dump and reload of the data.


texts: Why are geoalgorithms missing from QGIS processing toolbox (GRASS & SAGA)

texts: I am wanting to calculate albedo from a Landsat 8 set of bands. When I use GRASS' Processing toolbox i.albedo, within QGIS, the option for landsat 8 is not avaialbe, however if I use GRASS separately it is (See photos below) Also, notice that the newest version of GRASS has included albedo calculation for Landsat 8 from the latest manual.


texts: Install pygeoprocessing on ubuntu 14.04 and python3

texts:
I'm trying to install the pygeoprocessing package for Python 3.4 on an Ubuntu 14.04 VM. I have all the necessary versions of the required dependencies (GDAL, numpy, scipy, shapely, Cython). pygeoprocessing is successfully installed via pip. However, when I try to import it in to a python script, I am greeted with the following:

  File "route.py", line 1, in <module>
    from pygeoprocessing import routing
  File "/usr/local/lib/python3.4/dist-packages/pygeoprocessing/__init__.py", line 8, in <module>
    import pygeoprocessing.geoprocessing as geoprocessing
  File "/usr/local/lib/python3.4/dist-packages/pygeoprocessing/geoprocessing.py", line 13, in <module>
    import exceptions
ImportError: No module named 'exceptions'

I cannot remove this line in the source code because I do not have write access on the VM. exceptions is presumably an artifact of the python2 release, and doesn't exist in python3.

How do I build pygeoprocessing properly?


texts: Best way to join and handle multiple attributes related to the same feature

texts:
this is not going to be a question, I'm just trying to find some advice.

Suppose I have a point shapefile (for example just two points, actually I have many more points) representing water control stations. The attribute table looks like:

ID    X        Y          Cl       Na
A    3480240   5887204   125.70   60.30
B    3480450   5887280   230.30   120.80

Now, how can I join another table that contains repeated measures of Cl and Na for each ID? This could be the example of the other table (measures in different years) I want to join:

ID    Cl       Na      Year
A    100.30   210.20   2010
A    120.40   200.30   2011
A    130.40   198.20   2012
B    101.00   199.20   2009
B    130.40   210.40   2010
B    140.60   210.00   2011
B    166.90   240.20   2012

I have tried both the QGIS standard join option and the mmqgis plugin (join from csv file) but the results are not as expected.
QGIS join option adds some columns to each ID, but many fields have "NULL" attributes while mmqgis increased the number of rows for each ID and each field contains the same value (e.g. Cl values are always 120.20 for each year).

So I would just like to know if anybody has worked with this kind of data in order to understand the best way to handle multi-attribute field related to one single feature?


texts: Converting .adf raster from UTM to lat/long without UTM zones in R

texts:
I have an .adf file that I have opened in R with the raster package.
It's data on the saturation levels of Aragonite on a global scale.
When I plot the raster it looks okay. But I need the data in lat/long!

But when I examine the information the values for extent look more like UTM values and the coord ref says NA.
class       : RasterLayer
dimensions  : 64, 200, 12800  (nrow, ncol, ncell)
resolution  : 2e+05, 2e+05  (x, y)
extent      : -20037507, 19962493, -6363885, 6436115  (xmin, xmax, ymin, ymax)
coord. ref. : NA
data source : N:\My documents\Data\Exposure\Reefs at risk\Global_Threats\Acidification\arag_500\w001001.adf
names       : w001001
values      : 0.7306441, 3.642071  (min, max)

I want to extract the points from this raster using the rastertopoints function but when I do I DO NOT get the UTM zone reference back so I cannot convert to lat/long.

I need the points in lat/long format in order to extract country names with the coordstocountries function and to overlay country boundaries with rworld maps.

Any help in coverting this raster to lat/long or converting the points without utm zones?

The prj.adf file associated with this .adf raster looks like this:
Projection    CYLINDRICAL
Datum         WGS84
Spheroid      WGS84
Units         METERS
Zunits        NO
Xshift        0.0
Yshift        0.0
Parameters
 1 /* Projection type < 1 | 2 | 3 >
-160  0  0.0 /* Longitude of central meridian
   0  0  0.0 /* Latitude of standard parallel


texts: MapBox studio distorts and removes polygons in tileset

texts:
I'm having an issue uploading a large polygon tileset to mapbox studio from an R simple features object. From R i've projected my simple features to web mercator and i've tried saving either as shp (zipped) or geojson. All my polygons are rectangular bounding boxes. Everything looks fine in R and QGIS.

But viewed in MapBox studio, you can see that the polygons have been distorted with some vertices removed, turning them into triangles, other polygons are entirely missing. Has anyone seen this before? I know that tilesets undergo "simplification"

https://docs.mapbox.com/help/how-mapbox-works/uploading-data/#how-data-becomes-a-tileset but i'm surprised that vertices are removed and the shape is changed.

Here is same area in my shiny app, same simple features file, adding the polygons directly from leaflet (addPolyLines) and grabbing the mapbox tiles.

EDIT:

It was suggested that a change in zoom would show the bounding boxes. This is not true. Here is the closest zoom level

and furthest zoom level

Also there are many polygons missing. I am not seeing a maximum vertices specification, I will test with with just a handful of polygons and edit the question.

May be related to this thread: https://github.com/mapbox/mapbox-gl-js/issues/9085

2nd Edit.

My sense is this is genuine bug. As far as i can tell, combining data from wide geographic areas causes this problem. Here is a screenshot that helps demonstrate this.

In blue is an upload covering polygons from across the continental US at different sites in one .shp. Polygons were projected to web meractor, from their appropriate utm coordinates in R before upload.

In red is the same upload script, but the polygons come from the same utm zone. Distortion only happens when the tileset covers a wide geographic area. I am submitting a mapbox studio ticket.


texts: Keep geometries in different layers in sync while editing

texts:
I need to keep several polygon layers in common. So if I move a vertices on one layer the one or two layers sitting under (or in common) would also change that vert.

I hope that makes sense. I feel it should be some sort of linked group or commonality setting.


texts: How to find lat/long of point knowing cross track distance

texts:
Knowing lat/long of point A , B and C.
And knowing cross track distance (CTX) from point B to point D.
How to find lat/long of point D?


texts: Cannot find "RasterCalc" plugin from the QGIS Official Plugin Reposity (2.18)

texts:
I have recently installed QGIS 2.18 (Las Palmas) and would like to run the RasterCalc plugin for raster processing.

The home page for the plugin:

http://gis-lab.info/qa/rastercalc-eng.html

The official QGIS Plugin Repository is:

https://plugins.qgis.org/plugins/plugins.xml?qgis=2.18

I tried to search for the key word "RasterCalc" or "raster calc" but nothing was returned.

Is this plugin no longer supported in the official plugin repository or did I do anything wrong?


texts: symbology with 2 fields - one for the color and another for the shape?

texts:
for example, i have two fields:
1 - a, b, c
2 - X, Y, Z

and i want to do like this: a - square, b - circle, c - point
X - blue, Y - red, Z - pink

and when i have a and Y - it whould be red square.


texts: How to create a point then draw (buffer) a circle with a given radius (in meters) in ArcMap?

texts:
I am new on ArcGIS, coming from Google maps API v2. I'm trying the 100.1.0 and I don't see anywhere how to add a circle like this .

Should I write a script/code for the function myself?


texts: How to create space buffer between touching boundary polygon

texts: I have some polygons that share common boundary. I want to create some small space buffer between it, so no polygon has shared the same boundary. Is there any way to do it instead of manual adjust the polygon? The picture describe what I want. I'm using QGIS or FME to do it.


texts:
I am trying to make a relationship class between two tables, but I get this message at the end:

Failed to create the specified relationship class

Can you tell me why?

Sorry I wasn't more precise: I use ArcEditor licence level, ArcGIS 10.0 version, and we're talking about a file geodatabase. I have a table for "ducts" and a table for "cables". A "duct feature" may have several "cable features", the forein key is the ID of the ducts. It's a one-to-many simple relationship.


texts: Unexpected behavior of QGIS appears when I load a raster layer

texts:
I have a small plugin for QGis which is collecting paratemters from gui for URL request to load raster layes (WMS).

Example:

 urlWithParams = self.get_values()
 mylayer = QgsRasterLayer(urlWithParams, (self.dockwidget.txt_layer_name.text()), "wms")
 QgsMapLayerRegistry.instance().addMapLayer(mylayer, False)
 self.root.insertLayer(0, mylayer)

Everything is working fine, but the unexpected behavior of QGis appears,
if I have a vector layer loaded and then I load the raster layer, the zoom in shifts to the magnifier, then I have to lock and unlock the scale to work with scale.

Why it switch to magnifier and if there is a way through the python script to 'force' to work with the scale instead of the magnifier after loading the raster layer?

Its happening something like that wheel action is conected to the
magnifier instead of scale after loading raster layer, how to connect wheel action  with scale?


texts:
I am a new user of ArcGIS software. I used the identify tool to inspect a layer, but the window is blocked in the middle of the screen, with no possibility of shutting it down. I tried to close ArcMap and re-open it, but it resumes the last tools activated. I found no way to solve this issue but to uninstall and reinstall the whole software, but the problem eventually popped up again as soon as I had to use identify again. Now I am stuck. I did not find any previous post with this same problem, actually I only read about the opposite issue.

I am using ArcGIS 10.6.1 on a Windows 10 machine. Any tips?


texts:
I am trying to make a map that would show the total load of a bus. I have plotted the route and set up the time constraints. The ellipse is moving and seems to work fine,  but when I try to style the ellipses based on the amount of load the marker-fill is completely removed.

Has anyone had this problem before?

/** torque visualization */

Map {
  -torque-aggregation-function:"round(avg(load))";
  -torque-resolution: 2;
}

#table_14{
  comp-op: lighter;
  marker-fill-opacity: 0.9;
  marker-line-color: #FFFFFF;
  marker-line-width: 0.5;
  marker-line-opacity: 1;
  marker-type: ellipse;
  marker-width: 6;

}
#table_11
  [value >10] { marker-fill: #000; }
#table_11
  [value > 8] { marker-fill: #400; }
#table_11
  [value > 3] { marker-fill: #800; }
#table_11
  [value > 0] { marker-fill: #F00; }


texts:
I have a polyline with more than 15 mio attributes. all have more or less unik numbers in the field I would like to dissolve over.
I would like to dissolve this field so there are e.g. 5 categories left after dissolving, e.g. range 1-10 = 10, 10-100 = 100, ... , ...
But my problem is, that the shape is so big, that working with is is very heavy.

Is there any way to handle this?
And when would you make the categories?


texts: How does Google Maps know the location names?

texts: How does Google Maps know the name of the very small shop in my street? How do they collect that kind of data?


texts: PostGIS & QGIS: Select Object/ID for foreign key from mapped points?

texts:
Is there a way, when working with QGIS connected to PostGIS, to have foreign key fields in the form allow selecting the value (primary key from another table) by selecting the object from the other table off the map?

If that is possible, is it further possible to use a custom SQL query to give you what should be plotted on the map for the user to select from. (Obviously, there would need to be a way to mark the result columns of said query with one being the primary/foreign key value to put in the field if the user selects that row. And it would also obviously need a point/geometry/geography column.)

I ask because I have some objects (let's call them A) that have foreign keys to objects that have no geometry of their own (let's call them B), but are related to objects that do have geometry (let's call them C). So I would like to fill A's foreign key column with B.id by selecting B off the map, having plotted B on the map with geometry from the related C objects.


texts: QGIS point clouds: hide flat pane in 3D view

texts:
After successfully loading .laz point cloud data to QGIS 3.18 on Win 10, I am able to show the data in 3D view. However, the data is visualized twice: once as a flat pane with the same symbolization as in the QGIS main window and a second time above with the style defined in the 3D-view tab of layer properties as you can see in the first screenshot.
Is there an option to hide the flat pane of point cloud rendering in 3D views to show only the 3D rendering of the point cloud? There are possibilities to achieve what I want, but only as a workaround. I wonder if there is a propoer function for that.
What I tried: If I uncheck the layer, both visualizations disappear. There is a workaround: creating a white polygon on top of the point cloud layer hides the flat pane, whereas the 3D point cloud is still shown.
Another workaround is the symbolization tab in the layer properties. There is no option to get a "zero-style" (like "no fill" if case of vector layers), however if I simply turn the point size to 0, it has the desired effect, see screenshot 2.


texts: Multi Language support for QGIS python plugin

texts: Is there any method for python plugin in QGIS 2.8 to support multiple languages.(including .ui files that is call from this python).Please anyone can help i am new to this environment


texts: Iterating through QgsFeatures in active layer and adding label using PyQGIS

texts:
I am trying to plot contours that are stored in a shapefile (linestrings) with labels that have their value.  I know how to get the feature attribute I want in Python via:
name = "MSLP"
layer = QgsVectorLayer(path_to_file,name,"ogr")
idx = layer.fields().indexFromName(name)

for feat in layer.getFeatures():

     attr = feat.attributes()[idx]

However, I'm not sure how to set a label to the feature.  I've looked at the QgsPalLabeling class but I don't see any examples on how to do this iteratively, and many examples are using QGIS 2.x (I'm using 3.x).  I might create a separate file with points along each polyline per value, assign the value, and override the default symbol as a string, if possible.  But I'm open to a different solution, especially if it means fewer I/O and one less shapefile.


texts: gdal_rasterize -at function still won't capture covered pixels properly

texts:
I'm currently using the gdal_rasterize tool in bash. My code looks like this:

gdal_rasterize -l $(basename $file .shp) -burn 1  -a_nodata 0 -te -180 -90 180 90 -tr 0.1 0.01 -at -ot Byte $file $OUTPUT/rast_2.tif

I was hoping that the -at function would give a '1' burn value to any pixel touched by the input shapefile. However, this is what the comparison looks like:

Is this the a problem with the -at ALL_TOUCHED function or should I be doing something differently to ensure that all areas are accounted for?

Any help much appreciated


texts: Google Earth Engine: Classifier (Error) Classifier.spectralRegion

texts:
I am using the spectralRegion classifier for classification, but I am having problems setting the parameters. I get the coordinates by .geometry() & .coordinates(), but this data structure is several nested lists (like 4 dimensional arrays).
Error report：
Classifier (Error)
Classifier.spectralRegion, argument 'coordinates': Invalid type.

Expected type: List<List<Float>>.

Actual type: List<List<List<List<Float>>>>.

Actual value: [[[[82.60597513757955, 41.54141791056748], [82.61234278488176, 41.5412930688705], [82.6124899018335, 41.543081172073315], [82.60751801444617, 41.54322833611614], [82.60597513757955, 41.54141791056748]]], .....and more

How can I use the spectralRegion classifier?
function maskS2clouds(image) {
  var qa = image.select('QA60');
  // Bits 10 and 11 are clouds and cirrus, respectively.
  var cloudBitMask = 1 << 10;
  var cirrusBitMask = 1 << 11;
  // Both flags should be set to zero, indicating clear conditions.
  var mask = qa.bitwiseAnd(cloudBitMask).eq(0)
      .and(qa.bitwiseAnd(cirrusBitMask).eq(0));
  return image.updateMask(mask).divide(10000);
}

var dataset2020 = ee.ImageCollection('COPERNICUS/S2_SR')
                  .filterDate('2020-03-15', '2020-10-31')
                  .filter(ee.Filter.lt('CLOUDY_PIXEL_PERCENTAGE',20))
                  .filterBounds(roi)
                  .map(maskS2clouds);

var classNames = city.merge(water).merge(desert);//Merging Feature into FeatureCollection

var classlist = classNames.geometry().coordinates();//Get coordinates

var bands = ['B2', 'B3', 'B4' ,'B5', 'B6', 'B7','B8','B8A', 'B9','B11', 'B12'];

var training = image2020.select(bands).sampleRegions({
  collection: classNames,
  properties: ['landcover'],
  scale: 20,
  tileScale: 16
});

var withRandom = training.randomColumn('random');

var split = 0.7;
var trainingPartition = withRandom.filter(ee.Filter.lt('random', split));
var testingPartition = withRandom.filter(ee.Filter.gte('random', split));

var classProperty = 'landcover';

var classifierRegion = ee.Classifier.spectralRegion(classlist).train({
  features: trainingPartition,
  classProperty: 'landcover',
  inputProperties: bands
});

print(classifierRegion)


texts:
So I am trying to join some data I have (just numbers) to a map on QGIS.

However it when I try to join the data to map it shows up as a string instead of a real.

It's a just a normal exel file. I converted it to a CSV file and was able to join it to my map, however as a CSV file it was still a STRING so I couldn't use graduated symbols.


texts: How make in Python a grid with perfect square cell?

texts: I have points layer in wgs84 4326 (longitude: ±180, latitude: ±90). I want make a grid with square cell to count how many points are inside a single cell. In python, I make a contour points of the grid (from a start point I use the same step value in degres for longitude and latitude) and after I use in Arcgis the tool to make line vertical and horizontal line and finally obtain a grid with square cell. If I measure the two side of a single cell, I see that they have different value but I can see that are square. This is normal due to the projection in use. My intent is to have perfect square cell for the wgs84 3857, so which are the steps to make this grid? One solution is to use a different steps for longitude and latitude in wgs84 4326 but I don't understand which is the correct step value to use. Second option maybe is to convert the contour points of my grid in wgs84 3857 and create the step for longitude and latitude but again I don't understand which is the correct value for the step.  My zone of interest isn't the entire world. The latitude actually lie within the range of 0 to +60 and longitude lie within the range of -30 to +60. I work in python with longitude: ±180 and latitude: ±90 , so for me is sufficient find a formula (for my zone of interest above) that give me a good value approximation of the longitude step in degrees after I decide in latitude degrees the cell size


texts:
I just started learning how to use Python MapScript for MapServer so I am trying very mininal example just to see how it works. My code is:

#!/usr/bin/env python

import mapscript

mapfile = "/path/to/mapfile/mapfile.map"

mapobject = mapscript.mapObj(mapfile)

mapobject.draw()

I am writing this on Spyder 2 and I runs correctly. I then put it in /usr/lib/cgi-bin folder and try to run it on my browser with this link:

http://localhost/cgi-bin/file.py

The browser throws me the following error:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

 Please contact the server administrator at webmaster@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

 More information about this error may be available in the server error log.

And the error log only shows this:

[pid 1353] [client ::1:56156] End of script output before headers: file.py

Now how can I know what the error is?  Is it right that I am putting it in /usr/lib/cgi-bin ?

EDIT: I've also set my apache2.conf file a section like this:

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory /usr/lib/cgi-bin/>
   Options +Indexes +ExecCGI +FollowSymLinks
   AddHandler cgi-script .py .cgi
   AllowOverride None
   Require all granted
</Directory>


texts: Modifying the start/end points of a LineString and maintaining connectivity in OpenLayers

texts:
I'm developing an application where the user can view and edit a street grid of a city. The streets are presented as features on a vector layer, and the user has to be able to modify the elements (both the attributes and the geometry - which is LineString - of the feature). The editing of a geometry is limited to dragging the end points of the LineString, at least for now.

The trick is that the new end points must intersect with the current geometry of the feature, so that the user cannot drag a road to start from outside of the street grid. Also, modifying the geometry should affect the neighbouring geometries, if any. That is, if another road begins where one ends, both should have their start/end point changed.

I don't suppose OpenLayers supports this out of the box so how should I begin to implement this?


texts: Toggling layers with the Layer Control widget swipe option

texts: I've been playing with the Layer Control Widget's swipe option, and I'm wondering if there is a way to toggle between two different layers, one on either side of the swipe bar.  I working with two different versions of the FEMA FIRM data and want to be able to use the swipe to compare between them.


texts: Looking for guidance to create a hydrological map with QGIS and/or GRASS

texts:
I have QGIS and GRASS installed . Basically i need this program for making maps something like this:
https://www.youtube.com/watch?v=5HuPX7JS7ZA

I downloaded DEM from http://glcfapp.glcf.umd.edu:8080/esdi/ for area i want to map and i apply it on google maps. I used GRASS until i couldn't figure out how to put colours for my heights and rivers. Problem with colors i solved using Terrain analysis but still dont know how to put rivers. (I didnt get how any of tools here work - http://grasswiki.osgeo.org/wiki/Hydrological_Sciences guess too complicated for me)

do you know any step by step simple guide for putting rivers in map, or even better video description ?
Links where i can find vector data for very detailed hydrological network that i can overlay on DEM would help a lot?


texts: Efficient way to get elevation, aspect and slope in Europe

texts:
I need values of elevation, aspect and slope for specific points (more than 50000) within Europe.
I already found the Copernicus EU-DEM. Unfortunately this does cover Ukraine, which I also need.
Furthermore, I was wondering if there is no other way than downloading the whole DEM and calculate aspect and slope on my own machine. Isn't there any source where I can download precalculated aspect, slope and elevation only for the XY coordinates that I need?


texts: Print Composer does not show Item Options

texts:
I'm rather new to QGIS, the version I have is 3.16.
I want to create a print layout, but when I open the Print Composer panel the "Item Options" window is empty. No way to choose the size of paper or anything else that should be inside that window.
I looked around, both on QGIS and on internet but found no solution.


texts: How to use shapefile to categorize set of coordinate by neighborhood?

texts:
Just a disclaimer, this is my first project with GIS so this may be really trivial. I have looked around but haven't found resources that were helpful to me.

Currently I have a list of NYC coordinates that I would like to categorize by Neighborhood. I've seen that shapefiles are a good option but I haven't worked with them before and I havent found anything like this online.

First off, here is my dataset:

At the end of the day, I'd like to create an additional column that will categorize the (pickup_longitude, pickup_latitude) coordinate into a specific NYC neighborhood.


texts:
I have a table of polygons representing travel time isochrones on particular days. For each origin point, there are five isochrone geometries (stored in separate rows). For each origin point, I want to rasterise the five isochrones (a binary NULL or 1), and then combine them into a single raster layer. This raster layer requires a simple map algebra: sum/5, so that each origin will in the end be associated with a single raster layer that has values in [NULL, 0.2, 0.4, 0.6, 0.8, 1] depending on how many of the constituent layers overlap. It is a probability surface.

My data is all stored in Postgres 9.3 (with PostGIS). My problem is that while I want to learn to use PostGIS raster, it seems to have a really steep learning curve, and all of the examples I can find deal with a single raster layer. In the examples, this layer is used as part of a polygon overlay, perhaps averaging the value of the raster for each polygon. I haven't found a replicable example for combining: a) vector --> raster b) map algebra; and c) GROUP BY attribute as per my first paragraph.

I'm OK using GDAL or GRASS if I have to in order to perform this task, but this seems like something PostGIS should be able to handle; it would be convenient to do so given my input data is already PostGIS geometry; and I really want to come to terms with PostGIS raster.

Some sample data structure:

areaid    time        date          isogeom (polygon)
1000      07:15:00    2014-05-05    xxx
1000      07:15:00    2014-05-06    xxy
...
1006      07:15:00    2014-05-05    zzz

I want to rasterise, group by areaid, and then perform the map algebra to come to:

areaid    isorast (raster)
1000      aaa
1006      bbb

I have not been successful containing this to PostGIS. My approach has been to convert the vector to raster, dump the rasters to arrays, and perform the combination with numpy arrays via psycopg2, before writing them to a GeoTIFF (to maybe be put back in PostGIS). Not ideal, but do-able.


texts: .xml missing in shapefile, problems with displaying in arcgis

texts:
This morning when I opened my .mxd (ArcGIS version 10.2.2) several shapefiles were not showing in the data view window or selectable. Zoom to layer also did not work. The attributes of the shapefile are not missing and no error message was shown. But when I checked the shapefile data I noticed that the .xml files were missing of these shapefiles.

I tried this 'how to recover a corrupt data file': http://support.esri.com/en/technical-article/000007161

After trying option nr 6, I can now open the shapefile in QGIS, but the GCS is way off.  Does somebody know how to fix this?


texts: Reprojection from unknown CRS to WGS84 (EPSG:4326) with MapServer and GDAL

texts:
I would like to know how MapServer can do the reprojection from a unknown CRS to EPSG:4326. I think it uses GDAL but how I can do the same thing?

GDAL Info output from data input (no EPSG code):

Driver: GTiff/GeoTIFF
Files: geostationary_ir-120_20170619083000_c7142d3e384e192461debbe8c32751c1___b8aedb3f.tiff
Size is 2288, 2288
Coordinate System is:
PROJCS["Geostationary_Satellite",
    GEOGCS["GCS_unnamed ellipse",
        DATUM["D_unknown",
            SPHEROID["Unknown",6378160,298.2539162964669]],
        PRIMEM["Greenwich",0],
        UNIT["Degree",0.017453292519943295]],
    PROJECTION["Geostationary_Satellite"],
    PARAMETER["central_meridian",86.5],
    PARAMETER["satellite_height",35785993.3373],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["Meter",1]]
Origin = (-5732339.950191651470959,5732339.950191651470959)
Pixel Size = (5010.786669747946689,-5010.786669747946689)
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_ARTIST=""
  TIFFTAG_DATETIME=2017:06:19 08:30:00
  TIFFTAG_DOCUMENTNAME="TIFF-MF CMS" 126 155 0
  TIFFTAG_HOSTCOMPUTER=REANIM02
  TIFFTAG_IMAGEDESCRIPTION= 126 155 0
  TIFFTAG_RESOLUTIONUNIT=1 (unitless)
  TIFFTAG_SOFTWARE=Pnm2TiffMF v1.2
  TIFFTAG_XRESOLUTION=1
  TIFFTAG_YRESOLUTION=1
Image Structure Metadata:
  COMPRESSION=JPEG
  INTERLEAVE=BAND
Corner Coordinates:
ERROR 1: tolerance condition error
Upper Left  (-5732339.950, 5732339.950)
ERROR 1: tolerance condition error
Lower Left  (-5732339.950,-5732339.950)
ERROR 1: tolerance condition error
Upper Right ( 5732339.950, 5732339.950)
ERROR 1: tolerance condition error
Lower Right ( 5732339.950,-5732339.950)
Center      (   0.0000000,   0.0000000) ( 86d30' 0.00"E,  0d 0' 0.01"N)
Band 1 Block=2288x1 Type=Byte, ColorInterp=Gray

I tried to use GDAL to reproject my GeoTIFF

gdalwarp -s_srs "+proj=geos +lon_0=86.5 +h=35785993.3373 +x_0=0 +y_0=0 +a=6378160 +b=6" -t_srs "EPSG:4326" geostationary_ir-120_20170619083000_c7142d3e384e192461debbe8c32751c1___b8aedb3f.tiff geostationary.tiff

But, and the reprojection doesn't work. Below, this is my output.
GDALWARP output

ERROR 1: tolerance condition error
ERROR 1: tolerance condition error
ERROR 1: tolerance condition error
ERROR 1: tolerance condition error
ERROR 1: tolerance condition error
ERROR 1: tolerance condition error
ERROR 1: tolerance condition error
ERROR 1: tolerance condition error
ERROR 1: tolerance condition error
ERROR 1: tolerance condition error
ERROR 1: tolerance condition error
ERROR 1: tolerance condition error
ERROR 1: tolerance condition error
ERROR 1: tolerance condition error
Creating output file that is 3236P x -2147483648L.
ERROR 1: Attempt to create 3236x-2147483648 dataset is illegal,sizes must be larger than zero.

By using MapServer with WCS 1.1.1 DescribeCoverage query, I got this:

<ows:BoundingBox crs="urn:ogc:def:crs:EPSG::4326" dimensions="2">
    <ows:LowerCorner>-5732339.95019165 -5732339.95019165</ows:LowerCorner>
    <ows:UpperCorner>-5732339.95019165 -5732339.95019165</ows:UpperCorner>
</ows:BoundingBox>
<ows:WGS84BoundingBox dimensions="2">
    <ows:LowerCorner>6.86949633855596 -77.206989333735</ows:LowerCorner>
    <ows:UpperCorner>166.130503661444 77.206989333735</ows:UpperCorner>
</ows:WGS84BoundingBox>

I saw similar questions but in my case, I don't understand why there are errors with GDAL (gdalwarp) while with MapServer it's working...

Software used:

Mapserver 7.0.7
GDAL 1.11.2


texts: Serving local OSM tiles (PNG) using geoserver

texts:
I downloaded OSM Local tiles for offline use. I am developing a web Application using Geoserver and Leaflet. My questions:

Is there a way to deploy my local tiles into Geoserver? And what about performance and caching management?


texts: Answers to be filled in by default with an expression doesn't work in QFIELD

texts: I have set up a project in QGIS with default expressions which takes data from other fields previously filled in and automatically generates a value. It works fine when filling a form into QGIS but it doesn't work while filling a form into QFIELD. Does anyone knows why and how can i fix it?


texts: How to get GML layer CRS with OGR Python?

texts:
I have a GML layer obtained from a WFS that looks like this:

<wfs:FeatureCollection xmlns:ms="http://mapserver.gis.umn.edu/mapserver" xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd http://mapserver.gis.umn.edu/mapserver http://maps.iguess.list.lu/cgi-bin/mapserv?map=/srv/mapserv/MapFiles/LUX_samples.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=PointsOfInterest2169&OUTPUTFORMAT=XMLSCHEMA">
<gml:boundedBy>
<gml:Box srsName="EPSG:2169">
<gml:coordinates>
60252.601105,62852.917507 88920.374823,102462.589590
</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<gml:featureMember>
<ms:PointsOfInterest2169>
<gml:boundedBy>
<gml:Box srsName="EPSG:2169">
<gml:coordinates>
71194.499471,102462.589590 71194.499471,102462.589590
</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<ms:msGeometry>
<gml:Point srsName="EPSG:2169">
<gml:coordinates>71194.499471,102462.589590</gml:coordinates>
</gml:Point>
</ms:msGeometry>
<ms:fid>LuxPOIs.0</ms:fid>
<ms:id>7</ms:id>
</ms:PointsOfInterest2169>
</gml:featureMember>
<gml:featureMember>
<ms:PointsOfInterest2169>
<gml:boundedBy>
<gml:Box srsName="EPSG:2169">
<gml:coordinates>
60252.601105,92833.719028 60252.601105,92833.719028
</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<ms:msGeometry>
<gml:Point srsName="EPSG:2169">
<gml:coordinates>60252.601105,92833.719028</gml:coordinates>
</gml:Point>
</ms:msGeometry>
<ms:fid>LuxPOIs.1</ms:fid>
<ms:id>6</ms:id>
</ms:PointsOfInterest2169>
</gml:featureMember>
</wfs:FeatureCollection>

I need to obtain the CRS of this layer in a PyWPS process, but I can not figure how. I saved this GML bit into a file (test.gml) and made a few tests:

$ ogrinfo test.gml
Had to open data source read-only.
INFO: Open of `test.gml'
      using driver `GML' successful.
1: PointsOfInterest2169

$ python
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from osgeo import ogr
>>> inSource = ogr.Open("test.gml")
>>> inLayer = inSource.GetLayer()
>>> inLayer.GetSpatialRef()
>>>

The CRS is always reported as null, even though the information is there in the GML. What would be the correct way of obtaining it with OGR Python?


texts: QGIS 2.14 vectorgrid function fails in a custom application

texts:
The vectorgrid function works in the QGIS Python console. However, if I would like to run it outside of QGIS in a custom application, it fails. Here is what I do. First I set up the environment:

@echo off
SET OSGEO4W_ROOT=C:\OSGeo4W64
call "%OSGEO4W_ROOT%"\bin\o4w_env.bat
@echo off
path %PATH%;%OSGEO4W_ROOT%\apps\qgis-ltr\bin
set PYTHONPATH=%PYTHONPATH%;%OSGEO4W_ROOT%\apps\qgis-ltr\python;
set QGIS_PREFIX_PATH=%OSGEO4W_ROOT%\apps\qgis-ltr
python

Secondly, I run following lines in Python:

import os, sys
from qgis.core import *
from osgeo import ogr
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from qgis.gui import *
QgsApplication.setPrefixPath('C:\OSGeo4W64\apps\qgis-ltr', True)
app = QgsApplication([], True)
QgsApplication.initQgis()
sys.path.append(r'C:\OSGeo4W64\apps\qgis-ltr\python\plugins')
from processing.core.Processing import Processing
Processing.initialize()
import processing
processing.runalg("qgis:vectorgrid", "0, 1, 0, 1", "0.5", "0.5", "0", None)

This yields following message:

'NoneType' object has no attribute 'mapCanvas'
See log for more details
{'OUTPUT': u'C:\\Users\\pi37pat\\AppData\\Local\\Temp\\processingb5f3676e719f400a9c4b0a135e1cbb89\\dd1a9527b3e04e03b956a396dcd3e76b\\OUTPUT.shp'}

Unfortunately, the indicated output file does not exist. So what am I doing wrong?


texts: Do map series work with 3D scenes in ArcGIS Pro?

texts:
In ArcGIS Pro 1.2, I added a map frame containing a scene to a layout and found out the "Map Series" button (in the "page setup" group on the "layout" tab) was grayed out.

Do scene/3d and map series work together? If they do, what might I have missed?


texts: Gdal ogrinfo CSV unable to open datasource

texts:
When I try to import a csv file into a PostgreSQL table with the Gdal ogr2ogr tool I get the "Unable to open datasource" Failure.
So I tried to open it with the tool ogrinfo and I get the same Failure.

I use it in a Ubuntu 10.10, with the package gdal-bin version 1.6.3-4build1.

This is the command:

> ogrinfo test.csv
FAILURE:
Unable to open datasource `test.csv' with the following drivers.
  -> ESRI Shapefile
  ...
  -> CSV
  ...

This is the content of the "test.csv" file:

col1;col2;col3;col4
1;a;row1;11
2;b;row2;22
3;c;row3;33
4;d;row4;44
5;e;row5;55
6;f;row6;66

Any help?

Could it be the version of gdal bin? kind of old OS I know.


texts:
I have been trying to find out if it is possible to trace through a water network that will consist of line features representing water mains. Tools exist in both QGIS and ArcGIS to help with this and I can set start, end, and barriers
Does anyone know if it is possible to use an attribute value in another feature i.e. 'closed' in a Valves feature, for example, to act as a barrier that the network tracing functionality would recognize? Often valves are maintained in a closed position to assist with water network operations and management and it would be useful to be able to somehow read that status of a valve when carrying out a network trace


texts: Smile Random Forest / computation timed out /Computed value is too large

texts:
I want to make a binary clasificación (1 = burned area, 0 = non burned area) using smile random forest, to train Sentinel 2 SR (12 band included NDVI and DBR) and get new burned trained areas.
I try to make IR with feature collection:
var buffer = function(feat){return feat.buffer(1000,50)};

var nonarea = area.geometry()
              .difference(v_ba.map(buffer));

Map.addLayer(nonarea,{palette: ['blue']},'Área de no concurrencia de incendio');

var nonocurrence = post_cm_mos_AD.sample({
                        region: nonarea,
                        scale: 30,
                        tileScale: 16
                        }).map(function(feature){
                          return feature.set('clase',ee.Number(0))
                        });

but the console return Computed value is too large
the, I haven been trying to make it, using  stratifiedSample, sample code:
var first_img = b_binary;

//Map.addLayer(first_img, vis,'Áreas de incendio para entrenar');

var training_burn2 = post_cm_mos_AD.stratifiedSample({
                                numPoints: 10,
                                classBand: "constant",
                                region: area,
                                scale:30,
                                tileScale: 16,
                                geometries: true,
                                });

But the message in the console is: Computation timed out
This is my link code; https://code.earthengine.google.com/90f4f15023f471059a06ffd57585ea4f


texts: Post-processing CartoCSS layer by custom graphic algorithm

texts:
My goal:

Inspired by Watercolor map created by Stamen Design I'm trying to create custom OSM based map tiles. In the article the Stamen Design guys describe the way of post-processing their tiles (adding Gaussian blur, perlin noise, etc.). I have my own tile server with custom CartoCSS style. I'm pretty happy with it, but I'd also like to add some custom stuff (Gaussian blur etc.) just to a single layer of my CartoCSS style.

Question:

Is it possible to post-process layer of CartoCSS (in Tilemill editor) by some external application (e.g. Gimp command line)? What if I want to post-process the layer by some algorithm written in Java/Python/C++? How would I invoke such post-processing for a CartoCSS layer?

Research 1:

I searched through docs of Mapnik and TileMill but so far I didn't find any info regarding to my question:

http://mapnik.org/docs/
http://tilemill-project.github.io/tilemill/docs/manual/carto/

Research 2:

Mapnik is based on AGG graphics library. From the mapnik sources one can find out how e.g. the lines (ways/paths/...) are rendered. One solution might be to write a custom "symbolizer" (as they call "renderer" in mapnik project). This "symbolizer" could be probably used to render a layer. I'm not sure if this is a correct assumption, but so far this seems to be the right way. I need to do some tests first.


texts: Aggregating satellite night light data in R

texts:
I am working in R and having some difficulties with extracting values from a raster layer. What I am trying to do is aggregate satellite night light data from pixel to polygons. However, when I attempt to extract the data I am unable to process it into a, for me, convenient format such as a data frame.
Below is an example of what I've done so far, using some of the suggestions on similar questions on this website.

The satellite data is taken from NOAA. The code to download the shape file for Sudan comes from this question.

## Load libraries and code
library(maptools)
library(raster)
library(sp)
source("getCountries.R")

## Load data
# Sudanese provinces (Sudan before 2011)
source("code/getCountries.R")
adm1<-getCountries("SDN",level=1)

# Night light data
d<-raster("F141998.v4b_web.stable_lights.avg_vis.tif")

## Transform projection
projection(d)<-proj4string(adm1)

## Crop raster to include only Sudan
e=extent(adm1)
r=crop(d,e)

## Plot data for visual inspection
colfunc <- colorRampPalette(c("black", "white"))
par(mar=c(3,6,3,6))
plot(r,col=colfunc(20))
plot(adm1,border="White",add=T)

They don't call it dark Africa for no reason. Khartoum is clearly visible though. Next step is to get the night light emission per province.

## Extract the data
data<-extract(r,adm1,FUN=max,sp=TRUE)

According to the manual the sp=TRUE argument should return a spatial object if fun is not NULL. Maybe I am missing something here but fun seems to be not NULL, nonetheless I get the following error:

Warning message: In .local(x, y, ...) : argument sp=TRUE is ignored if fun=NULL

The resulting object in this case is a list which isn't really useful. I can set df=TRUE which will give me a large dataframe with all pixels assigned to a province. However, I reckon there must be some method to aggregate the data in one go rather than using several intermediate steps.

Does anyone have a good suggestion on the best way to aggregated pixel data to polygon level?
The example above only uses one raster layer but eventually I want to apply to a stack of layers (multiple years).


texts:
I have a problem with a plugin (SCP). When I run a raster file (or tried), I get this error. I have read other similar problems, but honestly I am new to this whole programming issue and there are things I don't understand. Could someone explain to me how to solve this?

WARNING    Traceback (most recent call last):
              File "/home/kroister/.local/share/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin-master/maininterface/bandsetTab.py", line 377, in rasterLayerName
              cfg.bst.rasterToBandName(imgNm)
              File "/home/kroister/.local/share/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin-master/maininterface/bandsetTab.py", line 1027, in rasterToBandName
              b = r.bandCount()
             AttributeError: 'NoneType' object has no attribute 'bandCount'


texts: Exporting grid vector from QGIS to KML gives wrong coordinates

texts:
A grid vector was created over the map layer (EPSG:32636) and saved as with CSR EPSG:32636.
Then when I export it as KML, it the grid appears in a different country (Congo rather than Lebanon).

I tried to export the KML under different CSR (EPSG:4326, 3857 or 32636): same problem

I tried to create columns of latitude/longitude using $x and $y for each polygon of the grid but the columns remain NULL

Here is the link to the shapefile of the grid vector.
https://drive.google.com/drive/folders/1z5vWO-f0cmdY0FGD1xh24voFsT3OhmBo?usp=sharing
Does anyone have an idea? I am sure there is something wrong with the CSR and I tried everything that I knew so far.


texts:
I have a polygon and I want to estimate areas of different types of land cover tha falls within the polygon. The problem is that the only freely available land cover data I found is https://catalogue.ceh.ac.uk/documents/7115bc48-3ab0-475d-84ae-fd3126c20984, which is 21-bands raster with a resolution of 1 Km.

I am using Qgis 2.18.14

When I tried the Polygonize tool, the tool converts only the first band into a polygon. Conversely, I need to convert all 21 bands... Possibly all of them in one go!

I also considered using the zonal statistic plugin, but there are 2 shortcomings: (i) I need to run the tool each time for a different band, which is annoying but doable, and most importantly (ii) the tool acts in a very weird way and it is unsuitable for data with such low resolution, i.e. if the midpoint of the pixel in the raster does not fall within the polygon, it ignores it.

Does anyone have a suggestion on how I can polygonize a multi-band raster?

Or any other way I could extract the data from the multi-band raster into a polygon?


texts:
I am coding a custom layer for ArcMap using C#. I want the eleven standard property pages to display for the layer (General, Source, Selection, ... , HTML Popup), when the user selects Properties from the TOC context menu. I have not been able to find documentation that associates each page with the interface(s) that it requires. (Other than the General Page which requires ILayer). Anyone have a list that associates the property pages and their interfaces? I suspect that if my custom layer class implements those interfaces, those pages will display. If I am taking the wrong approach, then how do I get those property pages to appear for my custom layer?

Thanks,
Steve

Thanks for your attention.

I read those articles before making my post.  They describe how to create a property page for my layer.  What I am looking for is how to get the eleven standard property pages to appear for my feature layer, when the user selects "Properties" from the TOC context menu, for a feature layer.

For example:  The first standard property page, for a feature layer, is titled, "General" it appears because the custom layer implements the ILayer interface.  The association between "General" and ILayer is not mentioned in those recommended articles.

I will reduce my post to singular questions, as follows:
What interface(s) are required for the "Source" page?
What interface(s) are required for the "Selection" page?
What interface(s) are required for the "Display" page?
What interface(s) are required for the "Symbology" page?
What interface(s) are required for the "Fields" page?
What interface(s) are required for the "Definition Query" page?
What interface(s) are required for the "Labels" page?
What interface(s) are required for the "Join and Relates" page?
What interface(s) are required for the "Time" page?
What interface(s) are required for the "HTML Popup" page?

Respectfully,
Steve


texts: Error when Add GeoJSON protocol layer in QGIS

texts:
I tried to add these GeoJSON files to QGIS (2.18.9 & 2.14.15) with Add a vector layer by Protocol, GeoJSON with GUI OR Python Console:

https://raw.github.com/geobabbler/geodata/master/geojson/leonardtown_bldgs.geojson
https://d2ad6b4ur7yvpq.cloudfront.net/naturalearth-3.3.0/ne_110m_admin_1_states_provinces_shp.geojson

But I get always this error: Data source not valid

What's going wrong with QGIS?

When I add the file downloaded, it's working.


texts:
I am trying to overlap the buffer polygons with the 'visible' part of my Viewshed Raster dataset. I have succeeded in doing this. I had to transform my raster data into polygons and then use the intersect tool to see where the buffer and Viewshed polygon overlap.

The situation is sketched here:

Red is in this case the visible part and light blue the buffers. My question is actually if it is possible to calculate the intersection between raster and polygon without transforming the raster data first into polygons?

I am working with the software Arcmap (ArcGIS)