texts: How to Export multiple selected features to PDFs with Python?

texts:
I have 77 polygons that mark areas of a satellite image that I want to export as separate PDFs. Each of the PDFs should contain just the polygon (and as much as the surroundings to fill out the data frame, and should be zoomed so that they fill out each A4 page (i.e. the scale are allowed to vary).

It is easy to obtain a list of the polygons, but how is the rest accomplished with Python?


texts: Why does a cubemap projection preserve lines of longitude but not latitude?

texts:
My understanding of cubemaps is as follows:

To create a cubemap from a sphere, we project from the centre of the sphere outwards, onto the faces of a cube.

Each face of the cube therefore represents a 90 degree field of view horizontally and vertically (if we imagine we are at the centre of the sphere looking outwards).

So, for example, the "front" face of the cubemap would have projected onto it anything on the surface of the sphere that lies between the longitude -45 to +45, and latitude -45 to +45.

However, if we look at a globe projected onto an unfolded cubemap we can see that this is not the case:

Image source
Looking at the front face of the cubemap, we can see that while it covers 90 degrees of longitude (the longitudinal lines are straight), the amount of latitude coverage varies (the latitudinal lines are curved) - e.g. the centre of the top edge of the front face reaches a higher latitude than the corners of the top edge of the front face.
This doesn't seem to make sense given my points (2) and (3) above, so I feel I must have some fundamental misunderstanding. I can understand visually how we end up with the lines of longitude and latitude shown in the top and bottom faces of the cubemap, but I just can't make sense of how the front (or left/right/back) faces can have a 90 fov but yet not preserve lines of latitude.
Does anyone have a visual/intuitive way to help me understand what is going on here?


texts: I have Geoexplorer war file deployed in Tomcat 7 webapps folder and I run it from localhost:8080/geoexplorer and load the layers and I visualize them correctly but when I close the browser and open Geoexplorer again I have to reload all the layers. How can I do to open Geoexplorer with the layers loaded?


texts: Batch clipping with multiple shapefiles in ArcPy?

texts:
I am trying to create an ArcPy script to clip multiple shapefiles (2,000) to the census tracts in LA County. I have successfully run the code on a single shapefile and am trying to convert the code into a form that will loop through all of the shapefiles saved in a folder.

The code should be able to pull in all the different shapefiles and export them as separate Excel files. I do not want to combine all of my shapefiles into a single shapefile for analysis purposes later one. When I run the script below, I only get one Excel output and I should be getting one per shapefile processed.

#import system modules
import arcpy
import os, re
import csv
import numpy

#Set environment workspace, enable file overwrite
from arcpy import env
env.workspace = r"C:\Users\madis\Desktop\Python_Test"
env.overwriteOutput = True
print "Output environment is set to Python_Test"

#Create a file geodatabase to store data
out_folder_path = r"C:\Users\madis\Desktop\Python_Test"
out_name = "Python_Test.gdb"
arcpy.CreateFileGDB_management(out_folder_path, out_name)
print "Geodatabase created."

#Clean up Census layer
arcpy.MakeFeatureLayer_management("CENSUS_TRACTS_2010.shp",
"CENSUS_TRACTS_2010_lyr")
print "Census tract layer created."

#Start for loop here
#Load shapefiles
file_list = [x for x in os.listdir(r"C:\Users\madis\Desktop\Python_Test") if
re.search(".shp$",x)]
    for file1 in file_list:
    tract_num = file1[:-4] #re.search("Tract(\d+)", file1).group(1)
    print("Processing file: %s" %tract_num)

    #Set the clip function variables
    in_features = "CENSUS_TRACTS_2010.shp"
    clip_features = "234502_de388cd-isochrone.shp"
    out_feature_class = r"C:\Users\madis\Desktop\Python_Test\Output"
    xy_tolerance = ""

    #Execute clip
    newInput = arcpy.Clip_analysis(in_features, clip_features,
    out_feature_class, xy_tolerance)

    # Calculate the clipped areas for tracts in isochrone
    areaRatioFieldName = 'SQFT_CLIP'
    areaRatioFieldType = 'DOUBLE'
    arcpy.AddField_management(newInput, areaRatioFieldName,
    areaRatioFieldType)
    print "Area ratio field added"

    #Export results to .xls
    arcpy.CalculateField_management(newInput, "SQFT_CLIP",
    '!shape.area@squarefeet!', "PYTHON_9.3")
    print "Clipped tract areas calculated"

    lyr=r"C:\Users\madis\Desktop\Python_Test\Output.shp"
    in_table = r"C:\Users\madis\Desktop\Python_Test\Output.shp"
    out_table = "Test1.xls"
    arcpy.TableToExcel_conversion(in_table, out_table)
    print "Export to Excel is complete"


texts: Where has the cartogram plugin for QGIS gone?

texts:
This plugin used to be downloadable from Carson Farmer's plugin repository page. However, the repository is broken.

An old version of the plugin source code is still available at https://code.google.com/p/ftools-qgis/ but using QGIS 1.8 the plugin can not be loaded ("corrupted").

Any help will be greatly appreciated...


texts: Putting SVG images at a particular coordinate in QGIS C++ API

texts:
I am using QGIS C++/Python API for making a custom QGIS application. I am trying to import an SVG image at a particular coordinate(QgsPointXY) in qgsmapcanvas. Which classes should be used? I am very confused right now about its solution.QgsMapcanvas is working fine. I was able to use it for my application. This code is just a part of my application for the SVG image problem only.
here is my code snippet:
mMapCanvas = new QgsMapCanvas(centralWidget);
auto pnt1 =  QgsPointXY(78.034370, 30.334795);
sym1= new QgsMarkerSymbol();
sym1->setSize(0);
sym1->setColor(QColor(0,255,0));
svgicon = new  QgsSvgAnnotation(mMapCanvas);
svgicon->setFilePath(QString("C:/OSGeo4W64/apps/qgis-ltr-dev/svg/food/food_bar.svg"));
svgicon->setVisible(true);
svgicon->setFrameSizeMm(QSizeF(20,10));
svgicon->setMapPosition(pnt1);
svgicon->setFrameOffsetFromReferencePointMm(QPoint(0,0));
svgicon->setMarkerSymbol(sym1);
QgsMapCanvasAnnotationItem *i =new QgsMapCanvasAnnotationItem(svgicon,mMapCanvas);


texts: How do I display GroundOverlays in OpenLayers 3 (from a KML)?

texts:
The back-end I'm working with serves KMLs in the following format (data is stripped for confidentiality):

<?xml ...>
<kml ...>
    <Document>
        <open>1</open>
        <GroundOverlay>
            <name>[Name]</name>
            <TimeStamp>
                <when>[ISO 8601 timestamp]</when>
            </TimeStamp>
            <drawOrder>0</drawOrder>
            <Icon>
                <href>[image_name].png</href>
                <refreshInterval>0.0</refreshInterval>
                <viewRefreshTime>0.0</viewRefreshTime>
                <viewBoundScale>0.0</viewBoundScale>
            </Icon>
            <altitude>0.0</altitude>
            <altitudeMode>absolute</altitudeMode>
            <LatLonBox>...</LatLonBox>
        </GroundOverlay>
        <GroundOverlay>...</GroundOverlay>
        <GroundOverlay>...</GroundOverlay>
        <GroundOverlay>...</GroundOverlay>
    </Document>
</kml>

I'm attempting to display the images linked in these KMLs on a basic OpenLayers OSM map. This is the code I'm currently trying to use:

layer = new ol.layer.Vector
  source: new ol.source.KML
    projection: ol.proj.get("ESPG:3857")
    url: kmlPath.join("/") # I have verified this is the correct path

_map.addLayer(layer)

I've tried several variations of this – different projections, absolute URLs, etc. It seems as though OpenLayers does load the KML, but does not even attempt to load the linked images. The KML works just fine in Google Earth.

I'm stumped.


texts: QGIS 3.4 How to make 90 degrees angles when digitizing polygons ? No plugins

texts: How do you make 90 degrees angles when digitizing polygons in QGIS 3.0 or above without any plugins ?


texts: How To Show Percentages By Coloring Polygons in QGIS?

texts:
I am trying to produce a map with QGIS that has counties shaded according to the percentage of people born in a US Region.  For example, counties with a high percentage of people born in the South region would be shaded darker than counties with a small percentage of people born in the South region.

I have so far been unsuccessful.  I first looked for a way to "normalize" the number of people born in the South to the total population, but QGIS does not have that function.  I then tried using the field calculator to calculate the percentage, but was unable since the CSV file I imported with my data cannot be edited in QGIS.  I then calculated the percentages in Excel, saved it in a CSV file, and then tried to plot it, but I could not do it because it was a string rather than an integer.  I then went back and had Excel multiply the numbers by 100 and then had it round to the nearest integer, only to find that QGIS still said that the fields in question were strings, not integers.

What can I do to get QGIS to produce the color ramp I want if I cannot get my percentages to turn into integers? Or is there another way to get what I want that I have neglected? Please bear in mind that I am fairly new to GIS.


texts:
Is there an easy way to batch generate isopleths in GME?

I have a set of 109 different kernel density estimates that I need to make 50% and 95% isopleths for, but in the interest of saving time and not having to do them all one at a time I would like to be able to automate the process. I am new to using GME so I have been looking over the GME manual and some tutorials found online, but nothing was apparent to me.


texts:
Sometimes, when opening the Data Source Manager window, I get only the Header, everything else is blank, there is no access to any tab or... anything at all. I got the problem in earlier versions and still have it in 3.10 LTR. I can't link that problem to anything I do, it seems to happen randomly but I guess it's not.

Closing and reopening QGIS does not fix the problem. I have to reboot the computer.

Did this ever happen to anybody else?

I realised that resizing the windows does fix the problem temporarily. It is still blank the next time.

Is there a way to fix it other than rebooting the computer?
What causes this to happen?


texts: Remove unneeded columns from geographic data file?

texts:
I have some GML data that has some unneeded columns in it. I'd like to remove these columns in order to reduce the file size. (To clarify: I mean that the file has many points in it, and each of these points has some metadata attached, and I don't need all of the metadata.)

I'd also like to do this from the command line, as I have many files.

I can convert the GML files into different formats using ogr2ogr, so my question is this: what's the easiest way to remove a column from a geographic data file, from the command line?

I'm a Python programmer so my instinct would be to convert the file to GeoJSON, then use Python's JSON-parsing methods to read and rewrite the JSON file.

But perhaps there's a more direct way, using a GDAL tool or similar.


texts: Getting file path from vector layer object in QGIS processing framework

texts:
Using the QGIS 3.x processing framework, given a vector layer as an input parameter:
(from the default script template)
def initAlgorithm(self, config=None):
    self.addParameter(
        QgsProcessingParameterFeatureSource(
            self.INPUT,
            self.tr('Input layer'),
            [QgsProcessing.TypeVectorAnyGeometry]
        )
    )

How can I get this layer's source file path as a string (assuming that only file-based data sources will be used, not PostGIS tables, etc)?


