texts: Problem with extent of mapserver wms/layer

texts:
I use mapserver with MS SERVER 2008. The problem with the correctly  computing layer extend of Map server.

If map file like this

 MAP
      NAME "test map"
      IMAGETYPE      GIF
      EXTENT         19.63 41.10 180.00 81.6
      SIZE           1900 800
      IMAGECOLOR     255 255 255
      CONFIG "PROJ_LIB" "C:\inetpub\wwwroot\MapServ\proj\nad"

    WEB
    IMAGEPATH "img_tmp/"
    IMAGEURL "img_tmp/"
    METADATA
        "wms_enable_request" "*"
        "wms_title" "test"
        "wms_onlineresource"  "******"
        "wms_srs"  "epsg:4326"
        "wms_abstract" "test"
        "wms_encoding" "windows-1251"
        "wms_extent" "19.63 41.10 180.00 81.6"
    END
END

PROJECTION
    "init=epsg:4326"
END

LAYER
    TEMPLATE "template/template.html"
    NAME "okato"
    METADATA
        "wms_title" "OKATO"
        "wms_srs"  "epsg:4326"
        "wms_include_items" "all"
        "wms_abstract" "test"
    END
    TYPE POLYGON
    STATUS ON
  ####
    CONNECTIONTYPE PLUGIN
    PLUGIN "C:/inetpub/wwwroot/MapServ/specialplugins/msplugin_mssql2008.dll"
    CONNECTION "Server=... ; uid=... ; pwd=... ; Database=... ; Integrated Security=true"
    DATA "geom from dbo.okato USING UNIQUE ID USING SRID=4326"
  ####
    PROJECTION
        "init=epsg:4326"
    END

Map server generate XML with the following BoundingBox of layer:

<CRS>epsg:4326</CRS>
<EX_GeographicBoundingBox>
<westBoundLongitude>-3.40282e+038</westBoundLongitude>
<eastBoundLongitude>3.40282e+038</eastBoundLongitude>
<southBoundLatitude>-3.40282e+038</southBoundLatitude>
<northBoundLatitude>3.40282e+038</northBoundLatitude>
</EX_GeographicBoundingBox>
<BoundingBox CRS="epsg:4326" minx="-3.40282e+038" miny="-3.40282e+038" maxx="3.40282e+038" maxy="3.40282e+038"/>

If I add extent layer like this:

LAYER
...
    EXTENT         19.63 41.10 180.00 81.6
...
END

or

LAYER
...
    METADATA
        ......
        "wms_extent" "19.63 41.10 180.00 81.6"
    END
...
END

It works correctly

<CRS>epsg:4326</CRS>
<EX_GeographicBoundingBox>
<westBoundLongitude>19.63</westBoundLongitude>
<eastBoundLongitude>180</eastBoundLongitude>
<southBoundLatitude>41.1</southBoundLatitude>
<northBoundLatitude>81.6</northBoundLatitude>
</EX_GeographicBoundingBox>
<BoundingBox CRS="epsg:4326" minx="41.1" miny="19.63" maxx="81.6" maxy="180"/>

How to make that mapserver dynamically to calculate the extent (and BBOX) of layer, and not add it manually?


texts: ArcGIS Online: How to export layer data?

texts:
I have created an application using ArcGIS Online. I have some layers in it. Now I want a complete report of all layers means I want to export/download layer data in any format.

So Is there any solution or APIs, through which we can query the layers and download the data?


texts: Clipping polylines with polygon boundary in MapInfo

texts: I want to clip the lines with polygon and also I want to export it as separate shapefile. Can we able to do this task in MapInfo Pro 15.2 without using MapInfo Discover?


texts: Does an unused WMS layer slow down ArcMap project?

texts: Does an unused (not ticked) WMS layer which is in table of contents actually slow down an ArcMap project?


texts: QGIS: How to get Symbols saved in GPX Files

texts:
I have some waypoint layers that contain different types of points and I distinguish these in QGIS by different symbols and colours.  I want to export these to a GPX file that I can download to my GPS but The GPX file contains just the lat, long and the 'type'.

Is there a way of getting gpstool to save other attributes in a gpx file?

I do get some more data out in  (gid, source and classification) so I can write a script to process the xml and add the necessary attributes that the GPS expects.

Secondary question:  Would this make a useful plugin?


texts: Benefits of *.las vs *.xyz or *.ascii when working with LiDAR in ArcGIS for Desktop?

texts:
From time to time, we use LiDAR data for modelling in ArcGIS. Previously, we would be supplied either an .xyz or .ascii of the data, but more recently, we are also being provided .las files in addition to the .xyz and ascii's.

I was reading this article which states "Having lidar in LAS format may be obvious to the initiated but not to those new to using lidar data" and "It's binary, efficient, widely supported, and the format ArcGIS works best with". I am one of those people who fall into the category of new to using .las formats.

Normally with the .xyz and ascii, I would use Global Mapper to convert them to a raster grid (for use within modelling) and it appears that I would also need to convert the .las file as well (being a point cloud). I guess the question that I am asking is:

Are there any benefits of using a .las compared to an .xyz or ascii if I still need to convert them to another raster format (GRID or .img)?


texts: Matching points to polygons and handling points NOT in polygons

texts:
I have two GeoDataFrames: one with 191k address points and another with 18 polygons representing catchment areas for specific schools. Theoretically, every address should fall into one of the zones.
When running my code, I get the following error:
ValueError: Length of values (191888) does not match length of index (191921)

I suspect that there are 33 points that are not matched to a polygon.
import geopandas as gpd
import os

from shapely.geometry import Point, Polygon

pointpath = "/path/to/address points/"
point_df = gpd.read_file(os.path.join(pointpath,"addresses.shp"))

shapepath = "/path/to/catchment areas/"
shape_df = gpd.read_file(os.path.join(shapepath,"catchments.shp"))

school_list = []
for i in range(len(point_df)):
    pt = Point(point_df['geometry'][i])
    for index, row in shape_df.iterrows():
        poly = Polygon(row['geometry'])
        if(pt.within(poly)):
            school_list.append(row['school_name'])
            print(i)
point_df['zoned school']=school_list
point_df.to_excel(os.path.join(pointpath,'foo.xlsx'))

First off, is this the most efficient way of performing this task?
Second, is there a way to loop through the catchment areas and if there is no match, enter something like "no match found" so that the number of list items matches the number of dataframe rows?


texts: Adding multiple fields for multiple feature classes in a single geodatabase

texts:
I am trying to add multiple fields to a list of feature classes in a geodatabase for NextGEN911.  I am having trouble executing this line of code because I am getting the following error

#Import arcpy and allow overwrite
import arcpy
arcpy.env.overwriteOutput = True

#Set the environment settings
arcpy.env.workspace = "Z:\\\\ESInet\\PracticeESINet\\Practice.gdb"

#This returns a list of FeatureClasses in teh top of the level geodatabase
FcList = ["DaviePSAP", "DavieEMS", "DavieFire", "DaviePolice", "DavieSheriff"]

#Add all mandatory fields for all feature classes in .gdb using a loop
for fc in FcList:
    # The " " inputs mean just use defaults
    arcpy.AddField_management(fc, "sourceOFData", "TEXT", "", "", "75", "", "NULLABLE", "NON_REQUIRED", "")
    arcpy.AddField_management(fc, "Source of Last Edit Date", "DATE", "", "", "", "NULLABLE", "NON_REQUIRED", "")
    arcpy.AddField_management(fc, "uploadAuthority", "TEXT", "", "", "75", "", "NULLABLE", "NON_REQUIRED", "")
    arcpy.AddField_management(fc, "effectiveDate", "DATE", "","", "", "", "NULLABLE", "NON_REQUIRED", "")
    arcpy.AddField_management(fc, "expirationDate", "DATE", "", "", "", "", "NULLABLE", "NON_REQUIRED", "")
    arcpy.AddField_management(fc, "county", "TEXT", "", "", "75", "", "NULLABLE", "NON_REQUIRED", "")
    arcpy.AddField_management(fc, "state", "TEXT", "", "", "2", "", "NULLABLE", "NON_REQUIRED", "")
    arcpy.AddField_management(fc, "country", "TEXT", "", "", "2", "", "NULLABLE", "NON_REQUIRED", "")
    arcpy.AddField_management(fc, "agencyID", "TEXT", "", "", "100", "", "NULLABLE", "NON_REQUIRED", "")
    arcpy.AddField_management(fc, "serviceURI", "TEXT", "", "", "254", "", "NULLABLE", "NON_REQUIRED", "")
    arcpy.AddField_management(fc, "serviceURN", "TEXT", "", "", "", "254", "", "NULLABLE", "NON_REQUIRED", "")
    arcpy.AddField_management(fc, "serviceNumber", "TEXT", "", "", "15", "", "NULLABLE", "NON_REQUIRED", "")
    arcpy.AddField_management(fc, "agencyVCardURI", "TEXT", "", "", "254", "", "NULLABLE", "NON_REQUIRED", "")
    arcpy.AddField_management(fc, "displayName", "TEXT", "", "", "60", "", "NULLABLE", "NON_REQUIRED", "")
    arcpy.AddField_management(fc, "comments", "TEXT", "", "", "100", "", "NULLABLE", "NON_REQUIRED", "")
    arcpy.AddField_management(fc, "gcLabel", "TEXT", "", "", "150", "", "NULLABLE", "NON_REQUIRED", "")

if fc in FcList == "DaviePSAP":
    arcpy.AddField_management(fc, "sourcePSAPUnqID", "TEXT", "", "", "254", "", "NULLABLE", "NON_REQUIRED", "")

FCList2 = [ "DavieEMS", "DavieFire", "DaviePolice", "DavieSheriff"]

for fc in FCList2:
    arcpy.AddField_management(fc, "sourceUnqID", "TEXT", "", "", "254", "", "NULLABLE", "NON_REQUIRED", "")

