Tag Info

New answers tagged

1

It was right under my nose, and exactly where you'd expect it: In the Extent class there's an expand(factor) method: So, I tried: var extent = graphicsUtils.graphicsExtent(map.graphics.graphics).expand(4) map.setExtent(extent); And it's exactly what I wanted.


6

I've finally solved this for my purposes so here's the solution I came up with if it helps anyone: Write a python script (mine at end of this) which essentially does this: identify the unique categories in the point layer field of interest for each category, select all matching points and establish the extent of this set for each extent generate a new ...


2

Do you want to change the extent of the actual data or just the plot? If it is just the plot you can use ylim and xlim to define the extent of the plot. Create some example data library(sp) x <- SpatialPointsDataFrame(SpatialPoints(cbind(runif(10, -115, -110), runif(10, 30, 45))), data.frame(ID=1:10) ) y <- ...


2

Based especially on your later description of how coverage generally works, you might be interested in computing the minimum bounding geometry for your point data. This will generate a fairly conservative estimate of your AIS coverage (in that it will probably be an understatement of the actual coverage) than your cell based aproach, but it will guarantee ...


2

"Normally" the bbox should be: left, bottom, right, top west, south, east, north minX, minY, maxX, maxY so I would try: bbox: [-1050091.8944356, 4675576.582525099, -990623.88643799, 4733515.8499572] PS: there is a nice BBOX-Cheatsheet: https://github.com/perrygeo/bbox-cheatsheet/blob/master/reference.md Even if OpenLayers/Geoserver is missing there I ...


0

You said that that you clipped them from a larger dataset. Did you rebuild the spatial index on the output shapefiles? Inappropriate spatial indices will cause the type of behavior in ArcMap that you described, wherein you can only view the data at the smallest scale/full extent. In ArcCatalog, right-click the property of each shapefile, go to the Index ...


1

You can listen to the extent changed event and reset it back if it goes outside of the bounds: def extentsChanged(): extent = iface.mapCanvas().extent() outofbounds = # Do your check if outofbounds: iface.mapCanvas().setExtent(newextent) iface.mapCanvas().extentsChanged.connect(extentsChanged)



Top 50 recent answers are included