texts:
I downloaded a data set for Long Island, NY.
Usually I don't have trouble using shape files and their 3D data to export them for use in 3Ds Max, but in this case, even though the data seems to be there, I can't seem to be able to use it. (I'm a rookie).
I tried reprojecting the layer without success.
Do you see 3D data in this file?
Could you point me in the right direction?
https://1drv.ms/u/s!AoJEG8ib7Yy7hmJbKFx0yDAgjpa8?e=qtOchq


texts: problem with setting up proxy - ArcGIS JS API

texts:
I have spent a lot of time to solve a error in setting up proxy for JS API but I could not find any solution.

I did following steps:

I downloaded the proxy files for .Net.
I edited proxy.config file
I created an application
i tested proxy

when i run my codes it gives following error in chrome browser:

  proxy.ashx?http://localhost:6080/arcgis/rest/services/sdeMXD/MapServer?f=json&dpi=96&transparent=tr…:1

  Uncaught SyntaxError: Unexpected token <

in firebug it gives this error:

  GET http://localhost:6080/arcgis/rest/info?f=json 200 OK 87ms/3.16/
  (line152)

  SyntaxError: expected expression, got '<'     proxy.a...allback (line 1) dojo.io.script error RequestTimeoutError: Timeout exceeded {
  message="Timeout exceeded",
  stack=".cache["dojo/errors/crea...cgis.com/3.16/:204:284\n",
  response={...},  more...}


texts: Creating empty Polygons or SpatialPolygons in R?

texts:
I'm working on a project where I'm looking at overlap in users circling an area in an image. Esentially, I make a SpatialPolygonsDataFrame where each user gets one row. Some users don't select anything. So, I'm trying to figure out how to include that information. When I attempt to create a "NULL" polygon, and then scale it up, either with something like

Polygon(matrix(rep(NA, 4), nrow=2)

or

Polygon(NULL)

or anysuch, none of these work.

1) Can I create an empty polygon?
2) or add a row to a SpatialPolygonsDataFrame with no matching SpatialPolygons object?


texts: Predicting cycle flows assuming no traffic?

texts:
I'm trying to gauge the impact traffic has on levels of cycling. I have created a vehicle model which was used in creating a cycle model using cycle_roundtrip as the analysis. Following this, I have used the Learn and Predict tools to calibrate the betweenness variables produced from the model created by Integral with the measured cycle flows I have. From that, Predict was able to calculate the predicted number of cyclists accounting for levels of traffic.
However, how can I then create predicted flows assuming there are no levels of traffic?
I have created a new cycle model using Integral and assuming no traffic, however cannot use Learn as it would require cycle data calibrated in the presence of traffic.
Is there a way to have my no-traffic cycle Integral model produce predicted flows that I will be able to compare with the other cycle model flows accounting for traffic?


texts: Finding many intersecting polygons of one layer and listing them in single field using ArcGIS Desktop?