print "Add field is successful"`

Error:Traceback (most recent call last):
  File "C:/Users//Desktop/AddfieldsDiagnostic.py", line 19, in <module>
    arcpy.AddField_management(fc, "Source of Last Edit Date", "DATE", "", "", "", "True", "NON_REQUIRED", "")
  File "C:\Program Files (x86)\ArcGIS\Desktop10.6\ArcPy\arcpy\management.py", line 3435, in AddField
    raise e
ExecuteError: ERROR 000622: Failed to execute (Add Field). Parameters are not valid.
ERROR 000800: The value is not a member of NULLABLE | NON_NULLABLE.

I have previously referred back to a older post that solved this issue by replacing the Nullable strings with "True", but that did not work either.  Any suggestions?


texts:
I need to transform some line and polygon geometry to WGS 84.

At point it working fine, but at the line and polygone I have problems, I tried in many ways, but it does not work.
In the screenshot you can see the geom Coordinates. How can I transform to WGS 84?


texts: ArcPy adds erroneous interior ring when writing adjacent, multipart geometry?

texts:
I've run into an odd issue when using Arcpy to write multipart geometry to a shapefile. I am using an InsertCursor to create a multipart feature from a list of parts each with a list of vertex pairs. I understand that when this feature is created, adjacent multiple parts are automatically "dissolved" into a single part. But for some reason, this is creating an interior ring, even though I did not include a Null arcpy.point() in the array as is usually required to add interior rings. Here's a visualization:

Does anyone have any idea why this is happening and/or how to overcome the issue?

For reference, here's my code:

import arcpy

arcpy.CreateFeatureclass_management(r"C:\temp", "test.shp", "POLYGON")
OutputCursor = arcpy.InsertCursor(r"C:\temp\test.shp")

# List of parts, each with list of vertex pairs
ListOfParts = []
ListOfParts.append([[0,1],[1,1],[1,0],[0,0],[0,1]])
ListOfParts.append([[0,2],[1,2],[1,1],[0,1],[0,2]])
ListOfParts.append([[0,3],[1,3],[1,2],[0,2],[0,3]])
ListOfParts.append([[1,1],[2,1],[2,0],[1,0],[1,1]])
ListOfParts.append([[1,2],[2,2],[2,1],[1,1],[1,2]])
ListOfParts.append([[1,3],[2,3],[2,2],[1,2],[1,3]])
ListOfParts.append([[2,1],[3,1],[3,0],[2,0],[2,1]])
ListOfParts.append([[2,2],[3,2],[3,1],[2,1],[2,2]])
ListOfParts.append([[2,3],[3,3],[3,2],[2,2],[2,3]])

# Array of parts to be passed to newRow()
ArrayOfParts = arcpy.Array()

# Add parts to array
for Part in ListOfParts:
    ArrayOfVertices = arcpy.Array()
    for Vertex in Part:
        ArrayOfVertices.add(arcpy.Point(Vertex[0],Vertex[1]))
    ArrayOfParts.add(ArrayOfVertices)
    ArrayOfVertices.removeAll()

# Output new feature
OutputFeature = OutputCursor.newRow()
OutputFeature.shape = ArrayOfParts
OutputCursor.insertRow(OutputFeature)


texts: How do I toggle (add/remove) shapefile layers in Leaflet.js?

texts:
If I create a shapefile layer

var ac_shpfile = new L.Shapefile("data/AC.zip", {onEachFeature: function (feature, layer) {
/* Add some colors based on shapefile features */
}});

and then add it to the map I've created

ac_shpfile.addTo(map);

How do I later remove that shapefile layer from the map? I plan to create another shapefile layer (same shapefile but with different colorings) and based on some user action switch between these two shapefile layers being shown. How do I add/remove shapefile layers like this? I've looked for the "opposite" of addTo() in the documentation but this doesn't seem tot be easy to find?


texts: Catching clicked signal on a QgsMapCanvas

texts:
I am working under C++ with the QGIS API 2.8
In order to make different operation on a canvas like personalized rotation or selecting a region for zooming, I had to catch different signal like rightclick, leftclick, clicked or dblclick.
I saw in the API online the class QgsMapToolEmitPoint, Does anyone already used it ?


texts: can i comparing landsat 7 and landsat 8 thermal band?

texts:
can i comparing landsat 7 (band 6) and landsat 8 (band 10&11) thermal band? because landsat 8 only have 100m spatial resolution, so the output looks more general or blurr than landsat 7 thermal band.
and what does mean TIRS band can be resampling to 30m resolution?


texts: What's the timezone of 3-Hourly TRMM Data?

texts:
I am using google earth engine just to print the timestamp here of TRMM Data. I am using the geometry of a part of Chennai which is in India.

// Filtering Data with Date and Geometry
var Data1 = TRMM.filterBounds(geometry).filterDate('2013-04-09', '2014-04-10');

// Printing Timestamp
print('TRMM Metadata', Data1.first().date());
Map.centerObject(geometry, 8);
Map.addLayer(geometry,{color: 'FF0000'},"Chennai");

My question what exactly the printed time does indicate (with respect to UTC (GMT) or Local Time Zone (IST) ).

just in case if you need the import

IMPORTS:

var TRMM = ee.ImageCollection("TRMM/3B42"),
geometry = /* color: #d63000 */ee.Geometry.Polygon(
    [[[80.26491619216495, 13.08801893465061],
      [80.26422954665713, 13.077652181027775],
      [80.28002239333682, 13.08166516962143]]]);

I am using google earth engine only to print the timestamp here of TRMM Data and not anyway related to my question.


texts: Is it possible to add base map imagery using QGIS2Web

texts:
Is it possible to add satellite base map imagery using QGIS2Web?
I can't seem to add it using the Export to web map functionality.

Also, when I select two base maps and export my map using QGIS2Web neither of them show?


texts:
In ArcMap I have to represent water data that has extreme disrepencies between the figures, so when I create a bar graph one graph is much larger than the others. Even if I convert these figures to a percentage it is 99% versus the others which are less than 1%. The only thing I can think of is to use pie charts of the same size, but then this doesn't show the visual aspect of the differences between figures by looking at it (e.g that one uses more water than the others).

Does anyone have better ideas on how to represent this data using ArcGIS 10.1 for Desktop?

also is there a way to move the placement of the charts so they don't cover my reservoirs?

example data:
reservoir a. 300,000 ML used 250,000 unused
reservoir b. 700ML used 10ML unused

update - I cannot remove the outlier because I have 9 regions, all with outliers that have higher amounts of water than the others. The only thing I can do is change the size of the pie chart based on a field but this causes some pie charts to be tiny dots, so I have had to create a ratio based on a scale to represent my figures.

I would have liked if it there was more I could do with charts, I can't label them and I would have liked to use the thickness slider bar in 3d pie charts as a field - so the height of the pie charts would change based on a figure. I create a label based on my layer but these get covered by the pie charts, the only thing I can do is set an offset.


texts: Altered values of GeoTIFF after vector extraction.QGIS

texts:
I've downloaded a LAI (Leaf Area Index) in GeoTIFF format from https://land.copernicus.eu. After I extract some specific area via raster-extraction-extract by mask the raster values are altered. Before I got specific LAI values between 0 an 7 after the extraction I got in return Digital Numbers, values ranging from 0 to 170.

First: I don't know why this is happening and i want to understand it.
Second: I want my values to remain the same as the input

My version of QGIS is 3.4.


texts: I am trying to divide a large parcel into a subdivision but the parcel editor in arcmap is grayed out and unusable. The regular editor tool is working and I'm not getting any error or notification why it isn't working.


texts: Digitizing Free Satellite Imagery in QGIS without getting Alignment issues with Openlayers Plugin

texts:
I am trying to digitize OpenLayers data (such as Google satellite imagery) with no success. Whenever I try to move or zoom the canvas the vector layer I digitized loses the position relative to the imagery.

I have read about this problem elsewhere but was not able to find a solution.

Does anyone have a solution as to how I can digitize satellite imagery for free in QGIS?


texts: Importing ArcGIS Vector Layer "drawingInfo" to apply to QGIS layer style?

texts:
It is possible to import vector layers in GeoJSON format either directly from an ArcGIS MapServer URI, or from a local JSON file sourced from such. ArcGIS JSON has a "drawingInfo" key (example below). My question is whether QGIS can interpret this data (colours, transparency etc.) and apply it to layer style properties? Currently, if I import JSON from an ArcGIS MapServer source this data seems to be ignored and style is set automatically.

"drawingInfo": {
    "renderer": {
      "type": "simple",
      "symbol": {
        "type": "esriSFS",
        "style": "esriSFSSolid",
        "color": [
          198,
          232,
          201,
          255
        ],
        "outline": {
          "type": "esriSLS",
          "style": "esriSLSNull",
          "color": [
            130,
            130,
            130,
            255
          ],
          "width": 0
        }
      },
      "label": "",
      "description": ""
    },
    "transparency": 0,
    "labelingInfo": null
  }


texts:
I have a points layer in QGIS that organised by time, with a column called 'Diff' that has either a 1 or a 0.
The 1 marks a point where there is a jump in time, the 0 marks where nothing has happened.
I want to create the column 'Group' in Field Calculator where every time it sees a '1' it incrementally assigns a number, i.e. 1, 2, 3, 4... as seen below:
Diff    Group
0   1
0   1
0   1
0   1
1   2
0   2
0   2
0   2
0   2
1   3
0   3
0   3
0   3
0   3
0   3


texts: Can QGIS load filtered layers on open from geopackage file?

texts:
I have some external processing (FME from SAFE software) which generates a geopackage file with a set of tables.

Is it possible to load a set of filtered tables from a geopackage file when opening the project file?

More to the point I would like to add all tables named tbl_asset_* to a designated group when I open the QGIS project.

I am using QGIS 3.8.


texts: Generating Values in Attribute Table using ArcGIS Desktop

texts:
In the attribute table within GIS, I have a certain column with ascending values, and I want to assign ID numbers (for easier readability and display) to a corresponding column. So for instance:

Feet Away   |   ID
 200.1      |   1
 302.0      |   2
 500.9      |   3
 ...        |   ...
 highest    |  highest

I would want to be able to generated the 1, 2, 3, etc.

I do not know how to generate the ID field given that the 'Feet Away' field is already generated and in order. I know that if I had access to some java or javascript function, I would make a loop which started at the first element (the ID field corresponding to 200.1 in the above, or 1), iterate it for as long as there is a value in the feet away column, and fill the ID field with a number one larger than the previous number added. But I do not know how to do that with the attribute table.

How do I generate a column of increasing integers?

Do I need to add code from a different source?

It seems like a pretty easy computer science problem, I just do not know how to do it within a GIS context.


texts: Can non-elevation data be displayed in 3D? Such as EC measurements in soil over a surface?

texts: I tried creating a tin in ArcScene with a raster I have from an IDW file of salinity at sample points in a field, but I can't get it to display as anything other than flat. My points range from ~1-40 in value. I want to display it in 3D with the highly saline points as high peaks and low saline as depressions. Is this possible?


texts: Topographicmap.jpg convert to GPS readable

texts:
I have topographic map 1:25000 and I want that map to be GPS readable. So, is there any program for maps that can import this .jpg extension and to track my position in platform of this my topo map ?
e.g. Soviet Military Maps app can only import .gpx, .kml, .kmz and .tcx. Or app Custom Maps can import .jpg but can only show Your lokation on/in that map, there is no routs, tracking, azimut etc


texts: Split a table of Multi/Linestrings into Unique Linestrings

texts:
Is there an efficient way to split a table of Multi/Linestrings that overlap() and touch() into unique Linestrings (note: creating edges using topology is going very...very...very slow).

Here is some sample data that I've been playing with...

CREATE TABLE multilines (
  "id" SERIAL NOT NULL PRIMARY KEY,
  "name" char(1) NOT NULL,
  "the_geom" geometry NOT NULL
);
-- add data, 3 multilines, ONE of the 'B' geoms has an interior 'donut hole' multilinestring
INSERT INTO multilines(name, the_geom) VALUES (
    'A', 'MULTILINESTRING((2 1,0 3),(0 3,2 3),(2 3,2 1))'::geometry
    ), (
    'B',
    'MULTILINESTRING((0 0,4 0),(4 0,4 4),(4 4,0 4),(0 4,0 0),(1 1,2 1),(2 1,2 2),(2 2,1 2),(1 2,1 1))'::geometry
    ), (
    'B', 'MULTILINESTRING((-1 -1,-1 -2),(-1 -2,-2 -2),(-2 -2,-2 -1),(-2 -1,-1 -1))'::geometry
    );

Since I don't have a node table of where the intersections are (and it seems intuitively inefficient to generate one) I was hoping to just do this without generating another table (which most people doing this type of query seem to be doing).

Notably...when I do something like 'ST_Linemerge(st_collect(the_geom))' ...I get 1 row showing ALL the merged lines (which isn't what I'd want - I definitely want to break the lines into separate Multi and/or Linestrings, and run a DISTINCT query just to return one of the_geoms).


texts: SNPP Viirs swath data reprojection to wgs84

texts:
How can I reproject this file:

I downloaded from: https://ufile.io/dev4b

ftp://nrt4.modaps.eosdis.nasa.gov/allData/5000/VNP14IMG_NRT/Recent/

I tried using gdal... but I'm not so expert, so can't do it... someone can help me?

I followed: How to reproject MODIS Swath data to WGS84

But the file doesnt have GCP fields... I got this error:

"ERROR 1: Unable to compute a GCP_TPS based transformation between pixel/line and georeferenced coordinates for NETCDF:VNP14IMG_NRT.A2018163.0512.001.nc:fire mask."


texts: Getting higher resolution images from USGS into OpenLayers?

texts:
Is there a way to get better resolution maps from USGS into OpenLayers?

Here is a single request to the mapserver that returns an image with 2 county names:

services.nationalmap.gov/ArcGIS/rest/services/TNM_Vector_Large/…{%22xmin%22%3A-13605383.531782%2C%22ymin%22%3A6058082.337924%2C%22xmax%22%3A-13604466.287443%2C%22ymax%22%3A6058999.5822633%2C%22spatialReference%22%3A{%22wkid%22%3A102113}}&size=2048%2C2048


texts: Import GRASS and SAGA modules to python script

texts:
I'm new at this. I am "building" a python plugin for qgis and I want to import modules from GRASS and SAGA but I don't understand how to do it. The plugin I want to import is Kriging interpolation from SAGA or v.surf.idw from GRASS or interpolation plugin from Raster qgis. I want an interpolation method to convert points in grid.

Can you help me?

I have another doubt.

I run these lines in my code:

vectorlayer_vector =  ftools_utils.getVectorLayerByName(inputLayer)
Elevation = self.lineAttrib.currentText()
cellSize = int(self.linePix.value())
outPath = self.inputLayerCombo3.text()
output = ftools_utils.getRasterLayerByName(outPath)

Processing.runAlgorithm("saga:shapestogrid", vectorlayer_vector, Elevation, 0, 0, 4, None, cellSize, output)

When I run, I get an tiff image but with nothing. The .aux file is not created and when I try to open the tiff image that I created appears this message:

c:...teste3.tif is not a supported raster data source

So, I guess that the output is wrong. What I have to do to get a correct output? What I missing?


texts: PyQGis animate layer symbology change using thread failed

texts:
I need to animate the symbology change over a number of steps in a stand-alone PyQt application that uses qgis.core as library for map, my setup is very similar to Animating objects on canvas to change color by delay using PyQGIS?, it actually runs, but the map failed to change and it also gives the following messages:

QObject::connect: Cannot queue arguments of type 'QgsFeatureId'
(Make sure 'QgsFeatureId' is registered using qRegisterMetaType().)
QObject::connect: Cannot queue arguments of type 'QgsChangedAttributesMap'
(Make sure 'QgsChangedAttributesMap' is registered using qRegisterMetaType().)

so it turns out that the above message was due to I am updating the value attribute of feature via

layer.startEditing()
layer.commitChange()

So, I switch to use data provider to update, now the messages are gone, but it still not changing the map symbology.


texts: Understanding UTM coordinate syntax in Zambia?

texts:
I have some geo data from a collaborator with coordinates that look like this:

Grid    UTM X   UTM Y
30C10   696033  8967310
25C05   690997  8962938
25C05   690688  8962268

sometimes lower case (assume it's a typo?)

25c17   702859  8962900

and sometimes only one digit following the letter:

38c9    692363  8972661

These points should be in Zambia...

If I take just the first three characters as the UTM Zone (e.g. 38C) and use Perl's Geo::Coordinates::UTM to convert to WGS-84 it all looks very wrong.

Can anybody shed some light?

I am also asking the collaborator.


texts: How do I create random points only within a multi-part polygon and none outside?

texts:
I am currently using a shapefile consisting of an area smaller than the entire study boundary ie. I want this to to be my overall study area. I used a raster to polygon tool and converted it to a shapefile and used the Dissolve tool to create a multipart polygon.

Now when I am creating random points and specify the constraining feature class, it is creating random points outside the polygons I possess as well. Attached is a screenshot of random points all over, instead of just within the polygons.


texts:
There is a lot of information about (pg)routing over normal ways. Normal ways are man made and kind of ideal for routing.

However i am interested in routing over waterways. In theory this should be the same as routing over normal ways, except that waterways are often not man made and so they consist out of large water bodies like lakes. Lakes are not a neat line that you can use for routing and apart from that you also have to consider water depth, bridges and locks that may or may not allow you to cross. And all this is of course again dependent on the size/depth of your boat.

Is there any tooling available that tackles some of the issues i describe above?


texts: Is this WFS 2.0.0 specification example using a namespaced id attribute correct?

texts:
I am building c# models for the WFS spec, specifically the Filter in the fes namespace.  The spec contains the following example:
<?xml version="1.0"?>
<fes:Filter
   xmlns:fes="http://www.opengis.net/fes/2.0"
   xmlns:gml="http://www.opengis.net/gml/3.2"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.opengis.net/fes/2.0
   http://schemas.opengis.net/filter/2.0/filterAll.xsd
   http://www.opengis.net/gml/3.2
   http://schemas.opengis.net/gml/3.2.1/gml.xsd">
   <fes:Overlaps>
      <fes:ValueReference>Geometry</fes:ValueReference>
      <gml:Polygon gml:id="P1" srsName="urn:ogc:def:crs:EPSG::4326">
         <gml:exterior>
            <gml:LinearRing>
               <gml:posList>10 10 20 20 30 30 40 40 10 10</gml:posList>
            </gml:LinearRing>
         </gml:exterior>
      </gml:Polygon>
   </fes:Overlaps>
</fes:Filter>

Notice the "id" on the gml:Polygon is actually "gml:id" and not "id".  I can understand that attributes can be namespaced but since the Polygon is already in the "gml" namespace is this still correct?  Perhaps it is just a redundancy?
I only ask because when I deserialize I lose this value and therefore when I serialize the model I get this:
<Filter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="http://www.opengis.net/fes/2.0&#xA;   http://schemas.opengis.net/filter/2.0/filterAll.xsd&#xA;   http://www.opengis.net/gml/3.2&#xA;   http://schemas.opengis.net/gml/3.2.1/gml.xsd" xmlns="http://www.opengis.net/fes/2.0">
  <Overlaps>
    <ValueReference>Geometry</ValueReference>
    <Polygon srsName="urn:ogc:def:crs:EPSG::4326" xmlns="http://www.opengis.net/gml/3.2">
      <exterior>
        <LinearRing>
          <posList>10 10 20 20 30 30 40 40 10 10</posList>
        </LinearRing>
      </exterior>
    </Polygon>
  </Overlaps>
</Filter>

So is the example correct and my deserializer not reading it an error or is the example incorrect?  My model is defined like this:
[XmlRoot("Polygon", Namespace = "http://www.opengis.net/gml/3.2")]
public class Polygon
{

    [XmlAttribute("id")]
    public string Id { get; set; }

    [XmlAttribute("srsName")]
    public string SrsName { get; set; }

    [XmlElement("exterior")]
    public Exterior Exterior { get; set; }
}

I assume the "Id" is in the same namespace as the Polygon class (gml).
UPDATE: thanks to https://stackoverflow.com/questions/20666023/xml-attribute-not-getting-namespace-prefix I learned that I can set "Form" on the XmlAttribute:
    [XmlAttribute("id", Form = XmlSchemaForm.Qualified)]
    public string Id { get; set; }

Unfortunately this now requires that the prefix be present.


texts: Equivalents of Esri products in open source for Web Mapping?

texts:
I have been using the following licensed products to publish my GIS data on web.

web server: windows 2008 R2,
GIS desktop: ArcGIS desktop,
GIS web server: ArcGIS server,
API: ArcGIS API for JS,
Database: Oracle with ArcSDE,
IDE: Eclipse.

But now I want to switch altogether to open source world mainly because of freedom. Fortunately there is plethora information about open source on web but unfortunately are confusing me a lot.

There are so many products like GeoServer, MapServer, OpenLayers, GeoTools, Vaadin, Geomajas, uDig, GRASS etc etc. I am not able to relate these products with the one I am already using.

Can someone please relate the equivalents?


texts:
I've got a 10x10 km UTM grid (vector file), which I want to use for showing the distribution and abundance of a bird species. For each cell, I've got a value for the survey effort (number of days, ranging from 0 to 2,000) and the number of birds recorded (from 0 to 600).
The grid consists of 5,600 cells, of which around 2,500 have been surveyed (in blue) to a greater or lesser extent. Of these, cells with the highest bird counts are in the eastern coast and in the islands.

How can I produce a map for the whole area, interpolating ponderated values (like number of birds per 100 visits) in non surveyed cells using QGIS?


texts:
I'm using GeoServer for the publication of my maps. To generate a style for a map I mostly use the SLD's generated by QGIS. But since these generated SLD's don't always cover the whole style made in QGIS (no labels etc.) I'm using the CSS plugin for GeoServer.

The manaul for this is quite comprehensive but not enough for me. I'm looking for a list with all the CSS commands (parameters). Can anyone direct me to such a list?


texts: Installing QGIS with ECW support on Mac?

texts:
I bought a imac recently and I tried to install qgis: without success! It is not possible to read the raster files.  I installed GDAL ECW plugin, but it is necessary to copy and paste another file from  ERDAS ECW/JPEG2000 following this instruction.

"VERY IMPORTANT POST-INSTALL

You MUST download and install the ECW SDK yourself. I don't have the means to enforce export restrictions. I'm sorry, but installation is a manual process for now:

Go to http://download.intergraph.com/download-portal. Select "ERDAS ECW/JPEG2000 SDK" from the Product popup. Click on the MacOSX line, then the Download Now link.

Open the downloaded disk image and run the installer. It will install into the top of your boot drive, /Intergraph. Dig into this folder to Desktop_Read-Only/redistributable/libstdc++.

Copy the libNCSEcw.dylib file to:

/Library/Application Support/GDAL/1.11/Libraries

and copy the whole Desktop_Read-Only/etc folder here to:

/Library/Application Support/GDAL/1.11

so it looks like (there may be other files in Libraries and PlugIns for other installed plugins):

Library
Application Support
GDAL
1.11
etc
Libraries
libNCSEcw.dylib
PlugIns
gdal_ECW_JP2ECW.dylib

You can trash the installed Intergraph folder when done to save a few hundred MB of space.

I failed the procedure! Could you help me?


texts: How to remove the boundaries of a Polyline?

texts:
I have a polyline. I want to delete outside boundaries of that polyline. I achieved it by splitting the features of that polyline and selecting/deleting the outer lines/boundary.

I'm thinking, is there a way to achieve this without the manual editing?

The image below is BEFORE while the latter is the AFTER(what I want to achieve).


texts:
I want to display an indoor map. My problem is that when I change to another floor (the URL changes) the tiles are not refetched. The following code is used:

var indoorSource = new ol.source.XYZ({
    crossOrigin: null,
    tileUrlFunction: parseUrl,
    maxZoom: 45
});
var indoorLayer = new ol.layer.Tile({
    source: indoorSource
});

The parseUrl function is the following:

var parseUrl = function (tileCoords, pixelRatio, projection) {
    var url = 'http://127.0.0.1/tiles/{z}/{level}/{x}/{y}';
    var innerMap = LocalUserData.currentInnerMap();

    url = url.replace('{level}', innerMap.level || 0);
    url = url.replace('{z}', tileCoords.z || 0);
    url = url.replace('{x}', tileCoords.x || 0);
    url = url.replace('{y}', tileCoords.y || 0);
    return url;
};

Is there a way to force a reload of the tiles?


texts: Difficulty converting State Plane to WGS 84

texts:
I have some parcel coordinates that I cannot convert to WGS 84 (cf. http://www.bcad.org/mapSearch/?cid=1&p=448116)

What's the coordinate system of these parcel coordinates, you ask? Great question...

As a running example, consider the address

4851 VIEWCREST RD
San Antonio, TX 78204

has these coordinates in the polygon:

2160910.4206036776,13756591.710301831
2160881.7703412026,13756575.760170609
...

In the JSON response that produces these coordinates, there is a field which leads me to believe the coordinates are EPSG 2278:

"spatialReference": {
    "wkid": 102740,
    "latestWkid": 2278
}

This EPSG corresponds to NAD83 / Texas South Central (ftUS) according to http://spatialreference.org/ref/?search=Texas&srtext=Search.

I can even do a sensible conversion here on Earthpoint (http://www.earthpoint.us/StatePlane.aspx) using the options 4204 - Texas South Central / US Survey Feet.

Problem is that I can't seem to get a valid conversion from EPSG 2278 to WGS 84 (I've tried both https://mygeodata.cloud/cs2cs/ as well as pyproj).

Aside that may be of help: When I look at the features of EPSG 2278, it appears that the coordinates I'm getting back are outside the correct bounding box for this coordinate system: http://spatialreference.org/ref/epsg/2278/

WGS84 Bounds:
-105.00 27.82
 -93.83 30.66

Projected Bounds:
   29,483.7 13,155,424.7
3,639,474.5 14,199,599.0

I've tried every other EPSG for Texas South Central I could find listed (http://spatialreference.org/ref/?search=Texas&srtext=Search).

Another aside: I'm using Python code similar to this (and I get similar results on https://mygeodata.cloud/cs2cs/):

EPSG_FROM = pyproj.Proj("+init=EPSG:3673")
EPSG_TO = pyproj.Proj("+init=EPSG:3857")
lat_wgs84, lon_wgs84 = pyproj.transform(EPSG_FROM, EPSG_TO, float(point[0]), float(point[1]))

where point is of course a coordinate from the polygon I'm interested in converting.


texts: Speeding up OpenStreetMap PostGIS querying

texts:
I have OpenStreetMap data for the Netherlands loaded into a PostGIS database (PostgreSQL 8.3 / PostGIS 1.3.3) using the osmosis schema. This means all tags are stored in a hstore field. In addition to the GIST index that osmosis creates on the geometry field, I created an additional GIST index on the tags field.

Trying to query using both a spatial constraint and a constraint on the tags field, I find that it is slower than I would like. A query like this one:

SELECT n.geom,n.tags,n.tstamp,u.name FROM nodes AS n
  INNER JOIN users AS u ON n.user_id = u.id
  WHERE tags->'man_made'='surveillance'
  AND ST_Within(geom, ST_GeomFromText('POLYGON((4.0 52.0,5.0 52.0,5.0 53.0,4.0 53.0,4.0 52.0))',4326));

takes 22 seconds to return 78 records.

There are around 53 million records in this table.

Is there a way to significantly speed this up?
I've heard that hstore is implemented significantly better in PostgreSQL 9, would upgrading help?


texts: Define Projection - Error 000732 - Dataset Does Not Exist or Is Not Supported

texts: I am working with a shapefile that currently does not have any projections associated with it. However, when I attempt to Define the Projection, I am met with Error 000732. I have tried doing this in both ArcMap as well as ArcCatalog with no luck in either. The dataset does exist, the address is written properly, but I have had no success.


texts: Upside down result when I use QGis to georeference 1977 S. African Land Survey Maps of Namibia

texts:
I'm trying to georeference some maps of Namibia and am having trouble. The projection stated on the map is the "Gauss Conform Central Meridian 15deg E. Bessel's Spheroid". I've tried using South African CRS : HBK_NO_15 and CAPE_NO_15 on the assumption that perhaps the "NO_15" refers to the central meridian. However, when I rasterize the files, they are upside down.

Does anyone know why this would be?

Please see related question, here.


texts: Moving ArcGIS JSAPI Basemap Gallery Widget down 10px when opened

texts:
How can I move the Basemap gallery 10px down from its original position when it's opened. The basemap gallery sample, I am referring can be found here:
http://developers.arcgis.com/en/javascript/sandbox/sandbox.html?sample=widget_basemapdynamic

Also, how can I change the text "Switch Basemap" to an icon image?

Any thoughts?


texts:
I'm doing some testing of GeoNetwork and trying to harvest some OGC services to populate the catalogue with datasets and processing tools. Following the GeoNetwork documentation, this works well for WFS data with a separate metadata entry created for each data set (GeoServer) - I specify the "Create record for each layer only using GetCapabilities information" option to ensure separate entries.

However, when trying to harvest a WPS (located on my local machine) the harvester won't create individual entries for each of the process algorithms / operations - even if I select the "Create record for each layer " option. Instead it creates one record with multiple  tags for each of the algorithms.

Is it possible to harvest a WPS and generate registration for each process within GeoNetwork?

I'm wondering if this might be a limitation to using ISO 19139 to record separate processes. Perhaps I should only be using it to register the whole service enpoint?


texts: Can't do anything else in QGIS during While-Loop

texts:
I've written a Python QGIS plugin that reads data from an AIS receiver via the Serial package. It will be similar in function to the GPS Information panel in that it will show your position on the map canvas and work in the background allowing the user to continue using QGIS.

I've written a while loop such that on a button click; QGIS will constantly monitor the serial port for a message. Once a message is received in its entirety (using readline()) the loop begins again.

I have now run into an issue I didn't plan for in that while the loop is running I can't do anything else with QGIS until I terminate this loop. Obviously my intention is that this plugin will work in the background (like GPS information panel) and that the user can do their normal GIS tasks.

Can anyone point me in the right direction. I'm not sure if there is a specific terminology for what I'm trying to achieve.

    def connectAIS(self):
    with serial.Serial(port=self.dockwidget.cb_comPort.currentText(), baudrate=self.dockwidget.cb_baudRate.currentText(),
                       parity='N', stopbits=1, bytesize=8, timeout=None) as ser:
        while ser.isOpen():
                self.dockwidget.l_status.setText("scanning")
                dataOut = open('//positionLogger.txt', 'a')
                aismsg = ser.readline()
                dataOut.write(str('\n' + str(aismsg)))
                dataOut.close()
                self.dockwidget.l_rawData.setText(str(aismsg))


texts: Detect Table of Contents Changes in ArcMap using ArcObjects?

texts:
What is the preferred and/or most efficient method for detecting a change in the table of contents in ArcMap using ArcObjects? My current implementation relies on a dictionary with the names and indices of the layers.

public static Dictionary<string, int> layerEnumerator()
{
    IEnumLayer enumLayer = ArcMap.Document.FocusMap.get_Layers(null, false);
    enumLayer.Reset();
    ILayer layer = enumLayer.Next();
    Dictionary<string, int> layerDictionary = new Dictionary<string, int>();
    int lyrNdx = 0;
    while (!(layer == null))
    {
        if (!(layerDictionary.ContainsKey(layer.Name)))
        {
          layerDictionary.Add(layer.Name, lyrNdx);
        }
        lyrNdx++;
        layer = enumLayer.Next();
    }

        return layerDictionary;
    }

Generally I will call this when I need to find the position of a specific layer in the ToC. Is there a more efficient means of gathering what's in the ToC at any given time (such as an event for ToC Contents Changed)? The solution I've provided above seems inadequate and inefficient at best.


texts:
I am trying to add some dynamic content to my infoWindow. The following code writes the string 'bar' to the  element. However this works for the infoWindow of some points, but not for others (content is in variable, but not shown in the popup) in Firefox. Does not seem to work in Chrome at all.
Any suggestions on how to do this?
Edit: Surprisingly it works if an alert() popup is opened before the infoWindow.


texts:
I am connected to Oracle, using QGIS and can see the vector data table.

I am trying to use the GDAL Raster plugin to view raster data, in QGIS.
When I click on the Oracle GeoRaster plugin, get a cannot connect error.

The plugin is installed as shown in the image.

I have pointed the GDal Raster settings to both paths below. In case that was the issue

C:\Program Files\QGIS 2.16.0\bin\gdalplugins
C:\Program Files\QGIS 2.16.0\apps\qgis\qtplugins


texts:
I have 2 Shapefiles in CRS 21781. The first one "Gebiete" shows some areas within a ski resort in switzerland. It is downloaded from a WebGIS based on OpenLayers 4 in which it was generated. The second one "Lifte" shows lifts within that same ski resort. This one is exported from ArcMap as a shp, where it was generated.

When I open a new empty project within ArcMap and first add the layer "Lifte" and then the layer "Gebeiete", the layer "Gebiete" is not visualized correctly. Check out the picture and the coordinates in the bottom left corner.

When I zoom to the layer "Lifte" I get the correct coordinates.

The really interesting thing is that according to the properties, they both are in the crs 21781 but have a slightly different name....

When I first add the layer "Gebiete" I get the correct position and then add the layer "Lifte", "Lifte" is not on the correct position. There must be a problem with the crs, although I kind of thought that if you have the same EPSG codes you are in the same crs...

Honestly I have no clue what's going on here...the prj files are also different, as the ArcMap generated shp doesn't include any EPSG codes, not like the OpenLayers generated shp.

When I open them in QGIS 2.18.15 there is no problem at all.

Does anyone know where this problem comes from?


texts: I have a GeoTIFF Float32 raster DEM with some pixels with value -9999. How can I assign "No data" to those pixels using GRASS 7.4?


texts:
I'm using OpenLayers 3 (both v3.4 and v3.5) to display a tiled image from a NASA WMTS server and have a question about using the layer wrapX parameter on a global map.  When I set wrapX=true in the layer specification, I can pan left and right, but the layer image doesn't line up - there's an empty gap between -180 and +180.

Am I missing some simple parameter to tell OL3 to glue the bounds together?

Here's how the map is built:

var extent = [-180, -90, 180, 90];
var map = new ol.Map({
    view: new ol.View({
        maxResolution: 0.5625,
        projection: ol.proj.get("EPSG:4326"),
        extent: extent,
        center: center_coord,
        zoom: 1,
        maxZoom: 8
    }),
    renderer: ["canvas", "dom"]
});

And here's the code to build the layer:

var bmng = new ol.source.WMTS({
    wrapX: true,
    url: "http://map1{a-c}.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi",
    layer: "BlueMarble_NextGeneration",
    matrixSet: "EPSG4326_500m",
    format: "image/jpeg",
    tileGrid: new ol.tilegrid.WMTS({
        origin: [-180, 90],
        resolutions: [
            0.5625,
            0.28125,
            0.140625,
            0.0703125,
            0.03515625,
            0.017578125,
            0.0087890625,
            0.00439453125,
            0.002197265625
        ],
        matrixIds: [0, 1, 2, 3, 4, 5, 6, 7, 8],
        tileSize: 512
    })
});
layer_bmng = new ol.layer.Tile({
    source: bmng,
});
map.addLayer(layer_bmng);
map.addLayer(bmng);

Now, it occurs to me that this might be related to another issue.  I note that the default map doesn't actually show the full [-180, 180] longitude extent - on load, the map shows only roughly [-160, 160] although I can pan left/right and see the rest of the map. The HTML and CSS are pretty simple, but I suppose it might be a CSS issue.  The map is in an empty :

and the CSS for the map looks like this:

#map {
    background-color: #000000;
    border: 1px solid gray;
    width: 100%;
    height: 100%;
}


texts: Using searchCursor to add to a File Geodatabase Table

texts:
I'm trying to add some raster data to a File Geodatabase Table and export it to an excel file. The problem is that it wont print it to the file automatically, I have to create the file first by running the first part of the script, then add the area data from the dict by running the cursor in the last part of the script. What am I doing wrong?

Im summarizing the number of raster cells, so that I can count the area. The first part of the code reads the count of the raster, which are 1m by 1m so I can get an area. Then the script do this for all the rasters in the catalog and makes it to a dictionar. I then create a table and try to write it to a table, but this last part somehow fails. I verify that the insertCursor reads the dict, but it doesn't seem to be able to fill the newly genereated table.

arcpy.env.workspace = r"C:\Users\...\Output\Area.gdb"

rastList = arcpy.ListRasters() #list raster in catalog

dictArea = {}

for raster in rastList:
    cursor = arcpy.SearchCursor(raster)
    for row in cursor:
        area = row.getValue("Count")
        dictArea[raster[4:]] = area

del cursor

#check if table exists, if it does, delete and make a new one
if arcpy.Exists("niPunkt"):
    print ("niPunkt.dbf exists, creates a new. ")
    arcpy.Delete_management("niPunkt")
    arcpy.CreateTable_management(env, "niPunkt")
    arcpy.management.AddFields('niPunkt', [['flate', 'DOUBLE', 'Flate Nr', 255], ['size', 'DOUBLE', '', '']])

#if it doesnt exist, create a new table
else:
    arcpy.CreateTable_management(env, "niPunkt")
    arcpy.management.AddFields('niPunkt', [['flate', 'DOUBLE', 'Flate Nr', 255], ['size', 'DOUBLE', '', '']])

#create cursor that inserts to the new table with the fields "flate" and "size"
cursor = arcpy.da.InsertCursor('niPunkt', ['flate','size'])
#for all values in the dict, insert the key and the value
for key, value in dictArea.items():
    cursor.insertRow((key,value))

#create excel file

arcpy.TableToExcel_conversion('niPunkt', '9PunktArea.xls')


texts: What resources are there to create a WPS from a web app?

texts:
I am developing a web app using the Weight of Evidence method and I need to create a web processing service out of it or enable it for web processing services.

The code is in C# and includes an engine file, some GUI related files, and a plethora of different files. Are there any in particular I should look for? Or I guess are there any particular frameworks or wrapper classes for this transaction? Are they intuitive or is there any workaround?

Essentially this will take some inputs as necessary from a user and apply it to a programmatic weight of evidence formula and return a result.

Based on what I can see from the code there are raster analysis frames and a variety of different files I'm not entirely familiar with. It wouldn't serve any purpose to post any code as it is a large file that I don't have experience with. I can say it uses the following libraries as well as other system libraries:

using System.Runtime.InteropServices;
using ESRI.ArcGIS.DataSourcesRaster;
using ESRI.ArcGIS.DataSourcesFile;
using ESRI.ArcGIS.Geodatabase;
using ESRI.ArcGIS.GeoAnalyst;
using ESRI.ArcGIS.Geometry;
using ESRI.ArcGIS.Geoprocessor;
using ESRI.ArcGIS.Geoprocessing;
using ESRI.ArcGIS.AnalysisTools;
using ESRI.ArcGIS.SpatialAnalyst;
using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.Display;
using ESRI.ArcGIS.esriSystem;
using ESRI.ArcGIS.Framework;
using ESRI.ArcGIS.DataSourcesGDB;
using ESRI.ArcGIS.GeoDatabaseUI;
using ESRI.ArcGIS.ArcMapUI;

However, according to the project details I need to find a workaround to not using any ESRI packages.


texts: QGIS Adding the CSV points including Lat & on to the British National Grid Project CRS

texts:
I have a problem with adding the CSV data to my QGS project with CRS set on the British National Grid EPSG:27700.

In turn, my points are at the beginning of the coordinate system like you see below:

I tried to change the CRS for this CSV input to EPSG 3857 Pseudo-Mercator or WGS84. It didn't work at all.
According the thread below:
Adding points defined by Latitude and Longitude to map using QGIS?
it looks like the QGIS doesn't recognize these point coordinates under this system.
Adding points defined by Latitude and Longitude to map using QGIS?
Moreover, it's not able to transform the On the fly to the EPSG:27700.
How can I add them properly? What am I doing wrong here?


texts: Script error: Git protocol error - Google Earth Engine

texts:
I am doing supervised image classification in Google Earth Engine. For that, I am labeling points on the map to create a dataset. I have labelled around 2.9k points. Now when I am labeling more points and saving the script, I am getting an error that says "Script error: Git protocol error". Hence I am unable to save my work and always starting from the same point. This error is wasting all of my efforts again and again. How can I fix this issue.
Attached is the screenshot of the error for your reference.


texts: CartoDB layer selector - selecting data from 2 layers

texts:
I used the CartoDB layer selector example (http://cartodb.github.io/cartodb.js/examples/layer_selector.html) with my data. Works fine. Now, what I really want to do is to select data from 2 layers at the same time - not from only one as it is the case now.

The second layer I want to select from is subLayer(3) and the sql would be the same as the first one: "select * from all_lachine2014_post where eventdist =  " + event;

(the subLayer(3) table name is all_lachine2014_post)

I have tried a few things - but can't figure out how to create a second selector and have the sql combined to select from my two tables at the same time.

<!DOCTYPE html>

<title>Layer selector example | CartoDB.js</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<link rel="shortcut icon" href="http://cartodb.com/assets/favicon.ico" />

<link rel="stylesheet"  href="http://libs.cartocdn.com/cartodb.js/v3/3.11/themes/css/cartodb.css" />

Parcours 21.1 km

Parcours 10 km

Parcours 5 km

Parcours 1 et 2 km


texts: Geoserver authkey configuration question

texts:
I'm running geoserver 2.8.0 in tomcat7 on Ubuntu 14.04.

Could anybody help me with the security configuration?
I want to serve WMS and WFS from a specific workspace using authorization based on a authkey in the URL - GET request.

I have tried to follow these instructions: http://docs.geoserver.org/stable/en/user/community/authkey/index.html

So far I tried:

create new Group Service: sh_group  (jdbc), add new User: sh1
(role: READ)
create Data Security rule for new workspace, access mode read for role: READ
add new Authentication Filter: sh_authfilter (authkey), using group service sh_group
add sh_authfilter to default Filter Chain as first selected filter (above basic and anonymous)
create new Authentication Provider: sh_authprovider and add this to selected Provider Chain (top)

The synchonisation of authkeys is working and I see a UUID for the user sh1.
I can login to the web admin interface as user sh1, however I cannot access a WMS or WFS using the authkey variable in the GET request. Can you tell me above all procedure?


texts: Using attribute as output name in QGIS Modeler

texts: I'd like to use the following model and the results should have the names of the attributes. Unfortunately the output is not as expected.


texts: shapely.vectorized is not installed when building from sources

texts:
My application (named it foo) relies on shapely modules. This dependency is listed in the setup.py of foo.
Part of the foo code uses the shapely.vectorized submodule, that is generated using cython.
As foo needs a specific version of geos (that is also a dependency of shapely), we have to build shapely from sources. PIP_NO_BINARY environment variable is set for that purpose.
When installing our application on the final platform, a pip install foo correctly installed shapely but the shapely.vectorized is not generated as cython is not listed as a dependecy of shapely (and so it is not installed).
Steps to reproduce:
$ pip freeze # Check cython is not installed
...
$ PIP_NO_BINARY=Shapely pip install Shapely
$ python -c 'import shapely.vectorized'

For various reasons, it would be great to not pre-install Cython. I also tried to do :
PIP_NO_BINARY=Shapely pip install Shapely[vectorized]

But it didn't help. Have you some ideas to easily install shapely in that context?


texts: HTTP request -to- AWS Lambda Python function -to- AGOL

texts:
I want to make an HTTP GET request to AGOL, but I want to route the request through a Python function.
Since I can't host the Python function on AGOL (more info here), I'd like to use AWS-Lambda instead.
HTTP GET request ➔ AWS Lambda Python function ➔ AGOL
What would it take to configure AWS Lambda so that it can serve as a middle tier between the HTTP GET request and AGOL?


texts: How to delete from mutipolygons all but the biggest polygon in QGIS

texts:
I have a bit too complex multipolygon set to be used in a web application (thematic map) so I'd like to simplify the structure by removing small islands of areas. I am not an expert on QGIS but so far I have managed to split the multipolygons into simple polygons and calculate the areas of each. I just can't remove all the islands less than some size, as some areas have bigger secondary islands than main polygon of other areas.

So I thought that the best solution would be to remove all but biggest polygons of each area. Only I haven't been able figure out or search the solution from Google how to do it on QGIS. Is there a way to do it?.

A secondary thought: There are a few areas with holes (meaning another area inside the bigger one), does my intended protocol break these holes as well?

wbr
hank


texts: QGIS how to fill the fields instantly and automatically when creating an entity

texts:
I have a polygon layer, I want to fill the fields automatically each creation of a polygon.

Knowing that there is a spatial relationship (intersection, contain ...) between my polygons and other layers of point, the idea is to fill the fields instantaneously by the information from the point layers contained in the polygons.

Could someone help me on this subject ?

Setting up an action in layer properties seems possible, but how ?

To read to you,


texts: Creating planes, eg roof surfaces, from LiDAR/DSM data

texts:
I am capturing the area of roof tops of buildings from a DSM (derived from LiDAR data) which has not been much of a problem. I can then also derive angle, hillshade and aspect but it is only per-pixel.

What I need to do is create the actual roof planes (either as raster or polygons) and I just don't know how to do it.

I've read a lot about cluster analysis, using nearest neighbour etc. I've also read creating a TIN from the raw points, would this work? and if so, would this need to be created instead/before a raster of the DSM?

Creating planar surfaces of roofs, just not sure.


texts: Automatically appending the CRS name in composer?

texts:
I'm trying to find a way to automatically append information to a text box in the QGIS print composer.

I've figured out how to call my user name, project name, date and other information, but I'm having difficulty finding a way to append the project CRS name and EPSG code (not just EPSG code). Using layer_property function, I can manually set it to evaluate a layer present in my workspace, but I'd like it to automatically grab the projection that map0, 1, 2, 3, etc. is using.

Is there a universal method of automatically evaluating and outputting project CRS in a map composer text box?


texts: Multiple queries in pgrouting (length as result)

texts:
I am facing the following problem with two tables:

The first table contains all my streetnetwork with cost, source, target. Another table contains 60 nodes (from the above network). Between all these 60 nodes I want to calculate the length of the path (e.g.: from node 1 to 2,3,4...60, from node 2 to 1,3,4,5...60 etc.)

Do you have a solution which could automatically calculate the length of all paths? Until now I can just calculate manually one path, then save the table and calculate the length.

But as you can imagine I don't wanna calculate 60*60 relations manually.

See my SQL-query so far:

SELECT seq, id1 AS node, id2 AS edge, a.cost, geom_way
FROM pgr_dijkstra(
'SELECT id, source, target, km as cost, km as reverse_cost FROM
routing where cost is not null',
(SELECT nodes FROM nodelist WHERE id =1),
(SELECT nodes FROM nodelist WHERE id =2),
false,
true
) AS a
Join routing b
ON a.id2 = b.id
ORDER BY seq;


texts: QGIS Random point inside polygon **but** - with minimum distance between points from different polygons

texts:
I am trying to generate random points in stratified area with 2 polygons.

I want to generate 6 random points - 3 in each but to set minimum distance not only between points from same polygon but also for points from different polygons, to exclude Possible overlap of survey areas.(im going to use this points as survey cluster centers).

I tried Vector/research tools/random points inside polygons - but it allows only to set distance inside polygons not between different ones.

Is there any option for this in QGIS?


texts: Getting zoom-in previous/next in OpenLayers 3?

texts:
How to get Zoom-in, Zoom-out for previous or next in OpenLayers 3. There are controls for Zoom in or Zoom out for levels and area wise. They are as follows:

    Area zoom:
    var dragzoomin = new ol.interaction.DragZoom({
                condition: ol.events.condition.always
                });
    map.addInteraction(dragzoomin);

Zoom in for levels

    var view = map.getView();
            view.setZoom(view.getZoom() + 1);

We can get zoom out if it is  level wise.
But if it is area wise how to get zoom out and how to store these zoom in and zoom out events for entire session.


texts: How to output rasters other than 16-bit with the Arc Polyline to Raster tool?

texts:
Using ArcGIS Desktop 10.4.1, I am attempting to convert a FGDB line feature class to a raster using the Polyline to Raster tool.  The input feature's value field contains integer values that range from -55,590 to -2,390, which would necessitate an 32-bit signed integer output raster.  However, Arc will only (!) output a 16-bit signed integer, which means that values outside of the range -32,768 to 32,767 are lost.  Grrr.

The Arc tool help states: "The input field type determines the type of output raster. If the field is integer, the output raster will be integer; if it is floating point, the output will be floating point."  Not true!  I have also tried a floating point field, and the output is always a 16-bit signed integer raster.

I've tried both FGDB raster and .tif as output raster formats, with the same 16-bit signed integer output - even though both formats are capable of 32-bit.

I've also tried the "Feature to Raster" tool, with the same results.

Neither of the tools has the option to set the output raster bits depth, nor does the Environments setting.

I am at a loss!


texts:
I recently accidentally saved a QGIS Project to the wrong Geopackage. In contrast to layers the Browser Panel in QGIS (Version 3.10) currently has no option in the context menu to remove the project again:

Does anybody have a python code or another workaround to remove the Project from the Geopackage in QGIS 3.10?


texts: ArcMap losing selection of asset features?

texts:
I am currently working through asset updating and wondering why this is happening.

Scenario: I've selected more than 50 of the same feature class poly-lines. Now I edit to add photo numbers from an adjacent photo table window to the poly line feature class. I get through anywhere from 1-5 of these photo numbers entered before ArcMap deselects my features.

Then I have to re-select all of my polylines and scroll to where I left off. ArcMap 10.5.1 has not been this time consuming until now.

Is this software or hardware related?


texts: Geoserver WPS filter RasterAsPointCollection to a single or multiple coordinate(s)

texts:
I am building a weather API that will respond with a JSON-formatted forecast when given a coordinate.

My input is a NetCDF store from which I generated a raster layer. I intended to use the WMS GetFeatureInfo endpoint and draw an extremely small bbox around the given coordinate. It looks like this approach would work fine if my user only cares about the weather forecast at a specific coordinate, but if my user wants to know the forecast at 10,000 coordinates he would have to make 10,000 requests.

I was wondering if it's possible to use a WPS service to retrieve the data for multiple coordinates simultaneously. It seems like perhaps the gs:Query method with a gs:RasterAsPointCollection subprocess might work, but how would I specify the filter?

A related question is - what if the 10,000 points that I want are in a vector layer? Can I use WPS to interrogate my NetCDF raster layer at the points specified in my vector layer?

An example of either solution would be amazing, but just links to relevant documentation would be much appreciated as well.


texts: Why choose open source software for remote sensing research?

texts:
If you judge by the amount of the questions regarding FOSS software that are being asked in GIS SE many users seems to prefer FOSS over proprietary software.

I've read some articles - more precisely some personal blogs - supporting this choice. Furthermore corporate giants like Esri seem to acknowledge the open source development movement.

So, I am asking your position in this matter.

Why do you use open source tools?

What are the advantages or disadvantages of your choice, if any?


texts: Performance of ArcGIS Engine using multiple file geodatabases as opposed to one?

texts:
I'm trying to decide the best way to organize my data for an ArcGIS Engine application. I am particularly interested in map display and query speed. Currently I have all of my data separated into separate file geodatabases based on theme. So I have Transportation.gdb, Utilities.gdb, etc. The data doesn't necessarily need to be organized based on themes, and I'm considering putting it all in one file geodatabase.

I will be doing my own testing, but I wanted to throw the question out to the community.

In general, is using a single file geodatabase faster than using multiple (roughly 7) smaller ones? I'm interested in any other pros/cons as well.

NOTE: the software and all data will be on the customer's local machine. No data served on the web or over a network, and the amount of data is fairly small (roughly 100,000 features).


texts: PyQGIS Error: Cannot Create a QPixmap or Qwidget when no GUI is being used

texts:
I am trying to create a standalone script using the code below. I was able to add a shapefile with no errors but when I add map = QgsMapCanvas() after qgs.initQgis() and map.setLayerSet([QgsMapCanvasLayer(layer)]) after QgsMapLayerRegistry.instance().addMapLayer(layer) I get the following errors: Cannot Create a QPixmap when no GUI is being used and Cannot Create a Qwidget when no GUI is being used

from PyQt4.QtCore import *
from PyQt4.QtGui import *
from qgis.core import *
from qgis.gui import *
from qgis.utils import iface

import sys, os

qgs = QgsApplication(sys.argv, False)
qgis_prefix = "C:\\OSGeo4W\\apps\\qgis"
QgsApplication.setPrefixPath(qgis_prefix, True)
qgs.initQgis()

map = QgsMapCanvas()

layer = QgsVectorLayer("F:/IrrigatedLands/FC_qgis/boundary.shp", "testlayer_shp", "ogr")

if not layer.isValid():
    print "Layer failed to load!"

else:
    print "Layer was loaded successfully!"

QgsMapLayerRegistry.instance().addMapLayer(layer)

map.setLayerSet([QgsMapCanvasLayer(layer)])

print layer


texts: Multipolygon shapefile - Border problem in ArcMap

texts:
I am analyzing a shapefile which shows a state of my country. The state shapefile also contains lots of different districs.

Now I want to have an border only for the state. But when I activate the border, ArcMap creates borders around the different districts, not around the whole state.
But I want border around extent of the state, not district. How can I do it?


texts:
I am looking to do a network based KDE to show hotspots of electrocutions along a power line network.

Does anyone know of a tool/method that I can use in QGIS to do this?

(I am also using OSX operating system)


texts: Can primary keys and foreign keys be used in versioned geodatabases?

texts:
I've been brushing up on relational database design theory, and I keep coming across primary keys (PKs) and foreign keys (FKs).

PKs and FKs are said to be pillars of relational database design and are used to enforce referential integrity at the database level. Yet, as far as I can tell, they're not used in enterprise geodatabase design (they don't seem to be mentioned in any of the documentation, training, or toolsets).

Instead, relationship classes are used. Relationship classes seem to work well enough for enforcing referential integrity in ArcGIS Desktop (they can be used in every kind of geodatabase, not just enterprise geodatabases).

But in my case, I want to enforce integrity at the database level. I don't only use ArcGIS Desktop to edit data; I have other applications that are used to edit my versioned Oracle geodatabase using SQL/versioned views. Instead of having referential integrity at the ArcGIS application level (relationship classes), it would be benefical to enforce referential integrity at the database level, for use in other SQL-based applications.

Can I use PKs and FKs in my versioned Oracle geodatabase?
Or would PKs and FKs cause problems with versioning?


texts: Creating line based on angle using MapInfo?

texts:
I have a point based object table (Temp) in which a column contains angles. Based on those angles, I want to create line (5mtr) in angle direction. My current table projection is WGS 84.

Is it possible in MapInfo?


texts: When Google Earth launches, only black screen is appearing

texts:
I'm installing google earth on ubuntu 12.0.4 in a following way:

Downloaded 64 bit.
sudo dpkg -i google-earth-stable_current_amd64.deb
google-earth

But when Google Earth launches, only black screen is appearing. There is no globe of local earth.

Same happened with me on another machine, but when i re-installed it, it works fine.
Could it be a graphic card issue?

Kindly help, anyone. My project is on hold!! :(


texts: QGIS - Change Coordinates from decimal degree to UTM/Gauß-Krüger

texts: Is there a way to change the coordinates of a shapefile (points) from lat/long to UTM or Gauß-Krüger within the same CRS (i.e. WGS84:4326)?


texts: How to remove layer from layers panel, but keep in memory

texts:
Is it possible to remove a layer from the layers panel and the map canvas without removing it from memory. e.g if i have a vector layer named vlayer, and add it to the map with QgsMapLayerRegistry.instance().addMapLayer(vlayer), and then later remove it from the map, but still want to operate on vlayer.
I have tryed QgsMapLayerRegistry.instance().removeMapLayer(vlayer.id()), but then it seems that the layer is removed from vlayer as well


texts: How to overlay a county boundary on a raster file?

texts:
I want to overlay California county boundary top of raster layer.

Here is is my code:

data(coastsCoarse)
data(countriesLow)
library(gtools)
library(maps)
library(maptools)
library(sp)

# Raster file
RAD2012 <- raster(paste(getwd(), "/2012bil/2012ASC5min_ppt_spas1306_0001_20121222_0005_UTC.asc.bil", sep = ""))

list.ras <- mixedsort(list.files(paste(getwd(), "/2012bil/", sep = ""), full.names = T, pattern = ".asc.bil"))

# stack raster file
RAD2012.all <- stack(list.ras)

# png file tile(time stamp)
list.files <- mixedsort(list.files(paste(getwd(), "/2012bil/", sep = ""), full.names = F, pattern = ".asc.bil"))

outlist <- substr(list.files, 31, 43)

# plotting part
# I am using countriesLow
# I want to improve base layer from countriesLow to county boundary

for(i in seq(from=0, to=length(list.ras)-1, by=1)){
      png(paste(outlist[[i+1]],".png",sep=""))
    par(mfrow=c(1,1),oma=c(2,2,2,2))
    for(j in 1:1){
          plot(RAD2012.all[[i+j]])
              plot(countriesLow, add = T)
              #plot(countriesHigh, add = T)
              title(outlist[[i+j]])
    }
      dev.off()
}


texts: Creating Isochrone-like polygons from a polyline network in QGIS

texts: I wanted to create drivetime isochrones with the GRASS v.net.iso tool and I created a network with 4 categories (each category stands for 1000m in distance). How can I create polygons from this network which looks like in the picture? I stumbled over a concave hull plugin but this just seems to work with points. A convex hull is not detailed enough.


texts: The layer was not drawn completely - ArcGIS Online

texts:
I am publishing a hosted feature service layer onto ArcGIS Online organization from ArcMap. The service has just one layer that is stored on a file gdb on my PC. I am able to publish a service with no problem; I am also changing the Max Record Count property (in the Service Editor wizard) to support drawing larger number of features in an ArcGIS Online map viewer.

The feature layer has about 70,000 features. All of them are uploaded fine into a hosted feature layer. I am able to query the feature service from the Services Directory and getting all of them back.

However, when trying to view the very same feature layer in a map viewer, I am getting the notoriously famous error message:

Layer did not draw completely

LayerName did not draw completely because there are too many features to display in this area of the map. Try zooming in or setting the visibility range for the layer.

The solution for this would be to adapt the max number of records that can be returned as described in the Esri KB. However, I already have 80,000 for this limit set.

It's a bit difficult to judge (my features are tiny polygons and I am in a small scale), but it seems as there are more than 1,000 features drawn in a map viewer, so the problem is not related to the default max records parameter. A rough estimate would be that I get a 4th part of them drawn, something about 15-20K.

Is there any hard limit on the number of features from a hosted feature layer that can be drawn in a map viewer?


texts: Updating a column with line direction in MapInfo

texts:
I was wondering if there is a way to update a column in MapInfo with the digitised line direction. I have two TAB files, one is complete lines and the other is sections of the same lines (both have a unique ID). I was wondering if it would be possible to add a column in both files with the direction of the line so I can check if the directions are identical, e.g:

Thanks,
Alan


texts: Network analysis library - example from PYQGIS developer cookbook does not work

texts:
I am using QGIS 2.6.  I'd like to be able to calculate the driving distance between any two geocoded locations (can't use the shortest path roads plugin because it appears to be interactive and I need to be able to read the geocoded coordinates from a list).

I found what I thought was it on the pyqis developer cookbook page:

https://docs.qgis.org/2.6/en/docs/pyqgis_developer_cookbook/network_analysis.html

When I simply copy the example over and try to run it I typically get the following error:

>>>>pStart = QgsPoint(-0.743804, 0.22954)
>>>>tiedPoint = director.makeGraph(builder, [pStart])
>>>>pStart = tiedPoint[0]
Traceback (most recent call last):
  File "<input>", line 1, in <module>
IndexError: list index out of range

and the length of tiedPoints appears to be zero.

How can that be?


texts:
Looking to create the ESRI George Washington style set in QGIS. It is only avaliable as a .stlyx but the png's are available. Is there a way to set the length of the raster image to the segment length of a line or polygon edge?
Additional Information:
this shows what it should look like in Arc and also a link to the png images.
https://www.arcgis.com/home/item.html?id=191ef05f8bd844c68eee365ada32561b
Downloaded a ArcGIS Pro trial to see what I should get in Arc.

QGIS 3.16 view with points can be played about with and polygon fill can as well. Lines seem to be the biggest issue.

QGIS settings as follows, with a rotation of 90 degrees for the line so it runs along the line.


texts: File Geodatabase: storing text in an integer field?

texts:
I recently downloaded a FGDB from NOAA at https://marinecadastre.gov/ais/

The FGDB contains a point feature class with ship locations.  One of its attribute fields, named [Status], is of type Long Integer.  However, every value in that field contains text.  Here's a screenshot showing the field's contents and its properties:

This made me curious about storing text in a numeric field, so I added a new text field [text123] to the feature class table.  I tried to copy the text values from [Status] to [text123] using str([Status]) in the Field Calculator.  Although it worked, the resulting values in the text field were all numbers(!), as if they were code values (that is, wherever [Status] = "At anchor", [text123] = 10.  Wherever [Status] = "Under way using engine", [text123] = 20, and so forth.  I also tried cstr() with the same result.

This led me to conduct an experiment.  I created a new FGDB table that contained a Long Integer field.  I tried to populate that field with text values, first in edit mode then outside of edit using the Field Calculator.  In both cases, ArcMap responded with errors (as expected) that prevented me from populating the field with text.

The download site does not provide tech support, so I don't know how they managed to put text data in a numeric field.  From my above experiment, I am unable to reproduce this.

My question(s): Is there a reason to store text values in an integer field, and if so, how can text be placed there?


texts: QGIS print layout: creating a shadow arroud a frame for legend at only specific sides

texts:
Currently I am trying to build a drop shadow for two specific sides of legend, the thing is I do not seem to find the option for this anywhere in the item menu of the legend. Not to mention it has to essentially look like this, a shadow to the right and bottom side 1.5mm thick.

Also of note the Legend height and width updates automatically based on what is in the map view of the layer, so it constantly changes in width and height. Drawing another border on the legend then is not an option because I would have to adjust this border each and every time and for basicly a template that is going to be used for potentially 63 times, that is a bit of double work.


texts: View images for different dates/location in Google Earth Pro

texts:
I have been working with Google Earth Engine Code Editor/Google Maps API to view and analyze information surrounding specific points.
I am interested in analyzing these images from different dates. Back in October, I asked in StackOverflow if this could be done with Google Maps API, but it seems that there isn't much progress on this feature.
https://issuetracker.google.com/issues/35824769
I know with Google Earth Pro it is possible to look historical imagery. However, manually doing this for many points is time consuming. Is it possible to do this in Earth Engine Code Editor or the Earth Engine Python API?


texts: How do services like Google Maps compute the set of instructions for a route?

texts:
The problem of computing the driving directions from A to B can be divided into two equally important parts:

Finding the best path from A to B.
Identifying all the relevant maneuvers along that route.

While there is loads of information and research papers on the first topic, no one seems to be talking about the second one. And from my experience, computing instructions is a non-trivial problem for at least the following reasons:

Maps are very complex, diverse and sometimes full of geometry inconsistencies.
It is very hard to define what a "relevant maneuver" is. Some users might want to hear a "Go straight" instruction at each crossing, just for reassurance. Others would find this totally annoying.
It is hard to compare two sets of instructions and decide which one is better (because of the previous point). This makes automatic regression testing impossible.

So, are there any resources on this topic? Some literature, best practices, or actually any kind of advice would be very welcome.


texts: Add layer using popup in ArcGIS Javascript API

texts: I would like to be able to add a new feature layer within a popup window from an arcgis server.  For example (purely hypothetical), you click on a state and it has 2 options: fire departments and police stations.  You can then click on one of those options to add it to the map


texts: Not able to activate API Key for Planet Labs with Python

texts:
Here's the tutorial:
https://www.planet.com/docs/api-quickstart-examples/cli/

Install the Planet CLI with:

pip install planet

If you have not already, get your API key at planet.com/account, and add it to your environment:

export PL_API_KEY=a3a64774d30c4749826b6be445489d3b # (not a real key)

This 'export' does not work (is not showing to be a variable).
I manually entered my PlanetLabs API Key in my os environment (https://planetlabs.github.io/planet-client-python/api/examples.html#importing-the-api), but no happy end.


texts: Convert a spatial polygon object to data frame using R

texts:
My goal is to modify an existing shapefile by merging certain polygons.

After importing the shapefile and using the UnionSpatialPolygons command, I get the polygon outline that I want.

However, this is now a SpatialPolygons object and not a SpatialPolygonsDataFrame, so I'm unable to export it to a shapefile using writeOGR.

How can I get around this problem?


texts: Extract polygon information from KML file to a data frame of postal codes, latitude, longitude

texts:
I have KML file from downloaded https://data.gov.sg/dataset/electoral-boundary_2020. As you can see on the website, there are 31 sub-polygons and each of them has a label. I have loaded the KML on R.
I have a separate .csv data file with postal codes, latitude and longitude. I would like to extract the name of the polygons from the KML file to map to the .csv to give 4 columns:
postal_code latitude longitude Name

Where Name is the name the polygon if the postal_code fall within the polygon. How do I do this using R?
Here is a sample data
library(rgdal)
library(spatialEco)
library(dplyr)

postal_code=c(117606, 640215, 600220, 628389, 118560, 267314, 129580, 268458)
latitude=c(1.283146, 1.348578, 1.340993, 1.303928, 1.277510, 1.321747, 1.315483, 1.322019)
longitude=c(103.7739, 103.7121, 103.7374, 103.6586, 103.7893, 103.7999, 103.7650, 103.7910)
df=cbind.data.frame(postal_code, latitude, longitude)

coordinates(df)<-~longitude+latitude

poly.sg=readOGR('Downloads/doc.kml', "ELD2020")
proj4string(poly.sg)
poly.sg=spTransform(poly.sg, CRS('+init=epsg:4326'))

I have tried to follow the steps in Join spatial point data to polygons in R
poly.sg2<-as(poly.sg, "SpatialPolygonsDataFrame")
pts.poly<-point.in.poly(df, poly.sg2)

I received this error
Error in st_geos_binop("intersects", x, y, sparse = sparse, prepared = prepared,  : st_crs(x) == st_crs(y) is not TRUE


texts: 1ft contour shapefile displaying in meters

texts:
I generated a shapefile that has 1ft contours. It works great when imported to QGIS except the elevation labels are displayed in meters instead of feet. I've found two places to select feet as the unit of measurement, but they are for distance and area, not elevation.

How do I get my 1 ft contour lines to display in feet instead of meters?

That is, I want: 18ft, 19ft, 20ft instead of 5.486m, 5.791m, 6.096m.


texts: Georeference to UTM projection using openlayers plugin in QGIS

texts: I have some aerial imagery that I need to georeference using QGIS into a UTM projection.  In order to do this I need a basemap layer for the reference points.  The openlayers plugin could work great for this but it's in the web Mercator projection.  I attempted to georeference to the Web Mercator projection and then use the warp tool to transform to NAD 83 UTM but it doesn't seem to transform correctly.  Should my process here work and I'm just missing a setting or step, or should I be going about this a different route all together?


texts: Hide-unhide feature grid in opengeo suite sdk myviewer

texts: is there any way to hide-unhide the feature grid in opengeo suite custom viewer. In geoexplorer this is a default function.


texts: Duplicate E00 layer to PostGIS using OGR (python)

texts:
I writing a Python script to read E00 layers and copy each of them to a it's own PostgreSQL/PostGIS table.

I am using the OGR library.

The problem is that it hangs using the method CopyLayer(). I can see the process Python.exe using 30% of the processor, but it just hangs and never complete. There is no error. The dataset is rather small.

Here is the code:

# Ouverture d'une connection à la base de donnée
database_host = "192.168.16.3"
database_name = "acadb"
database_user = "database_user"
database_pw = "mysupersecretpassword"
database_schemas = "cadastre_import"

db_conn = psycopg2.connect(dbname=database_name, host=database_host, user=database_user, password=database_pw)

ogr_conn_string = "PG: host=%s dbname=%s user=%s password=%s schemas=%s" %(database_host,database_name,database_user,database_pw,database_schemas)

ogr_conn = ogr.Open(ogr_conn_string)

# Création d'un "curseur"
cur = db_conn.cursor()

for file in os.listdir(extract_folder):
    e00_file = os.path.join(extract_folder, file, file + 'base', file + 'polylot.e00')

    input_ds = ogr.GetDriverByName("AVCE00")
    f = input_ds.Open(e00_file)

    lyr_poly = f.GetLayerByName('PAL')

    ogr_conn.CopyLayer(lyr_poly,'file_test', [])

I can't find the problem... Or maybe I am not doing it the right way?


texts:
Usually for post processing DGPS in any technique (RTK - Carrier phase, Pseudorange code) the RINEX files used contains data for many consecutive epochs. This leads to very large RINEX files.

Is it possible to apply those techniques for single epcoh? If not, does skipped series will work (thus if epoch is 1 seconds, so each 5th epoch will be recorded thus every 5 seconds)? For both cases, if it's possible, does the accuracy degraded?

The nature of the question is to understand whether the underlying differential GPS algorithm is has look ahead/behind buffer? [i-1, i, i+1].


texts: Calculating minimum width of polygon using ArcMap

texts: I have a polygon feature that is 228 miles in length and 95 feet in width. But, along the polygon there are sections that are 75 feet wide. I was tasked with locating those sections and flagging them. I tried to look thorough the different ArcMap toolbox options and could not find an appropriate tool that might get me the results I need. I suspect I need to use some creativity and a combination of tools to achieve that goal. Any suggestions?


texts: Carto, CartoCSS : style point by hex value stored in table

texts:
I have a table of points.

Each row has a string hex field that stores a color code in hex format: #000000.

I want to style my map so that each point displays with the color assigned to it.

But setting the CartoCSS marker-fill property to [hex] throws an error:

 #points {
   marker-fill: [hex];
 }

Is there any way that I can color my points based on a color field in my table?


texts:
I am trying to get a list of Election Districts inside particular City Council Districts in Brooklyn, NY. The data that is available is GIS data, visible here:

City Council Districts: https://data.cityofnewyork.us/City-Government/City-Council-Districts/yusd-j4xi
Election Districts: https://data.cityofnewyork.us/City-Government/Election-Districts/h2n3-98hq

What I need is to somehow link these datasets and generate a list (not a visualization in this case) of Election District (ED) numbers by City Council District (CCD) numbers. I'm totally new to GIS so can someone give me some direction about how this might be done?

The tough part it seems to me is to link the data by area so as to match the two sets of numbers.

Is this possible somehow?

Is there query language associated with GIS through which one could do this?


texts:
System Ubuntu 19.10, QGIS 3.4

I am trying to utilise R in QGIS for Ripley's K function.

The sample R script 'Scatterplot' works with the Processing R Provider plugin, which indicates r-base is installed OK.  However, I have installed the Spatstat package and the various categories do not appear in the QGIS Processing Toolbox.

I am guessing the R scripts folder needs setting?  If so, what would I need to direct the plugin to?


texts: How to read an XML .osm file with Python

texts:
I have an OSM XML file on local drive that I want to read with Python to do further tasks. I have tried something like this but it doesn't work.
import ogr
import shapely
from shapely.geometry import *

driver=ogr.GetDriverByName('OSM')
data = driver.Open('file.osm')
layer = data.GetLayer('points')

features=[x for x in layer]
print (len(features))


texts: Create an inscribed square inside a polygon

texts:
I have polygons of the administrative boundaries and want to create a square polygon inside of them, which will have the maximum area and will be fully covered by these boundaries. In other words: how to create an inscribed square inside a polygon.
The example is below


texts: Map Projection - Why don't we draw things out

texts:
I have been reading about different map projections and kind of understand where the problem lies. And also, most of the problem was that the old cartographers did not have any other tool other than their pencil and paper.

Is it possible to just draw out every kilometer, every curve on an actual scale on a very big piece of paper with a scale of say, 1 cm ~ 1 Km? I know we will need a very big paper, but then if we use a computer instead of a paper, then scaling down and up would be simpler right?


texts: How to prompt for layer selection from python console in QGIS?

texts:
During script development it's useful to use the QGIS python console to test the same script on different layers. Currently I've been hardcoding layer strings and just swapping out but it isn't particularly refined!

Ideally I want to prompt keyboard input or throw up a mini gui combo box.

Can anyone provide example code or signpost to some relevant documentation please. (or suggest an alternative approach)


texts: Repacking tiles to mbtiles using mbutil?

texts:
I've used mbutil successfully to unpack a .mbtiles file, but if I try to repack the same tiles, something goes wrong.  I'm using the util module in a python script like so:

from mbutil import util

mbtiles = r"c:\a\tiles.mbtiles"
mbtiles2 = r"c:\a\mod_tiles.mbtiles"
tiledir = r"c:\a\tiles_temp"

util.mbtiles_to_disk(mbtiles,tiles_temp)
## do stuff to tiles
util.disk_to_mbtiles(tiles_temp,mbtiles2)

The resulting .mbtiles file is only 6kb and when I unpack that file, only the metadata.json file is present.

I installed the mbutil package using easy_install.


texts: LineSymbolizer SLD for GeoServer using SVG images

texts:
I want to create a LineSymbolizer which consists of an SVG (or png) image that is repeated along line. I have used this code but it does not show the image - can someone please gives me some hints?

<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0"
  xmlns="http://www.opengis.net/sld"
  xmlns:ogc="http://www.opengis.net/ogc"
  xmlns:xlink="http://www.w3.org/1999/xlink"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd">
  <NamedLayer>
    <Name>tt</Name>
    <UserStyle>
      <Name>tt</Name>
      <Title>tt distribution</Title>
      <FeatureTypeStyle>
      <Rule>
       <LineSymbolizer>
         <Stroke>
           <CssParameter name="stroke">#0000FF</CssParameter>
           <CssParameter name="stroke-width">1</CssParameter>
           <CssParameter name="stroke-dasharray">10 10</CssParameter>
         </Stroke>
       </LineSymbolizer>
       <LineSymbolizer>
         <Stroke>
           <GraphicStroke>
              <Graphic>
                  <ExternalGraphic>
                    <OnlineResource xlink:type="simple" xlink:href="palm_fill.png" />
                    <Format>image/png</Format>
                  </ExternalGraphic>
                  <Opacity>
                    <ogc:Literal>1.0</ogc:Literal>
                  </Opacity>
                </Graphic>
           </GraphicStroke>
           <CssParameter name="stroke-dasharray">5 15</CssParameter>
           <CssParameter name="stroke-dashoffset">20</CssParameter>
         </Stroke>
       </LineSymbolizer>
     </Rule>
   </FeatureTypeStyle>
   </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>


texts: Mapserver MapFile label at polygons, how to say "not repeat"?

texts:
I am using Mapserver v5.6 and used MapFile with 2 layers. One layer to show polygon and other to show label at ST_PointOnSurface of the same polygon... There are another way to show unique-label at POSITION CC of the polygon?

I tested REPEATDISTANCE 9999  but no effect.

Even Mapserver v6 documentation have no instruction about "no-repeat" options.

The polygon-layer was tested (with no effect) with this mapfile fragment for label

      LABEL
        ALIGN center
        FONT "ubuntu"
        TYPE TRUETYPE
        SIZE 15
        POSITION CC
        COLOR 255 0 0
        REPEATDISTANCE 9999
        OUTLINECOLOR 50 200 60
      END #label


texts: Incorrect tiles from a shapefile are generated by mapnik

texts:
I used mapnik_node_tile_server to generate tiles from a shapefile created by gdal_contour.
The tile generation function is:

function fetchTile(layer, z, x, y, callback) {
  var map = new mapnik.Map(TILE_SIZE, TILE_SIZE); // TILE_SIZE = 256
  var layerPath = util.format('%s/layers/%s.xml', __dirname, layer);
  var tileFilePath = util.format('%s/tiles/%s/%d/%d/%d.png', __dirname, layer, z, x, y)
  var cachedTile = getCachedTile(tileFilePath);
  if (cachedTile) {
    callback(cachedTile);
  } else {
    var filePath = util.format('%s/tiles/%s/%d/%d/', __dirname, layer, z, x);
    mkdirp.sync(filePath);
    map.loadSync(layerPath);
    map.zoomToBox(mercator.bbox(x, y, z, false, '900913'));
    var im = new mapnik.Image(TILE_SIZE, TILE_SIZE);
    map.render(im, function(err, im) {
      if (err) console.log('error', err);
      file = im.saveSync(tileFilePath, 'png');
      callback(fs.readFileSync(tileFilePath));
    });
  }

}

Most of the contour lines are not rendered in the tiles and transparent areas are not created correctly.
Here is the shapefile drawn in QGIS and generated tiles in CesiumJS respectively.


texts: QGIS 3.12 Importing dwg encoding problem

texts: I am using QGIS 3.12. I am trying to import dwg file. The file contains text object in hebrew that looks fine in the Autocad but in the QGIS it  turns to meaninles marks like:  $#"'^   .Can I do anything to fix it?


texts: Deleting geodatabases that are more than one week old

texts:
I am using ArcGIS Desktop 10.0 and Python 2.6.6 and am trying to make an update script to copy the geodatabase to a backup folder with the date as part of the name, got that to work.

Then export features from my editing geodatabase to the one on our server, got that working.

But now I want to, at the end of my script, to go back to the backup folder and delete any geodatabases there that are older than 1 week to keep it clean.

Tried a number of ways but they didn't work, any suggestions?

import re
import os
import datetime
import time
import sys

from subprocess import call

now = time.time()
cutoff = now - (7 * 86400)

files = os.listdir("C:\GIS Info\Test\Backup")
for xfile in files:
        if os.path.isfile( "C:\GIS Info\Test\Backup" + xfile ):
                t = os.stat( "C:\GIS Info\Test\Backup" + xfile )
                c = t.st_ctime

                # delete file if older than a week
                if c < cutoff:
                        os.remove("C:\GIS Info\Test\Backup" + xfile)

This is the code I was trying to use that got me the furthest.


texts: How to calculate difference in time and distance between consecutive rows in QGIS


texts:
What are the basic that one should know about geometry datatype? How is it computed ? Why do we need geometry data type?

Edit:
I wanted to know why there is a different datatype called geometry. Is geometry some basic data type plus location information or more! How to understand the data in this column?

From MSDN:
    The planar spatial data type, geometry, is implemented as a common language runtime (CLR) data type in SQL Server. This type represents data in a Euclidean (flat) coordinate system.


texts: Importing .svg images to use as Symbols in ArcMap?

texts:
I have several .svg files that I want to use as symbols in ArcMap 10.1.

However, I do not see any import feature or the sort to use these .svg pictures.


texts: Rotate existing polygon SpatiaLite in QGIS

texts:
I'm not good at all with SQL, so maybe the question is trivial.

I have a polygon loaded in a SpatiaLite DB and I'm using DB Manager in QGIS.

What I'm trying to do is to rotate the polygon by a given number (in degrees) using the RotateCoords function.  The syntax should be:

CREATE TABLE rotated as
SELECT RotateCoords(Geometry, 45) AS Geometry from my_table

It seems to work, but I have to major issues:

How can I select all the fields from my_table in the same query? I'd like to maintain the same table, just rotate it. Another option could be to update the Geometry column of the existing table
The query of above creates a simple table, when I try to update the Geometry column and make the table as a spatial table it seems that nothing happens:

SELECT RecoverGeometryColumn(‘rotated’, ‘Geometry’, 3003 , ‘MULTIPOLYGON’, ‘XY’)

Am I missing something?


texts: QGIS3 Remote Debug referencing old breakpoints

texts:
I've had remotedebug and PyDev working well for a while but at some point it will loose track of the break points and reference those from a prior PyDev debug server startup. I can fix this by creating a new project in eclipse (4.11.0) and copying across the python files - but the new project must use a new project name. It will then work for while.

What I've tried that doesn't work: Deleting the eclipse project and starting a new project with the same name, restarting eclipse/remotedebug or the PyDev server.

Anyone know where PyDev keeps the break points (so I can go in a delete them)? I assume it is not in the eclipse project directory. Are breakpoints only supplied over the debug server or is there a shared file between eclipse/PyDev and QGIS3 remotedebug?

Even if I clear all breakpoints in eclipse using the breakpoints window in the debug perspective it will still stop at an old breakpoint. I have to stop the PyDev server for my QGIS3 plugin to continue.

Any ideas?


texts: QGIS keeps cutting off attribute table column names after 10 characters, can I stop this?

texts: How do I get QGIS to stop chopping off parts of my attribute table column names past 10 characters? Or is this unavoidable


texts:
I'm looking to create maps of administrative boundaries. Sometimes nested. For example I want to create shapefiles or geojson-files for all the countries in the world, including states in the US and counties in Texas. Searching on gis.stackexchange mostly pointed to http://overpass-turbo.eu. But overpass looks like it's geared to interactive usage. Furthermore the software has to run on my own server.

Being a newbie to gis and mapping software, any pointers to books or blogs or whatever that could help me would be welcome too.

Best,