texts:
I have a polygon layer of a grid of USGS Quads Index clipped to the Southwestern US (https://catalog.data.gov/dataset/united-states-7-5-usgs-quad-index). I also have a polygon layer of county boundaries (https://www.census.gov/geo/maps-data/data/cbf/cbf_counties.html). I would like to create a new field in the quad index file that lists all of the counties that each quad intersects. I know I can use Intersect and Union in QGIS and ArcGIS, but the trouble is that there are duplicate rows for each Quad. Whereas when I started there were 4080 records (1 for each quad), there are now something like 5852 records (multiple for each quad). Like this:

I basically want the original 4080 records (1 for each quad) but with a list of all the intersecting counties. Something like this:

What is the right process for doing this in ArcGIS Desktop?

I was looking at the "Make Query Table" option in ArcGIS.


texts: Creating Road Edge of Pavements from Road Centerlines using QGIS

texts: I have a Road Centerline data set and would like to use it to create a Road Edge Of Pavements data set that I could then export to a CAD format. Is there an easy way to do this in QGIS?


texts: Why does GEE produce different random column value at each run?

texts:
Every time I run this code on different machines, GEE throws a different series of random values. I thought the seed parameters is designed for creating same/reproducible values. Here I provide some example code for this:  (https://code.earthengine.google.com/914f933b7103f3bfe079f33e4f42f113).

var bands=  ['B2'];

var Sentin = ee.ImageCollection('COPERNICUS/S2')
    .filterBounds(geometry2)
    .filterDate('2017-05-01', '2017-06-30')
    .median();

var D = Sentin.select(bands).sampleRegions({
  collection: geometry,
  scale: 10,
  tileScale: 10,
  geometries :true
});

var D2 = ee.List.sequence(1, 10).map(function(seed){
      var cls11= D.randomColumn("random", seed)
      return cls11;
});

print(ee.FeatureCollection(D2).toList(10).get(9));


texts:
I have to create a map with the land register of a place. The data that I already have is unfortunately built out of lines and not polygons. Is there a possibility to create polygons?

I already tried the tool “lines to polygons”, but the result is not as good as it should be (sometimes it just summarize a lot of lines to one big square). I also followed that tutorial “Lines to poly QGIS” (https://www.youtube.com/watch?v=bsiSAK3s_jE) but I have no idea how this method should work (I tried it and the result was just one big polygon…).

Is there another good way to do so?

The aim is to get in the end one map with polygons, so that I can “click” on it and get from that polygon the information of its land register number and so on.
I use QGIS 2.12.3. -lyon

EDIT:
After using the polygonizer tool I got a good result, besides the middle part where a lot of small squares are located. The shapefile has thin lines which are connected through a circle and the polygonizer tool used those circles as polygon and not the whole square. Do I have to do something before with the lines and delete those circles?


texts: I'm unable to find out a formula for converting 3tm coordinates to lat-lon?  3tm is a system used in Alberta alone, as far as I can tell.  The city of Calgary uses that for its opendata, which is what I'm trying to process.


texts: I need to find the elevation of lat and long point using a dted map. I read that gdal can read this kind of map. I didn't find a tutorial. I read about gdal here but it's not very "user-friendly". Can you give me any code snippet (only an hint) to read a single value of a dted map?


texts: How to combine two rasters, preferring the values of one over the other?

texts: I have two rasters that I need to combine (not using the Combine tool). The values of the 1st raster are preferred to those of the 2nd raster, so I want to keep these values if they exist. Where the 1st raster has NoData values, I would like to keep the values of the 2nd raster. This should function similarly to the Update tool in ArcGIS, but instead of vector data we're working with rasters. I need to do this in ArcGIS (it's part of a model), but I'm also interested in other methods of achieving this.


texts:
I'm trying to test simple web map based on PostGIS/Geoserver/OpenLayers stack on Windows Server 2008.

When I load my WMS layer by:

var gwctest = new OpenLayers.Layer.WMS(
    "gwctest",
    "http://localhost:1979/geoserver/wms",
    {
    'layers': 'Index2000:index_vect_s100',
    'format': 'image/png',
    'srs': 'EPSG:3857',
    'units': 'm',
    'transparent': true
    },
    {'opacity': 0.8, 'isBaseLayer': false, 'visibility': false}

);

Everything seems to be fine.

However, when I try to add WMS layer to my map using GeoWebCache, replacing

"http://localhost:1979/geoserver/wms"

with:

"http://localhost:1979/geoserver/gwc/service/wms"

My data suddenly move from correct position:

Any ideas on what may be the cause?

EDIT: some additional info on GWC mailing list post.


texts:
I need to connect AutoCAD Map 3D 2014 with an Spatial MySQL database (version 5.5) but first I have to install "libmysql.dll" to connect as specified in the software user's manual.

This file is currently inside MySQL 5.5 instalation folder. I've tried to register it using the typical regsvr32.exe step in comand line, both as Administrator and not. I've tried to put this file inside system32 and syswow64 folders (as I have W7 x64) and then tried to register again. I've tried to place the file inside the AutoCAD Map 3D 2014 folder (bin/FDO) and then register again.

Every time I get an error saying that the module was loaded but the DllRegisterServer was not found.
In the program's help it is specified that libmysql.dll must be installed before connecting but doesn't say how and where.

I know it's not the most used GIS but maybe someone had to deal with a similar problem using MySQL 5.5. Can someone specify it please?


texts:
I would like to project ECW + MITAB with FME to Geodatabase.

For example, i have the header MiTab:

  !table !version 300 !charset WindowsLatin1   Definition Table   File
  "7007_0652_0656_A08.ecw"   Type "RASTER" (381028.028, 5255481.97)
  (0,0) Label "NWCor", (381028.028, 5253732.95) (0,11660) Label "SWCor",
  (382131.9, 5253732.95) (7359,11660) Label "SECor", (382131.9,
  5255481.97) (7359,0) Label "NECor" CoordSys Earth Projection 8, 33, "m", -69, 0, 0.9996, 500000, 0 Bounds (-7745844.29605, -9997964.94315)
  (8745844.29605, 9997964.94315)  Units "m"

How to project the ecw raster to Geodatabase ?
Thanks.


texts: data frame visibility - on/off like layers in arcgis 10

texts: I have two or more data frames in the table of contents area. Is there a way for changing data frame visibility in layout view of arcgis 10? I mean, similar to layers having option of on/off. I have seen in side the data frame, we can on/off layers but I want to do on/off for the data frame.


texts:
I want to use the Ordnance Survey Land-Form Panorama product in some software called Maperitive, which can read custom SRTM DEM files.

The data is provided in the following formats:

DXF [Contours]
ASCII grid [DTM]
NTF [DTM]

https://www.ordnancesurvey.co.uk/opendatadownload/products.html (search for land-form)

Can anyone recommend a free tool or toolchain (runs on Linux or Windows) that I can use?


texts: Deriving point rotation from line direction in QGIS?

texts:
This question is related to Rotating point feature symbols by intersect polyline in ArcGIS Desktop?, but my problem differs slightly.

I have a layer with polygons (nearly all rectangular) and a second one with points. The points are set in the middle of one of the sides of each polygon. I need to represent the points as arrows pointing directly into the polygon. So far I use an attribute of the point layer for rotation and fill the rotation in manually, but I was wondering, if I could derive the rotation value from the direction of the polygon segment automatically?

I use QGIS 2.18.16 on a Windows 7 PC.


texts: Generate static tiles with current OSM style from PostGIS

texts:
I'm trying to generate static tiles for Great Britain with the current OSM style. I have populated my PostGIS database from a osm.pbf file from here [1]. I have Mapnik version 3.0.9 installed.

I can generate tiles using the polytiles.py script from [2] but they use the old OSM styles. The polytiles.py script only accepts xml style sheets but the new OSM styles are not xml [3].

Is there another script I can use instead of polytiles.py to do the same thing?

[1] http://download.geofabrik.de/europe/great-britain.html
[2] http://svn.openstreetmap.org/applications/rendering/mapnik
[3] https://github.com/gravitystorm/openstreetmap-carto.git


texts: Running QGIS viewshed plugin from console?

texts:
I want to run the viewshed plugin from the console/ in a script in QGIS.

Do you know if this is possible?


texts: I've already created an Address Locator sucessfuly and published it as a Geocoding service, but I need to verify  that its working from the rest since its not working from my web mapping application is there a method to do this ?


texts: How to render OSM data in correct order?

texts:
I am rendering data from OSM. There are various styles for different features(city road, highway, country road, walking path..). In order for a highway to be rendered above a simple road, it has to be rendered last, otherwise the roads would look like they lay above the highway. Of course this applies in general to all objects, not just roads.

So I wonder how can I determine the proper order? Using the area of the feature usually works for polygons, but even then not always. The OSM has a gazzilion of tags so trying to figure this out via trial and error would take ages. I'm sure there is some guideline or prepared set of rules for this somewhere but I haven't found it yet.


texts: Merging the bands of a single image in GEE python API

texts:
I currently have a single image with 3 bands with different turbidity data, all from the same region. The pixel values of the 3 bands do not overlap with each other. I would like to merge these 3 bands into one, while keeping the turbidity data intact.
Just as an example, I made 1 image, with multiple bands from a image collection:
Image1 = Collection1.toBands()

The image made from this collection looks something like this
Image1
band1: 0, 0, 0, 2
band2: 0, 0, 2, 0
band3: 2, 0, 0, 0

I would like to transform this into a single image with 1 band, for example:
Image2:
band1: 2, 0, 2, 2

Is there a way to accomplish this?


texts: Setting color to line layer using VBA in ArcGIS Desktop?

texts:
I am getting the compile error at pcolor.RGB.

I want to add a color to the line feature.

How to modify the code?

Public Sub surya()

Dim pmxdoc As IMxDocument
Dim pstylegallery As IStyleGallery
Dim pEnustylegalleryItem As IEnumStyleGalleryItem
Dim pstylegalleryItem As IStyleGalleryItem

Dim plinesymbol As ILineSymbol
Dim pcolor As IColorSymbol

Dim pmap As IMap
Dim player As ILayer
Dim pFealayer As IFeatureLayer
Dim pgeofealayer As IGeoFeatureLayer

Dim psimplerender As ISimpleRenderer

Set pmxdoc = Application.Document
Set pstylegallery = pmxdoc.StyleGallery
Set pEnustylegalleryItem = pstylegallery.Items("Line symbols", "ESRI.Style", "Dashed")
Set pstylegalleryItem = pEnustylegalleryItem.Next

Set plinesymbol = pstylegalleryItem.Item
plinesymbol.Width = 5#
plinesymbol.Color = pcolor.Color

Set psimplerender = New SimpleRenderer
Set psimplerender.Symbol = plinesymbol

Set pmap = pmxdoc.FocusMap
Set player = pmap.Layer(0)
Set pgeofealayer = player
Set pgeofealayer.Renderer = psimplerender

pmxdoc.UpdateContents
pmxdoc.ActiveView.Refresh

End Sub


texts: Turning on/off ALL selected layers in QGIS

texts: When I select few layers in the QGIS 3 Layers Panel and press Space - only one of the selected layers is turned off/on. I want to turn them all. How to do that?


texts:
Again, Super new here.
I downloaded the DXF2SHP plugin, just to import the full characteristics of my files, but whenever I try to actually convert from a simple DXF file to SHP as I´m supposed to according to the instructions I keep receiving this back:

Any thoughts? What am I doing wrong?


texts:
I installed Street Smart Plugin for ArcGIS Pro

I Also added the plugin:

But the app is still disabled:

How to enable it?


texts:
For a deep learning project, I trained a YOLO based model to detect objects on satellite images (from spacenet dataset; epsg:4326). However, as the Darknet only takes JPG/PNG images as input(to the best of my knowledge), I had to convert TIFF files to JPG first and also convert the bounding box labels to pixel coordinates. For creating bounding boxes, I used some examples from spacenet utilities and a bit of experimentation.

Now that I have the pixel prediction for objects from the YOLO model and I want to be able to map these pixel coordinates back to the longitude/latitude information (using the corresponding geomappings in TIFF file?) so I can put the results on an interactive map such as ArcGIS. How can I convert the pixel coordinates of the predicted bounding boxes, back to the real world longitude, latitude information.


texts:
I am looking for a list of all ZIP codes that contain tribal lands. It looks like one was already created and put up on ArcGIS Online here: https://www.arcgis.com/home/item.html?id=241b01b48db1409381a4e42fe6477821
However, I can't figure out how to actually download the table. Is that possible?


texts: Convert Latitude/Longitude to Lambert Conformal Conic in SQL

texts:
How can I convert the from Latitude/Longitude to Lambert Conic Conformal using SQL?

I've been working on project that will require me to convert between NZTM And LCC projections. It's related to this post.

LINZ don't provide a formula to convert directly between NZTM and LCC, but both can be converted to/from Lat/Long. I've been very fortunate in getting some help with the NZTM conversion and am now working on the LCC conversion.


texts: iterate over spatial polygon data frame in R

texts: I am trying to iterate over the rows of a spatial polygon data frame in R, but cannot figure out the right indexing. I don't want to select by attributes, but rather just iterate over the spatial polygon data frame.


texts: Export legend element using arcpy.mapping

texts:
I'm working on an ArcGIS JS API web application that requires a heavily customized PDF report.

When a user submits their desired extent to our reporting function, we need to convert their webmap to MXD (likely using arcpy.mapping.ConvertWebMapToMapDocument), modify some symbology, and export to PNG. We also need to build a separate legend (farther down in the report) that contains the proper polygon boxes and text descriptions:

My current plan is to export these all separately, then use python to inject them into a LaTeX document, then run pdflatex to generate PDF.

Is it possible to export the legend objects (polygon boxes and associated text) in this way? I can manually convert the legend to graphics in ArcMap, then paste them into Paint (or something) but I'm struggling to find a way to do this in python.

Any other workflows that make more sense?


texts: WFS Layer in OpenLayers queries server for data but doesn't display the data

texts:
I have added a WFS layer to a map and can see (using Fiddler) a request being made to the server for the layer data. The server uses GML as the data format and the data being returned is valid. However, OpenLayers does not display the data. Here is the code that I use.

$(document).ready(
        function () {
            // allow testing of specific renderers via "?renderer=Canvas", etc
            var renderer = OpenLayers.Util.getParameters(window.location.href).renderer;
            renderer = (renderer) ? [renderer] : OpenLayers.Layer.Vector.prototype.renderers;
            var geographic = new OpenLayers.Projection("EPSG:4326");
            var mercator = new OpenLayers.Projection("EPSG:900913");

            map = new OpenLayers.Map({
                div: "map",
                layers: [
                    new OpenLayers.Layer.WMS("OpenLayers WMS",
                        "http://vmap0.tiles.osgeo.org/wms/vmap0",
                        { layers: "basic" }
                    ),
                    new OpenLayers.Layer.Vector("GML", {
                        strategies: [new OpenLayers.Strategy.Fixed()],
                        protocol: new OpenLayers.Protocol.WFS({
                                url: "http://localhost/MapServer/Default.aspx",
                                featureType: "Layer_ACTIVE",
                                featureNS: "http://www.tstgis.org/gml",
                                version: "1.1.0",
                                geometryName: "line"
                            }),
                            renderers: renderer
                        })
                ],
                zoom: 15
            });

            var bb = new OpenLayers.Bounds(-179.821327209473, 12.1057098342161, -56.5289154052734, 78.1442901657839);
            map.zoomToExtent(bb);
});

What is going on? Note: the returned data set is pretty big (1.5 MB) and I wonder if that has anything to do with the missing display.


texts: What closeness measures are appropriate to this undirected graph?

texts:
I need a way to measure the closeness centrality of every single NODE(i) in respect to all NODES(j),

1 NODE(i) to all NODES(j)

and, another measure that describe somehow the geometric properties of the network created by NODES(j) with themselves.

all NODES(j) to all NODES(j)

I know this is part of Graph Theory, but it is also a routing matter and I am sure spatial gurus can understand this network.


texts: How to calculate an hypsographic curve of a raster trhough a DEM

texts:
I am using Arcgis 10.1.
I have a MODIS raster from the NSIDC website with a pixel resolution of 500 m and an attribute table with the fields 'VALUE' (as the code of snow, clouds, etc.) and 'COUNT' (as the number of pixel in each class (or in each 'VALUE'). I also have a DEM from USGS that I have reprojected to match the Spatial Reference and the pixel resolution of the MODIS (thus increasing the pixel of each cells from the original 83 up to 500 m size).
What I would like to do is to have a table (or whatever) showing the area of the snow class for each 200 m elevation ranges (the hypsographic curve of the snow cover).
I have reclassified the 500 m resolution DEM as to have 200 m elevation ranges, and now I have a new attribute table showing the 'VALUE' (the different elevation ranges) and their respective pixel 'COUNT'.
I've been trying using the Zonal Histogram tool, putting as the input zone my MODIS and as the input value my DEM. The result seemed fine but I noticed that summing the number of pixels of each elevation range within the same class(for instance 'snow' that is the one I need) the final number of pixel is different than the one in the MODIS attribute Table (sometimes a lot different!).
No clue why, guess it might be due to spatial difference amongst the two rasters due to the transformation I've made, even though the two rasters were both clipped using the same mask...
Here are examples of 2 original Attribute Tables that I have (200 is snow, other numbers are other classes):

    MODIS                 reclissified_DEM
VALUE  COUNT                VALUE  COUNT
 25    240787                   0      2
100       169                 200 188277
...       ...                 ...    ...
200     32265                6600      3

Moreover, I also noticed zooming to pixel extent that the pixels of the two rasters do not match, and I think this leads ArcGIS not working as I'd like. Is there a way to match them as to loose the fewer information as possible? Or, is there an easier way to do all this job?
See the below image to understand what I mean:

Hope You could help me.


texts:
I am using ArcMap 10.3.1.  I have created a custom tool using a python script, the code for which is listed below, that uses a lookup table to reclassify vector data. When run on the local machine the tool outputs a new shapefile to the working directory. This same tool fails to run after publishing it to the server and subsequently executing it.

import arcpy

#set environment workspace and overwrite functions
arcpy.env.workspace = "U:/"

#set local variables
inputFC = arcpy.GetParameterAsText(0)            #Input feature class
inField = arcpy.GetParameterAsText(1)            #Input field from 'inputFC' to be reclassed
rcTable = arcpy.GetParameterAsText(2)            #Table that has reclass ranges
remapLower = arcpy.GetParameterAsText(3)         #Field in 'rcTable' that has lower bounds
remapUpper = arcpy.GetParameterAsText(4)         #Field in 'rcTable' that has upper bounds
remapValue = arcpy.GetParameterAsText(5)         #Field in 'rcTable' that has new values
outField = arcpy.GetParameterAsText(6)           #User inputted name for reclass field to be created
outFieldType = arcpy.GetParameterAsText(7)       #Type for 'outField'
remapVals = []                                   #Variable for reclass decision numbers
notfoundvalue = "9999"
outputFC = "reclass.shp"

#copy feature layer
arcpy.CopyFeatures_management(inputFC,outputFC)

#Create a new field in 'outputFC' called 'outField' of type 'outFieldType'
arcpy.AddField_management(outputFC,outField,outFieldType)

#Create a list of lists containing a lower bound, upper bound and new value in each list
with arcpy.da.SearchCursor(rcTable,[remapLower,remapUpper,remapValue]) as cursor:
    for row in cursor:
        remapVals.append([row[0], row[1], row[2]])

#Change the values of the 'outField' based on 'inField' value being within a reclass range
with arcpy.da.UpdateCursor(outputFC,[inField,outField]) as cursor:
    for row in cursor:
        for i in range(0,len(remapVals),1):                                #entendable number of reclass classes
            if row[0] >= remapVals[i][0] and row[0] < remapVals[i][1]:     #iterates over the 'i'th list
                row[1] = remapVals[i][2]
                cursor.updateRow(row)
                i += 1

#Records not caught by the above for loop remain with a value of 0'
#For each record that has remained '0' update it to '9999'
with arcpy.da.UpdateCursor(outputFC,[inField,outField]) as cursor:
    for row in cursor:
        if row[1] == 0:
            row[1] = notfoundvalue
            cursor.updateRow(row)

arcpy.SetParameterAsText(8,"reclass") #Output file parameter


texts: I have gone through the process of bringing a SketchUp model into ArcScene utilizing Edit Placement on the 3D Editor window. The model appears to have come in great. However, it is floating slightly above my base parcel layer. Is there a way to get the multipatch 3D layer not to float slightly above another layer? I have even selected Floating on Custom Surface Elevation 30 m and yet it remains hovering above the ground. Any help would be appreciated.


texts: How to create custom CRS with custom SRID in PostGIS?

texts:
In our app we are using several CRS - one of them is a custom one. I'd like to turn it into a proper CRS that PostGIS can fully support (e.g. administering valid transformations on it with something like ST_Transform, etc)
How would one do that?
I couldn't find any reference on this online. I found one for Oracle here - seems to be very detailed, transparent and straightforward process. What would be an alternative of this process in case of PostGIS?


texts: Calculate polygon field based on neigboring polygon attribute

texts:
I have a vector shape with many different sized polygons each possessing an own class name (for instance "houses", "houses with offices", etc ...)

I want to assign a new field to each polygon containing the name of the majority (higher proportion) of adjacent polygons attribute name. Ergo some kind of polygon neighborhood analysis.

The query should look to the attribute of each bordering polygon and change another fields value to the name which occurs the most. For instance the beige polygon in the middle of the above image is surrounded by polygons with the attribute "houses" and therefore it should get the attribute "houses". (Best would be if i can somehow display and save the proportion of different attributed polygons).

Does anyone have an idea or a tool how to accomplish this task?
I am thankful for every partial or full solution. Any good way to solve this problem is appreciated!

I intend to use QGIS, but i can also switch to other tools (Arcgis 9, Grass, Saga, R, ...)


texts:
I'm a bit confused about SVG graphics!
I'm trying to build a script that creates a "north reference" in SVG, and it renders fine when viewed in Firefox. In Inkscape there's some issues with text orientation (the "GN" marker, but I can fix that), but in QGIS it renders really bad.

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
  "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="5cm" height="5cm" viewBox="0 0 400 400"
     xmlns="http://www.w3.org/2000/svg" version="1.1">
  <title>North Arrows</title>
  <defs
    id="arrowheads">
    <marker
     style="overflow:visible"
     id="magnetic"
     refX="0.0"
     refY="0.0"
     orient="auto">
     <path d="M 5 0 L 40 0 L 5 7 z"
        stroke="#000" stroke-width="1" fill="#000" />
    </marker>
    <marker
     style="overflow:visible"
     id="true"
     refX="0.0"
     refY="0.0"
     orient="auto">
     <path
        transform="scale(0.8)"
        d="M 0 -10 L 35 0 L 0 10 L 22 -18 L 22 18 z"
        stroke="#000" stroke-width="1" fill="#000" />
    </marker>
    <marker
     style="overflow:visible"
     id="grid"
     refX="0.0"
     refY="0.0"
     orient="auto">
     <text
        style="font-size:20px;font-family:sans-serif;writing-mode: tb;"
        >
         <tspan
         y="-15"
         x="10"
         id="grid_text">GN</tspan>
        </text>
    </marker>
  </defs>
  <path d="M 200 380 L 230 90"
        stroke="#000" stroke-width="1"
        style="marker-end:url(#magnetic)" />
  <path d="M 200 380 L 180 60"
        stroke="#000" stroke-width="1"
        style="marker-end:url(#true)" />
  <path d="M 200 380 L 200 30"
        stroke="#000" stroke-width="1"
        style="marker-end:url(#grid)" />
  <text y="395" style="font-size:15px;font-family:sans-serif;" >
        <tspan x="220" dy="-15">GN = 0</tspan>
        <tspan x="220" dy="-15" >Magnetic Dev. 20</tspan>
        <tspan x="220" dy="-15" >True North = 10</tspan>
  </text>
</svg>

When I preview or open in Firefox it looks like this:

But when I add the image in QGIS (Composer) it looks like this:

Does QGIS have a limited SVG rendering capability, or is it Qt that has limitations? Isn't my SVG in a "valid" format/syntax?

[Edit]
I'm leaning towards a Qt problem, since "karbon" (Qt vector application) previews the file fine, but when opening it, it displays the same as in QGIS. When creating a line with arrow markers in karbon and saving as SVG, markers are lost! Is Qt really this bad at rendering SVG??


texts: Do Public Land Survey System Townships have names? If so, why are they often left out of shapefiles

texts:
I am having trouble identifying names for PLSS townships. I am beginning to think it is because I am confusing political townships/PLSS townships/others.

Could anyone clarify whether or not PLSS townships have names? If so, could anyone explain why it seems many files omit them?


texts: How to export source layer intersections in QGIS?

texts:
I have source layer with areas (polygons) and intersect (second) layer with simple polyline structure. When I set up intersection, I got 6 objects in the results, its ok. After that I need to export to DXF or MIF only that parts (areas) of source layer, that intersects with intersect (second) layer.

So, how can I do that? If I select just my newly created intersection layer and export it to DXF - it just displays a second (intersect layer), not a intersect parts of source layer.


texts: Copy attributes by intersection (point on line) PyQGIS

texts:
I have a PostGIS database, with 2 layers: a point and a line. I import these layers into QGIS (set snap to 10 pixels), draw a line, then I draw a point on that line. Then i select the point and verify if the point geometry intersect line geometry and it is false.

The question is why? Below is the piece of code that I'm using:

for lyr in QgsMapLayerRegistry.instance().mapLayers().values():
  if lyr.name() == 'line':
    l_layer = lyr
  elif lyr.name() == 'point':
    p_layer = lyr
  print 'ok'

featSelected = p_layer.selectedFeatures()

for l in l_layer.getFeatures():
  if featSelected[0].geometry().intersects(l.geometry()):
    print 'ok'

for line in l_layer.getFeatures():
  if featSelected[0].geometry().intersects(line.geometry()):
     value = line["guidCON"]
     idSelected = featSelected[0].id()
     fieldIndex = p_layer.dataProvider().fieldNameIndex("guidCON")
     p_layer.changeAttributeValue(idSelected,fieldIndex,value.lstrip())


texts: Creating 3D surface model from Polylines, and then create/move Polylines on that surface

texts:
I have vector layer of Polylines. I want to build from them a 3D surface model, so then, I would be able to move some of the Polylines to better position them, or alternatively - create (draw) new Polylines.

The surface model here is important since the modified/new vertices should be taken from this model.

For the sake of simplicity we can assume linear interpolation.

(Working env. Qgis, The solution may involve programming - Python)


texts: I import a KMZ into QGIS but I would like to display the path name next to path in QGIS

texts: I have a KMZ/KML file I import into QGIS. The file in Google Earth has track names but after importing to QGIS, only the tracks/paths are visible. How do I get the individual path names (which I can view in the attributes table) to view on the main window alongside the respective path/track?


texts: Load QGIS project from database using PyQGIS

texts:
I am trying to open a QGIS project that is saved to the database (Project -> Save to -> PostgreSQL) by means of Python script.

I find a similar way to open project which is saved to the desktop using QgsProject.instance().read(filename). Can anyone guide me a similar way to open from database?


texts: Creating layer where more attributes are presented

texts:
I would like to create a layer in ArcGIS containing polylines, that are rendered by combination of more than one attribute.

I can create layer where the polylines are of different thickness or different colour. But what if I want to make combination of the attributes?

Is there a way to present a 1px red line and another one green 2x line?

MSSQL data source:

ID | color   | thickness | geometry
1  | 255,0,0 | 1         | polyline(...
2  | 0,255,0 | 2         | polyline(...


texts: What are default units for coordinates in Create Fishnet tool of ArcGIS Pro?

texts:
This has been a reoccurring issue for me using ArcGIS Pro - when creating a fishnet and specifying the extent from an existing layer and subsequently trying to set the cell size, I am getting a mysterious unit.
I cannot specify the unit in the parameters or the environment and it is not linked to the CRS I am using. Comparing with different measurements it seems to be in meters, which doesn't make much sense given that my set CRS is WGS84. This happens for every dataset I tried so far.
Is this a bug or am I just not seeing the problem here?


texts: How Do i Secure My KML files for a rails application?

texts:
I would want to keep my KML files to be secure or password protected. I am keeping them on a public server, and i dont want them to be accessible to anyone.
I am using geoxml3, so any lock applied to the folder would not be a problem, because in this case google has no role to play.
I have tried using .htaccess but i guess the webrick server in rails does not support it.
Is there any other option?


texts: Disabling mouse wheel zoom using ArcGIS API for JavaScript?

texts:
The mouse wheel behaviour in the 4.1 version of the ArcGIS JS API is causing problems with maps on scrollable pages, see Scrolling down a page with a map from here and a question on esri.com. I thought I'd disable zoom by mouse wheel altogether until this is fixed, but I can't find how.

For 3.18 this should be possible using the disableScrollWheelZoom() method, but this isn't supported in 4.1. Does anyone know the 4.1 equivalent?


texts: Determine percentage of parallelism of two parallel lines in QGIS/python

texts:
I'm trying to match some lines to each other and join attributes proportionally. Have a look at the image where S1 can appear in both A1 and A2. Let's say 30% of S1 is parallel to A1, and 15% of S1 is parallel to A2. Now I have an idea how to match these lines via hub distances in QGIS. But I need to determine the percentage of parallel running segments to say: 30% of S1 is parallel to A1, thus I can relate 30% of N=20 to A1, for example. The hub distance can only match the lineID so I can join the table values without a weight. In the end, I want to calculate a weighted distribution along the lines.

I seek solutions implementable in QGIS, preferably a python algorithm. It should be applicable to  a larger dataset. I have something like this in mind:

1. Match segments
2. Determine where overlap exists
3. Apply algorithm to determine the percentage of parallelism of S1 with A1 and A2, resepctively

Procedure and results of steps 1 and 2 (Match and determine):

1. Locate points along lines (A1 + A2), 5m interval, for example.
2. Locate points along lines (S1) with larger interval than in first step, e.g., 10m.
3. Distance to hub with IDs of A1 + A2 as Hubnames.
4. Count unique IDs (pivot table in excel, avoids counting, thus matching, the same ID to one segment),
5. If count >1, then S1 parallel to more than one line and it needs weighting smaller than 1.
6. Based on the IDs I can `join attributes by table` from A1 and A2 and apply the parallelism weight.

I only need help for the 3rd step (apply algorithm) as far as I see it now. It is important to have the percentage of S1 in order to use this percentage as a weight.


texts:
Is it possible to include subscript and superscript text in the title of a legend item in QGIS ?  I have tried using some text but this just appears in the title with no change to the contents.

I am looking to have layer titles such as

Annual NO2 concentration (μg/m3)

The superscript is not a big issue, as I can use the character map to get a 3, but I don't know how to get the subscript.


texts: Is there a tool that is able to transform a multi-band image to single band rasters? I usually use the raster calculator within the modeler to do that.


texts: Rotate geometry generator marker line depending on map projection QGIS

texts:
I'd like to rotate marker line made from geometry generator function: the thing is that, by means of geometry generator I create line via make_line and points are the calculated values (based on values in attribute table fields - in Asia Lambert Conformal Conic projection EPSG:102027).

Received linestring must be rectangle (parallel to map canvas), but when changing map projection in map canvas, сonsequently these points forms rotated rectangle (although label is parallel)

How I can rotate (or maybe on-fly transform point coordinates in attribute table in custom projections) my rectangle so that it would be parallel to map canvas?

My projection:
+proj=lcc +lat_1=57 +lat_2=63 +lat_0=0 +lon_0=133 +x_0=0 +y_0=0 +ellps=intl +units=m +no_defs

My geometry generator style:

I tried to transform my geometry (constructed with geometry generator) via transform function (transform(geom, source_auth_id, dest_auth_id)) but nevertheless it puts wrong:

In draw background I didn't find any functionality for drawing custom shape borders - only solid line, but I would like to get a line with point markers


texts: Dynamically creating expression in ArcMap model

texts:
I am trying to build a model that iterates through feature classes in a .gdb and uses the name of feature class (they are named by state abbreviations) to make a new layer from a second feature class based on that name.

The second feature class, osm_bing_diff_uniqueid has a field called st_abbr that identifies a feature by state abbreviation. What I want to do is parse the Name output of the first feature class into the expression for the Make Feature Layer of the second feature class. For example, if the Name = AL_Bldg_FP_Parcels, I to make a feature class of all the features in osm_bing_diff_uniqueid where the st_abbr field value is AL. I am a little confused as to how to use the Name as an input and parse it into the expression.

Any suggestions?


texts: When is Geographic Weighted Regression used and why?

texts:
I am currently trying to better understand what geographic weighted regression is, and what it is useful for. I have been reading up on it, but would like to get others people's views on it and see what they have to say.

I would like to know when you would want to use, and why is it useful? I graduated with my degree in GIS last December, and have been in the GIS workforce for almost a year now. I started out in utilities, but am now in the 911 field, so I am trying to learn more about hot spots, and using weighted regression.


texts:
I have a multipolygon layer in which I want to dissolved based on a class column. The steps I'm doing are:

create table tc_2010_00567 (gid int primary key, tc_2010 text(32));
select addGeometryColumn('tc_2010_00567', 'the_geom', 4618, 'multipolygon');
insert into tc_2010_00567 (gid, tc_2010, the_geom) select NULL, tc_2010, st_union(geometry) from tc_2010_00567__pol group by tc_2010;

I can create the table and add the geometry column (steps 1 and 2) but step 3 gives me the error IntegrityError: tc_2010_00567.the_geom violates Geometry constraint [geom-type or SRID not allowed]

My input dataset has SRID:4618
The select part (in step 3) works and I can load it in QGis (using QspatiaLite). But the insert into part is not working. Any clues as to what could be wrong?
I'm using QSpatiaLite from QGis 2.8.1 and SpatiaLilte 4.1.1


texts: How to measure the Speed between two Waypoints?

texts:
I'm totally new to QGIS or any GIS.

I need to analyze a lot of Waypoints to get the average speed of the people walking between them. (It's for analyzing an experiment I made) therefore I neet do measure the Distance and the speed between the waypoints I got.

I have a lot of csv tables with the geografic dates and the time of each waypoint. I imported them in QGIS and now I've got them as a shape layer.

Now I have two methods, one is to take the speed from the first, the middle and the last and make an average time based on a measurement I made, it's ok but maybe it's better to do the second one:

I neet to measure the DISTANCE between the waypoints and then to get the speed based on the time and the distance. In the end I can calculate the average speed out of the "Speeds" I got.
I think this is a job for the Field Calculator, but I don't know how to do this, can you help me?


texts: Querying ArcGIS file geodatabase from SQL?

texts:
I need to compare data in a sql db with data stored in an arcgis file geodatabase. I'm not interested in the spatial attributes, only the added text attributes. What's the easiest way to do this?

I can get the data exported to csv. But I can see this exercise will be repeated. And it would really make my life easier if I could also update data to clean it up.

I believe we run arcgis 10.1 or 10.2.  I don't have arcgis desktop myself. Not sure if there are license limitations but installing it wouldn't be a problem.

I didn't want to influence the answer but I've been reading about gdal/ogr. And wonder if that's an option. Also I have no idea how hard it would be to install arcsde. And whether that could read/convert a fgdb on the fly.


texts:
I am using PyCharm 4 for some Python scripting.

When I type:

import arcpy

I can immediately start using items within the arcpy namespace, like the environment & workspace objects.

How does the Python IDE, in this case PyCharm, know about ArcPy?


texts:
I'm trying to transition from an old Postgres/Postgis database to a new one.
I'm working in a fresh install of Win 7 64 bit. I installed Postgresql 9.3 32 bit, then installed PostGIS 2.1.3. I created a new blank database called medford, and ran

create extension postgis
create extension postgis_topology

without error. I also installed the legacy like this:

psql -d medford -f legacy.sql

Then, on my old system, running Postgres 9.2 and PostGIS 2.0.3, I ran this backup:

pg_dump -h localhost -p 5432 -U postgres -Fc -b -v -f "c:\backup\pgdumpmedford.backup" medford

and then restored it into the new blank database using a batch file like this:

set PGPORT=5433
set PGHOST=localhost
set PGUSER=postgres
set PGPASSWORD=nottherealpasswrd
set THEDB=medford
set BACKUPFILE=c:\Data\medford.backup
set PGINSTALL=C:\Program Files (x86)\PostgreSQL\9.3
set PATH=%PATH%;"%PGINSTALL%\bin"
perl "%PGINSTALL%\utils\postgis_restore.pl" "%BACKUPFILE%" | psql %THEDB% 2> errors.txt

When I run the command

Select Postgis_full_version();

I get this which looks fine:
POSTGIS="2.1.3 r12547" GEOS="3.4.2-CAPI-1.8.2 r3924" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.10.0, releaed 2013/04/24" LIBXML="2.7.8" LIBJSON="UNKNOWN" TOPOLOGY RASTER
(1 row).
However, when I open QGIS 2.2 and try to add a postgis layer from the new postgres 9.3 database, I can connect and add a layer of type "multipolygon", and the layer name appears in the table of contents layers list, but nothing shows up in the map view.
I've read over this post, and that doesn't seem to help. I've checked my Postgres log and I see this there, but I don't know what it means:

2014-05-29 13:39:59 EDT ERROR:  relation "layer_styles" does not exist at character 22
2014-05-29 13:39:59 EDT STATEMENT:  SELECT styleQML FROM layer_styles WHERE f_table_catalog='medford' AND f_table_schema='medford' AND f_table_name='OpequonSubShed2' AND f_geometry_column='the_geom' ORDER BY CASE WHEN useAsDefault THEN 1 ELSE 2 END,update_time DESC LIMIT 1

If there's supposed to be some kind of layer_styles table in my database, I don't see it when using pgAdmin. I also don't see a layer_styles table in my old database. On my previous installation, I had no problems seeing the postgis layers in QGIS.
Can someone give me an idea of why I can't see the Postgis layers in my new postgres/postgis and QGIS installation?


texts: How can I get the proj4 string or EPSG code from a shapefile .prj file?

texts: I have to work with a shapefile defined in an unusual projection, which my GIS software does not know about. How can I get the proj4 definition or the EPSG code for the projection?


texts: Need help deciding on a database and datatype

texts:
I realize that these questions should probably be directed to a DBA but I feel like you might have some experience in managing the same kind of data.

We have an existing system where we are storing positions in a MySQL server with x & y. Our two main use cases for our data:

Get all positions within a bounding box. Today we only support square areas but we would like to support polygons if it doesn't affect performance to much.
Get all the positions for the last X hours for a specific target.

With a 16 billion row and 600GB table performance is a bit low. We're looking to move to a database better suited for larger datasets. Currently we are looking at PostgreSQL and SQL Server.

Are there any other databases worth looking into? (Both RDBMS and NoSQL)
Are there advantages when using PostgreSQL over SQL Server or the other way around?
Should we continue using integers for x & y or should we be moving to a geom? What are the advantages / performance differences?


texts:
I have been having repeated issues with QGIS 2.18 print composer for OSX High Sierra. The composer seems to continuously stop working correctly, after inserting my map frame red guide lines will appear at random, these won't disappear when using view > clear guides. The composer then seems to lock up and I'm unable to select or move any items on the composer using the mouse, I'm instead forced to move items around by adjusting the x/y coordinates which is extremely inconvenient.

Has anyone else encountered such an issue? I have uninstalled and re-installed several times but to no avail.


texts:
How to open .grd raster layers in QGIS (or any other GIS)?

I have looked through previous questions, but not found any answer. My raster layers are outputs from running bfastSpatial in R and I can't seem to open them in QGIS. I have also been unsuccessful in converting the format to .tif so I am hoping there is some other option.


texts: Performing Definition Query Based on Related Table?

texts:
I have a point dataset (SDE Feature Class) of locations in a city that receive inspections. I also have a table of data (File GeoDatabase Table) where there are many inspections for each point. I have created a relate between the two in ArcMap and want to perform a definition query on the points to filter them based on the results of these inspections. After struggling and researching for a while it seems that Relates don't allow this type of functionality.

Can anyone indicate how I might filter the spatial data based on the related table?


texts: registering or unregistering as versioned a future dataset with python

texts:
As you know, you can store feature classes in arcsde in two ways.

Firts, in the root path: sde_conn_file.sde/FeatureClass

Second, in a dataset: sde_conn_file.sde/DataSet/FeatureClass

How can I register as a versioned the feature class that given second example?

I tried the code given below but, it doesn't work.

    FCList = arcpy.ListFeatureClasses("*","All","DATASETNAME")
    for fc in FCList:
        arcpy.RegisterAsVersioned_management(fc,"NO_EDITS_TO_BASE")


texts: How to set label color with setCustomProperty in QGIS2?

texts:
I can set most font properties like this:

layer.setCustomProperty("labeling", "pal")
layer.setCustomProperty("labeling/enabled", "true")
layer.setCustomProperty("labeling/fontFamily", "Noto Sans")
layer.setCustomProperty("labeling/fontSize", "10")
layer.setCustomProperty("labeling/isExpression", True)
layer.setCustomProperty("labeling/fieldName", "title")
layer.setCustomProperty("labeling/placement", "0")

But not font color. I've tried various ways of specifying the color:

layer.setCustomProperty("labeling/fontColor", "red")
layer.setCustomProperty("labeling/fontColor", "#ff0000")
layer.setCustomProperty("labeling/fontColor", QColor(255,0,0,255)

Surely there is a custom property for font color?


texts: losing resolution when using FME Webmaptiler

texts:
I'm new to using FME and could use some help. I'm trying to take a Geotif image and tile it up into pngs using webmaptiler.

The issue I'm having is that the png tiles look pretty poor in quality/resolution when compared to the original Geotif quality.

It appears that I am generating data in perhaps 8bit or something?

I have a maintenance/support agreement with Safe, and I've submitted several support requests, and have yet to hear back from them. Hopefully this is something pretty simple that some of the experts here can assist me with.


texts: Algorithm: move a source polyline to a reference polyline (completely or maybe partially)

texts:
In our system, there're the requirements that we want to move some source lines (with low precision) to reference lines (with high precision). Following pictures gives the normal use cases. The red one is a source line and the blue one is a reference line.

For this case, the source line would be moved partially, and the result would be as the green line shows:

There're situations that the source line need to be moved completely.

Result:

Currently our solution is to project head/end point of the source line to the reference line and vice versa, then find projected points on the source and reference line. With these projected points, we can extract the needed part of the source and reference line and then combine them into a new one.

This works for most cases, but there are cases that this method does not work. Specifically, when either of the line has "C" like shape or the head point is very close to the end point. The next two pictures gives the scenario.

Applying my algorithm, we get the result:

In a way it's understandable because the current algorithm just finds projected points and extracts lines.

What we expected is something like this:

So what I need more robust algorithm to do this so that it can also handle special cases like the preceding one. I have tried to project every points from a line to another and to find the two projected points that closest to the head/end point of the projected line, but there was no luck. Still I can find cases that give unexpected results.

Has anyone come across similar problems before? It would be also great if there is a software or library can do similar job. Any answer will be appreciated.


texts: QGIS Slow Rendering of ArcGIS Feature Server Layer

texts:
I am trying to use the following layer in QGIS:
https://services1.arcgis.com/JZM7qJpmv7vJ0Hzx/arcgis/rest/services/DRAFT_WWNP_Riparian_Woodland_Potential/FeatureServer/0

I have added it as an ArcGIS Feature Server Layer but it doesn't draw/draws slowly compared to in ArcMap/ArcPro. Are Feature Server Layers like this not a good idea to use in QGIS?


texts: Getting less calculated area after merging/dissolving polygons

texts:
After I merge/dissolve polygons together, the area I calculated using the field calculator seems to decrease, in comparison to the calculation of each individual area and then summing it up.
Can somebody tell me why this is happening?
I am using the same projection (Europe equal distant EPSG: 102031) and the same method $area in the field calculator.


texts: Why does Driving distance of pgRouting return disconnected results?

texts:
I am trying the driving distance function of pgRouting 2.0 beta, with an extract of OSM data.
The problem i have is illustrated on the following image :

On this picture i try to get all the ways accessible in 5 min from the downtown of the small city. For this purpose, i use the driving distance function. Clearly, the result is not ok : ways that should be returned are not, ways that shouldn't are (and far away from the area).

I'm pretty sure it's a problem during the creation of the topology, so I've tried various tool to import data and create the topology :
- osm2postgis, osmosis + pgr_createTopology function of pgRouting
- osm2po
With exactly the same kind of problem each time.

I've changed the tolerance of disconnected edge of the pgr_createTopology function and tried a large range of values, without success.

I haven't many experience in GIS, postgis and pgrouting, i would be very pleased if you have some tricks or an idea about the problem !

Thank you for your help !

Xavier

(I'm using postgis 9.2 + pgRouting 2.0 beta)


texts:
Use geoserver rest interface to create a style,param like below
url:http://localhost:8080/geoserver/rest/workspaces/qgisImport/styles
Content-Type:application/vnd.ogc.se+xml;charset=UTF-8
body:
...

<se:OnlineResource xlink:type="simple" xlink:href="ttf://ESRI Default Marker"/>

...
with a result:

java.lang.RuntimeException: Parsing failed for href: java.net.URISyntaxException: Illegal character in authority at index 6: ttf://ESRI Default Marker

what can I do?


texts: How to collect polygon features as one polygon in PyQGIS?

texts:
I want to collect polygon features from my layer to create one polygon features by considering the field attributes. I mean in attribute table if "DN" value of feature is 1000 that feature will be selected. After that all selected features should be treat as one polygon. I want to make it on the same layer without creating another layers etc. Is it possible by using pyqgis?

The selected features should be one polygon feature.


texts: Loop in ModelBuilder for compositing bands of multiple Images

texts:
I'm attempting to automate the "Composite Bands" tool somehow in ModelBuilder, but haven't been able to figure out an effective method.
I have landsat 7 data that is separated into folders and each holds 7 bands (tif).  Basically I want to generate a model or script that composites all bands in the raster output for each location, and then saves the result in a output folder.
I've prepared a ModelBuilder that take each band and save it in its correspondent folder. However, the input raster just read 1 band, not all 6 bands. Any Solutions, maybe Python?


texts: QGIS how to merge a linestring layer and a point layer into a multigeometry layer

texts:
I have two layers:

Layer1 is point type.
Layer2 is linestring type.

I need to obtain one unique layer merging both layers. Of course, it will need to be multigeometry type.


texts: Change display of a shapefile to draw the smaller polygons in front of the bigger ones

texts:
I have a polygon shapefile, with overlapping elements. Currently, QGIS displays the biggest one on top of the others, which hides the smaller ones behind.

Is there a way to change this behaviour and make the bigger polygons go to the back, while raising the smaller ones to the top?


texts: CartoDB layer not showing up on over mapbox layer but legend is

texts:
Currently, the legend is only displaying but not the layer.

NOTE: I am trying to run the web map on a bootstrap modal, hence you will see: $('#webmap-modal').on('shown.bs.modal', function() in the code I am posting.

With that being said, here is the code:

var map;

$('#webmap-modal').on('shown.bs.modal', function() {
  L.mapbox.accessToken = 'pk.eyJ1IjoiaXRzbXNkIiwiYSI6ImNpaGU1cGRycDBqb290dGx6aGFkcDd4ODMifQ.21JHrd2HAFyrCxa4XLF7rQ';
  map = L.mapbox.map('map', 'mapbox.light', {
    minZoom: 3
  }).setView([60.751723, -105.907315], 3);

  L.control.scale().addTo(map);

  L.tileLayer('', {
    attribution: 'Created by Kam',
  }).addTo(map);

  var cdb_layer = cartodb.createLayer(map, 'https://itsmsd.cartodb.com/api/v2/viz/00873ec2-94ab-11e5-8e1b-0e3ff518bd15/viz.json')
    .addTo(map);

  L.control.layers({
    'Grey Canvas': L.mapbox.tileLayer('mapbox.light').addTo(map),
    'Street Canvas': L.mapbox.tileLayer('mapbox.streets'),
    'Emerald Canvas': L.mapbox.tileLayer('mapbox.outdoors'),
    'Dark Canvas': L.mapbox.tileLayer('mapbox.dark'),
    'Simple Canvas': L.mapbox.tileLayer('mapbox.streets-basic'),
  }).addTo(map);
});

  <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">
  <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css" />

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

  <link rel="http://cartodb-libs.global.ssl.fastly.net/cartodb.js/v3/3.15/themes/css/cartodb.css" />

Also, if it helps, I can zip the files and provide a downloadable link to.


texts: GDAL raster is rotated/flipped incorrectly

texts:
I am producing a raster file in python. However, the rasters are incorrect: they appear to be rotated 90° clockwise. I have provided sample code and results to illustrate the problem.

This is basically how I wanted my raster to look like (using his2d).

But the raster, when opened in Qgis, looks like this:

As you can see, it seems to be rotated 90 degrees clockwise. Below is an example of the code I am using. Note I have just created random data because the actual data is much larger. I am not using a specified coordinate system.

import numpy as np
import matplotlib.pyplot as plt
from scipy import stats
from osgeo import gdal

# X-coordinates (in meters)
dataX = np.random.uniform(-50,50,100)
# Y-coordinates (in meters)
dataY = np.random.uniform(-50,50,100)
# some other variable
dataZ = np.random.uniform(-50,50,100)

# cell dimensions
binWidth = 4
binLength = 20

# min/max coordinates
xMin = min(dataX)
xMax = max(dataX)
yMin = min(dataY)
yMax = max(dataY)

# create histogram to compare with raster
plt.hist2d(dataX, dataY, bins = [np.arange(xMin, xMax+binWidth, binWidth), np.arange(yMin, yMax+binLength, binLength)], weights = dataZ)

# binning
statistic,x_edge,y_edge,binnumber = stats.binned_statistic_2d(dataX, dataY, dataZ, 'mean',bins = [np.arange(xMin, xMax+binWidth, binWidth), np.arange(yMin, yMax+binLength, binLength)] )

# get number of rows and columns
nrows,ncols = np.shape(statistic)

# create the raster
geotransform=(xMin,20,0,yMax,0, -4)
output_raster = gdal.GetDriverByName('GTiff').Create('testRaster.tif',ncols, nrows, 1 ,gdal.GDT_Float32)
output_raster.SetGeoTransform(geotransform)
output_raster.GetRasterBand(1).WriteArray(statistic)
output_raster.FlushCache()

plt.show()

I have played around with the 'SetGeoTransform' parameters (I am assuming this is where the problem is) multiple times but none of my attempts have gotten the desired results. For example, switching the pixel sizes by setting  geotransform=(xMin,4,0,yMax,0, -20), yields the following result:

What exactly am I doing wrong ?


texts:
Forgive my newbness, but how do I get the .NET ArcGIS SDK?  I can't access any of the ArcGIS templates when I create a new project in Visual Studio.

I'm using Visual Studio 2010, SP1 and ArcGIS 10.1.

I'm VERY green WRT to programming with ArcObjects and I think I'm missing something really simple!


texts:
I have a DEM that includes bathymetry and terrain elevation and I would like to split it at the coastline. Ideally, I would end up with one tif that's land and one tif that's bathymetry.

I have searched for this feature in GDAL commands and in QGIS but I can't find anything that extracts based on an elevation range.


texts: ArcMap crashing when plotting features with matplotlib few times via Python AddIn?

texts:
I made a 3D line plot Python add-in with matplotlib for ArcMap.

After I execute this tool 3-4 times, ArcMap crashed. I have also executed it in the Python window, but the situation is just the same.

Here is the code:

import arcpy
import pythonaddins
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from mpl_toolkits.mplot3d.art3d import Poly3DCollection

class ButtonClass1(object):
    def __init__(self):
        self.enabled = True
        self.checked = False
    def onClick(self):
        fig = plt.figure()
        ax = fig.add_subplot(111, projection = '3d')

        # plot line
        def plotWireframe(x,y,z,c):
            ax.plot_wireframe(x,y,z,color=c)

        mxd = arcpy.mapping.MapDocument("CURRENT")
        arcpy.mapping.ListLayers(mxd)
        layers = arcpy.mapping.ListLayers(mxd)
        select_layers = [str(i.name) for i in layers if arcpy.Describe(i.name).fidSet]

        numOfLayer = 0

        for fc in select_layers:
            if numOfLayer%3 == 0:
                color = (0.1, 0.2, 0.5)
            elif numOfLayer%2 == 0:
                color = (0.5, 0.8, 0.5)
            else:
                color = (0.6, 0.2, 0.1)
            numOfLayer = numOfLayer + 1

            desc = arcpy.Describe(fc)
            geometryType = desc.shapeType

            if geometryType == 'Polyline':
                for row in arcpy.da.SearchCursor(fc, ["SHAPE@"]):
                        for part in row[0]:
                            x = []
                            y = []
                            z = []

                            for pnt in part:
                                x.append(pnt.X)
                                y.append(pnt.Y)
                                if pnt.Z == None:
                                    z.append(0)
                                else:
                                    z.append(pnt.Z)
                                plotWireframe(x,y,z,color)
            else:
                print fc, "is not Polyline"
        plt.show()

I guess the problem might caused by:

Memory problem: but it happened even I only select one feature (polyline) to plot.
The python GUI may not play well with ArcMap

The version information is as follows:

ArcMap 10.2, 10.5 and 10.5.1 (both got the same crash)
matplotlib version 1.5.2
(a build-in module in ArcGIS)

Has anyone using matplotlib in ArcMap encountered a similar problem?


texts: How can I avoid map size and scale changes in print composer?

texts:
I set up a print composer for an area of my map.
I'm exporting it as a series of pdfs (with different layers turned on) and over-laying the pdfs in corel.
All of a sudden, my map window changed size and scale and I have no idea what I did.
I tried undo but it didn't alter the new window, just undid the various layer changes that I had made.

I tried quitting without saving, but it seems to have auto saved.
Can someone guess what may have happened and tell me how to avoid it happening again?
I'm unable to replicate the exact area now and even when I type in the same scale, it exports slightly differently than it did.

We are getting ready to switch across to Qgis and this sort of exporting is something I do easily and reliably with our very old mini GIS. I do this regularly and need to know how to avoid this issue in the future.

I was using QGIS 2.16.1, I inserted a map window into print composer and set the scale and was exporting images from it. The map window suddenly changed size and scale, with no clear cause, and I could find no way to set it back.

What can make the map window change size and scale? Perhaps a key combination that I may have pressed while I was editing the layers in the main window?


texts: How to choose between Markers and Features for drawing Openlayers objects?

texts:
Yesterday I was trying to create first mock-ups of my GPS tracker interface, and was exploring the available OpenLayers objects for drawing on a map.

I began with simple task - placing a marker on a map, on a Markers layer. I added the appropriate image to the marker, learned how to move it on a map, and added a Popup to the onclick event that opens additional info about that marker. Works great. Since I wanted this marker to represent the vehicle, the next step was going to be to populate the content of the marker's Popup using AJAX. When the onclick event occurs I'll send the marker's ID to my python script, fetch the latest data from my postGIS database and update the marker and it's popup appropriately.

But then I saw in the OpenLayers documentation that markers don't have ID attribute, and that I'll probably have to end up using vector or feature object. OK, both of them have id attribute and createMarker methods, so I'll easily transfer my Markers into Features/Vectors. After that I saw an example on the web where someone just initializes id attribute to the marker like this:

marker = new OpenLayers.Marker(new OpenLayers.LonLat(90,10),icon.clone());
marker.id = 353;

And it works fine, I can now add various attributes to my markers and use the as needed. For example:

marker.id = 353;
marker.popups_id = 382;
marker.data = "Marker for a vehicle";

So, after I've done what I wanted in the start I started wondering - what are the main reasons for these 3 different Classes if I can take Marker and fill it with various data to make it look like a feature. Am I doing it wrong, is there a better approach? It seems to me that I could create my map objects using Markers only, but I don't want to regret that later if I hit it's limits. Are there any size/performance limits and recommendations when to use Markers and when Features or is it all based on testing and refactoring as needed?

Just to add, my application will be a simple GPS tracker. So I'll be using OpenLayers to display objects, move them, animate them, show their properties and similar tasks. I'll have to support having minimal 300 active objects on a map in the same moment, and refresh their coordinates at least every 15seconds.

TIA for all your advices that could possibly lead me in the right direction of creating the effective interface for my application.


texts:
I have one raster file (Cloud Optimized Geotiff) in AWS S3 bucket.
And I want to mapping as a raster tile source using Mapbox GL JS.
How can I get the my Cog's tile url..?
Should I use tile server?? or Can I get the tile url from an existing Source Code??
my raster file https://bucket.s3.ap-northeast-2.amazonaws.com/test.tif
I want to get this format https://url/{z}/{x}/{y}.png


texts: Is there an alternative to Spatial Join that does not create a new feature class?

texts:
I'm looking to write a script for a tool similar to Spatial Join. Where two features intersect, the target layer will have one of its fields updated based off of the same field in the source layer. Spatial Join creates a new feature class with a new field that is populated by the join. I want a tool that just grabs a value from a particular field in fcA, selects the feature(s) in fcB that intersect fcA, and then updates a field in fcB based on the related field in fcA.

My question is, is there another similar tool that I am unaware of? The use case of such a tool would be with a telecom dataset where a line (cable) intersects a point (pole), and then the cable gets the route value from the pole. I want to write this tool but don't want to take the time if there is already one out there. I also don't want a new feature class like is created when using Spatial Join. I'm working with ArcGIS.


texts:
I have been using a third party ArcGIS tool called Landscape Fragmentation Tool.  I originally had some troubles getting it to work correctly.  Approximately 3 weeks ago I thought I had resolved those issues and understood how to prevent any error messages and an incomplete execution of the tool.
However, I am now back in the position where I cannot make this tool work anymore.

I keep getting this error:

  Executing: Landscape_Fragmentation_Tool NLCD_reclass_bfpads1 90 C:\Users\Beth\Documents\ArcGIS\lftmod\landfragmod.gdb C:\Users\Beth\Documents\ArcGIS\lftmod\landfragmod.gdb\lfttestsat

  Start Time: Sat Oct 12 18:00:14 2013

  Running script Landscape_Fragmentation_Tool...

  OUTPUT DATASET NAME IS:
  C:\Users\Beth\Documents\ArcGIS\lftmod\landfragmod.gdb\C:\Users\Beth\Documents\ArcGIS\lftmod\landfragmod.gdb\lfttestsat

  DATA EXTRACTED FROM LAND COVER

  EDGE FRAGMENTATION IDENTIFIED

  INTERIOR, PATCH, AND PERFORATED FRAGMENTATION IDENTIFIED

  CATEGORIZING CORE FOREST PATCHES...

  File "C:\Users\Beth\Documents\Landscape_Fragmentation_SA\Landscape_Fragmentation_SA\LFT_SA_Arc10.py", line 334, in

arcpy.ASCIIToRaster_conversion (fragMap_6c, FragMap, "INTEGER")

  : ERROR 000875: Output raster: C:\Users\Beth\Documents\ArcGIS\lftmod\landfragmod.gdb\C:\Users\Beth\Documents\ArcGIS\lftmod\landfragmod.gdb\lfttestsat's workspace is an invalid output workspace.

  ERROR 000581: Invalid parameters.

  Failed to execute (ASCIIToRaster).

  Completed script Landscape_Fragmentation_Tool...

  Failed to execute (Landscape_Fragmentation_Tool).

  Failed at Sat Oct 12 19:02:49 2013 (Elapsed Time: 1 hours 2 minutes 35 seconds)

The tool creates a temporary workspace folder and the intermediate steps are stored in this folder.


texts: Using the height of river to approximate its extreme flood boundaries - terrain analysis in QGIS?

texts:
Using QGIS I'm trying to analyse an area/DEM with this criteria: - heights 10 meter above the river-centerline in both sides of river.

I can do it with the calculation of contours (2m) from DEM and geting the hights of the river-centerline and manually try to draw a line(vector) 10 meters higher than River-Centerline heights (see image below) . But I can't figure out an easy way to filter the boundary area in which the water level of extreme flood cannot reach that hight.

Anyone have any ideas or thoughts on this problem?


texts: Is it possible to display filtered results on OpenStreetMap?

texts:
is it possible to goto www.openstreetmap.org and do a search for a place like Auckland (New Zealand) or Melbourne (Australia) -but- only show Cities or Neighbourhoods or Suburbs?

I understand that it's possible to use filter tags to filter results .. but does this work on the main website? or is it only used for downloading data.

if it's for downloading data .. can someone please link to some information about how to do the following

Neighbourhoods in NZ
Cities in NZ

NOTE: This is related to these (here and here) previously asked GIS questions.


texts: How to extract a specific country boundary data from a GeoPandas dataset

texts:
I want to extract Singapore country boundaries from 'naturalearth_lowres' dataset from GeoPandas.
world_filepath = gpd.datasets.get_path('naturalearth_lowres')
world = gpd.read_file(world_filepath)
world.head()

This is the world boundaries DataFrame from which I want to extract "Singapore" country boundary.


texts: Split intersections of lines considering bridges and tunnels

texts:
I want to make a road network routable. I already have a road shapefile, but there are many intersections of lines that I want to split. Now I have two problems:
(1) My first approach to split them was to use the "split with lines" tool from QGIS. But the new shapefile contains empty attributes. I don't understand why. I changed the multi-part lines to single-part lines, but I still have the problem.
(2) Even if the "split with lines" tool would work, I have some bridges and tunnels. How can I exclude these from the split?
I am working with QGIS and ArcGIS (basic license). This is what my data looks like, which is from OpenStreetMap. The red circle shows an example where two roads cross, but the lines are not separated, even though the attribute table says they are neither bridges nor tunnels.

UPDATE:
I'll try to make my problem clearer. On the image below is my current network with bridges and tunnels from OSM. Some roads intersect and at most of these intersections the lines are split (red nodes). But some are not (see number 1 on the image). Now I want to split all these lines without splitting the lines over bridges or tunnels (number 2 on the image).
The lines have to be separated for my further work with the attribute table, because each line segment should contain different attributes. In the end, the network will contain information about road properties and more. In addition, it should be routable, which is why OSM is used as a data basis.

I found a solution for my first problem. Instead of "split with lines" I used the GRASS tool "v.clear". This is what happened. All intersections were separated, but but of course also at the bridges. Any ideas on how I can prevent this?


texts: Rendering 10MB KML file coordinates data on OSM map throws stop running script error in OpenLayer.js file

texts:
I am trying to render the KML file having 18000 line string data on OSM map using OpenLayers HTTP strategy.

To render OSM  map I am using GeoExt.MapPanel and ExtJS 3.4 viewport.

The problem I am facing is the stop running script error on page and in IE8 hang the PC and browser.


texts: Cannot spatially select from Oracle view based featurelayer in ArcMap

texts:
I'm hoping someone has seen this before and has a solution.  I've exhausted all  my ideas.  I having problems with the selection and identify tool in ArcMap.

I have a point feature class, zlevels, and an Oracle spatial view, sv_zlevels, created from zlevels.  I've created a new map in ArcMap 9.3 and added both of them in. When I use the Identify tool and Select Feature tool on the original feature class layer, it works fine.  When I try to do the same on the view layer, I get no results.  I've checked that it is selectable, and that it can Identify from All Layers.  The layer draws fine.  I can change its symbology and labeling.  I can Select By Attribute under the Selection menu but I get no results back when I do a Select By Location.  Its like its not there. If I do the same Select By Location on the original feature class, it works fine.  I have the same set up with a polyline feature class, streets, and I don't have any problems with it.  Streets and zlevels came from the same place - NAVTEQ.  The weird thing is the zlevels had been working.  I can't pinpoint exactly when it stopped since I'm not always working directly in ArcMaps.  And I've had this happen before with zlevels.  I restarted my machine and it seemed to work after that but that may have been a coincidence.  Other have the same problem on their machine when trying to select from sv_zlevels.

What I've tried with no success:

*Dropping and recreating the view in Oracle

*Restarting my machine

*Restarting the server and re-registering the spatial views

Has anyone ever experienced something like this before?

We are running ArcSDE 9.3.1 with Service Pack 1 and ArcGIS Server 9.3.1 with Service Pack 1.  Our version of Oracle is Oracle 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production.  At the end of the week we are going to be updating everything.


texts:
I am adding a number of strings together to create a linestring but as such I need spaces between the initial XY values and the end XY values, plus a comma in between the two halves.

Should result in LINESTRING(97763.88319  434314.9609 , 97620.90369  434175.115)
but the space is not recognized like it would be in excel
I don't want to make another attribute which only holds a space to then include it as a variable.

This is the expression I used:

concat("LINESTRING(", "X", " ", "Y", " , ", "newX", " " , "newY")


texts: How to use QgsGeometry.fromMultiPolygonXY(mp: QgsMultiPolygon). Error when passing in multipolygon

texts:
I am trying to create a QgsGeometry object to pass to a feature by using the fromMultiPolygonXY method. I have successfully constructed a QgsMultiPolygon, but I am getting an error saying an unexpected type of QgsMultiPolygon.
mp = QgsMultiPolygon()
mp.fromWkt(binary.wkt)
print(mp.geometryType())
geom = feat.geometry()
geom.fromMultiPolygonXY(mp)

Output in QGIS map


texts: Transform an Irish grid reference (29903) into UK grid reference (27700) on insert

texts:
I have an insert script to input several hundred points, however some of the points use the Irish Grid Reference system. I have separated these out however was unsure how to convert or transform? these into 27700 on insert. I have the line below that grabs the UK reference, and the POST_GIS column is set to 27700.

st_geomfromtext('POINT(" . addslashes($data[6]) . ")',27700)


texts: Reflecting expression based label format in QGIS composer legend?

texts:
I successfully formatted a label background color based on a CASE expression (linked to the Border color property):

CASE WHEN  "NextStep"  =  'closed'  THEN
color_rgb(0,0,255)
ELSE color_rgb(255,0,0)
END

However, when creating the composer, this distinction of label background color is not reflected...

The only categories that are listed in the legend is based on the style categories.

What do you suggest to get a clear legend taking into account the various label format based on specific expression?


texts: What is difference between GeoTIFF and Esri ASCII grid file formats for SRTM data?

texts:
what is the difference between the ArcInfo ASCII format and the geotiff file format when downloading the SRTM data.

I downloaded the tiles (21) for the Tibetan Plateau and imported thme into ArcMap 10. It looks quite different. The ArcInfo ASCII looks like a puzzle and the geotiff ones are very grey... but no puzzle. Has anyone an idea?


texts: Downloading Sentinel images from Copernicus Scihub?

texts:
I've been trying to download a Sentinel-1B image from Copernicus off and on for a couple weeks. I can never get the download to complete; in fact, it rarely gets about a couple percent. I've tested my internet connection and download speeds, and also tried at different times during the day/night. I think the issue might be on their end.

If anyone else is having difficulty downloading from Scihub, is there an alternative source for free Sentinel images?


texts: Can QGIS load a georeferenced (skewed) raster from PostGIS database?

texts:
Summary
I can't load a georeferenced/skewed raster in QGIS if it is stored in a PostGIS database.
Problem Details
For some reasons, I need to create a skewed raster in a PostGIS database, and use it in my custom application. Firstly, I can create a raster in PostGIS like this:
create table grids(
    rid serial primary key,
    rdata raster
);
create index idx_grids on grids using gist(ST_ConvexHull(rdata));

-- Parameters: width, height, upperleft-x, upperleft-y, scale-x, scale-y (almost always negative), skew-x, skew-y, EPSG
insert into grids(rid,rdata)
values (1, ST_MakeEmptyRaster(1000,2000,690000.5,4299999.5,12.5*sqrt(2),-6.25*sqrt(2),-6.25*sqrt(2),-12.5*sqrt(2),4509)

update grids
set rdata=ST_AddBand(rdata, '32BSI'::text, 128)
where rid=1;

It should produce a raster that's square, but rotated by 45 degrees.
Then, I could draw a small rectangle by using ST_SetValues:
update grids set rdata=ST_SetValues(rdata,1,200,200,50,50,255)

But when I load the raster into QGIS, the raster is shown upright rather than skewed.
I'm using QGIS 3.14.16 and PostgreSQL 12/PostGIS 3.0 under Windows 10 2004.
Is that the limitation of QGIS itself or its underlying libraries like GDAL? Or if there's anything wrong with my SQL syntax?


texts: Help with "projected XY to screen xy" conversion algorithm?

texts:
I'm trying to convert coordinates from any given coordinate system (be they the coordinates of a graph figure or a map, meaning they can span across both negative and positive values across any of the four +- quadrants), over to screen coordinates. I also want an easy way as part of the solution to be able to zoom to a small area within the coordinate system.

I already tried an algorithm of my own, which was overly complicated and would fail on occasion (for simplicity I have now removed it from the post).

Update

Thanks to the helpful answers below, especially by Martin F, I now have a solution that works as expected with all types of coordinate systems, be they drawing, geographical, negative, flipped, etc. Specifically this has been a great addition to three Python libraries I've been working on: for autozooming to a geographical entity in Shapy, for drawing any kind of coordinates on an image in PyDraw, and for map zooming in GeoVis.

Martin's answer describes the theoretical ideal of how to do it, but here's how I did it for my case. The user specifies the topleft and bottomright xy corners in the coordinate system of their data which they want to appear in the same corners on a graphical image, thus allowing zooming and flipping sides/updown. In my case the graphics drawer has its 0,0 coordinate in the topleft corner. To prepare the equation I just needed a single scalex/y variable.

Update2:

I also added how I constrained the dimensions to keep them the same size, which can be useful in many cases.

#input
IMG = ...
XLEFT,YTOP,XRIGHT,YBOTTOM = ...
CONSTRAIN = True

#constrain dimensions to avoid distortion
if CONSTRAIN:
    xwidth = max(XLEFT,XRIGHT) - min(XLEFT,XRIGHT)
    yheight = max(YTOP,YBOTTOM) - min(YTOP,YBOTTOM)
    if xwidth > yheight:
        YBOTTOM = YTOP+xwidth
    elif yheight > xwidth:
        XRIGHT = XLEFT+yheight

#prepare scale values
imgwidth = float(IMG.width)
imgheight = float(IMG.height)
scalex = imgwidth / (XRIGHT - XLEFT)
scaley = 0 - imgheight / (YTOP - YBOTTOM)

With that, the coordinate conversion of inx and iny is calculated as:

newx = scalex * (inx - XLEFT)
newy = imgheight + scaley * (iny - YBOTTOM)


texts: Changing thousands separators from comma to space in measured grids of ArcMap?

texts:
In ArcMap it is easy to include commas as thousands separators on a measured grid, as can be seen in the screenshot below, but I have not been able to find a way to change the separator used from being a comma to a space instead.

There does not seem to be an Advanced ArcMap Setting to do it, and I have looked for, and not found, an ArcGIS Idea for this either.

Is there a way to do it that I am overlooking?


texts: Split the column into several and unpivot the columns

texts:
I currently have 2 columns NOM_CONCAT and Number of concat(COUNT_RSF_)
which is composed of" concat "from 0 to 5
A1, B1, C1 ...

A2

A3, B3

.
.

My goal and to separate the column NOM_CONCAT in several columns under PyQGIS
except that this does not mean this to separate.
Without hiding, the end goal is to rotate the generated columns.
from PyQt5.QtCore import *
from qgis.core import *
from qgis.PyQt.QtCore import QVariant
uri="C:\impression_plan\mini\RSFFicheCanalisation.shp"

v1= QgsVectorLayer(uri, "RPG_grille_2018", "ogr")
all_features = v1.getFeatures()
v1.startEditing()
pr = v1.dataProvider()
#l=1
idx = v1.fields().lookupField('COUNT_RSF_')
idmax =  v1.maximumValue(idx)

print(idmax)
v1 = iface.activeLayer()
fieldindex = v1.fields().indexFromName("NOM_CONCAT")

v1.startEditing()
for feat in v1.getFeatures():

    if feat[fieldindex]:
        fields = feat[fieldindex].split(', ')
        print(fields)

        for i in range(1, len(fields)):

            feat[fieldindex + i] = fields[i - 1]
            v1.updateFeature(feat)
    else:
        continue
v1.commitChanges()

QgsProject.instance().addMapLayer(v1)
v1.updateFields


texts: Does QGIS support WMS/WCS Connections that use path variables?

texts:
With QGIS, I have added and configured WMS and WCS connections for parameter queries as per the applicable specifications and I am able to add the layers and view imagery. However, I have a need to make this work with path parameters requests (or path variable requests), such as:
http://127.0.0.1:8081/gis-server/WMS/getcapabilities/CF/{id}/{time}

In this GetCapabilities request, {id} is an application specific identification string and {time} is the time associated with the desired image. This actually works for WMS. QGIS makes that GetCapabilities request, then figures out the right call to make a valid GetMap request, and QGIS receives imagery. However, I have not been able to get this to work for WCS with a similar request, such as:
http://127.0.0.1:8081/gis-server/WCS/getcapabilities/CF/{id}/{time}

The GetCapabilities request works, but then QGIS fails to make the correct DescribeCoverage call. So, I've not been able to find anything in SPECS regarding URLs and path parameters, yet it works for WMS ... ? Does anyone else use URLs with path parameters as above? If someone does something similar, then do you have any guidance on how to make this work for WCS?


texts: Using more than one ST_function in one query

texts:
I have got stuck with a dynamic analysis that I would like to include in a project I am working with. I want to save the query in the project file or make it to a view in my database. I have tried a couple of combination without success so far, but I am on a SQL learning curve =).

I would like to combine the queries below so that my ST_buffer is used in the same query as the layer where building.geom need to be completely inside.
Is this possible?

SELECT
    event_point.id,
    event_point.geom,
    st_buffer(event_point.geom, 100) AS "Buffer",

FROM public.event_point

SELECT
    building.id
    building.address
FROM
    building, "Buffer"
WHERE
    ST_within(building.geom, "Buffer".geom)


texts: How to batch-mask (multiply) multiband raster with mask of different cell size?

texts:
I have a multiband GeoTIFF raster of certain cell size and a binary GeoTIFF mask (1 or no-data, but can be recreated differently) with different cell size. I need to mask the raster such that only pixels "under" mask pixels are data (others thus become no-data). Both the raster and mask are same EPSG:4326 and overlay, the mask's extent is only a fraction of the raster.
GDAL (Python) attempt
gdal_calc.py, which does not work, since the raster happen to have different cell sizes.
Rasterio attempt
I tried masking with rasterio, which requires raster to have same extent. I thus first converted the mask extent to Shapely.geometry.box, clipped the raster but bumped to the same problem as in GDAL.
QGIS attempt
I tried multiplying the raster and mask in QGIS native Raster Calculator, which works (despite the variable cell size), but is difficult to batch, since the raster is multiband. I do not properly know PyQGIS yet, but could adopt and tinker with a solution.