Skip to content

Commit

Permalink
[FEATURE][needs-docs] Show projection bounds in projection widget (#5356
Browse files Browse the repository at this point in the history
)

- Script to pull bounds from EPSG.org Postgres dump
- Add resources/data/world_map.shp for reference
- Show canvas bounds for reference
  • Loading branch information
NathanW2 committed Oct 16, 2017
1 parent ea95b38 commit cf241f5
Show file tree
Hide file tree
Showing 17 changed files with 7,774 additions and 55 deletions.
31 changes: 31 additions & 0 deletions python/gui/qgsprojectionselectiontreewidget.sip
Expand Up @@ -11,6 +11,7 @@




class QgsProjectionSelectionTreeWidget : QWidget
{
%Docstring
Expand Down Expand Up @@ -51,6 +52,13 @@ class QgsProjectionSelectionTreeWidget : QWidget
option is selected, calling crs() will return an invalid QgsCoordinateReferenceSystem.
.. seealso:: showNoProjection()
.. versionadded:: 3.0
%End

void setShowBoundsMap( bool show );
%Docstring
Sets whether to show the bounnds preview map.
.. seealso:: showBoundsMap()
.. versionadded:: 3.0
%End

bool showNoProjection() const;
Expand All @@ -62,6 +70,14 @@ class QgsProjectionSelectionTreeWidget : QWidget
:rtype: bool
%End

bool showBoundsMap() const;
%Docstring
Returns whether the bounds preview map is shown.
.. versionadded:: 3.0
.. seealso:: setShowBoundsMap()
:rtype: bool
%End

bool hasValidSelection() const;
%Docstring
Returns true if the current selection in the widget is a valid choice. Valid
Expand All @@ -80,6 +96,21 @@ class QgsProjectionSelectionTreeWidget : QWidget
.. seealso:: crs()
%End

void setPreviewRect( const QgsRectangle &rect );
%Docstring
Sets the initial "preview" rectangle for the bounds overview map.
.. versionadded:: 3.0
.. seealso:: previewRect()
%End

const QgsRectangle previewRect();
%Docstring
The initial "preview" rectangle for the bounds overview map.
.. versionadded:: 3.0
.. seealso:: previewRect()
:rtype: QgsRectangle
%End

void setOgcWmsCrsFilter( const QSet<QString> &crsFilter );
%Docstring
filters this widget by the given CRSs
Expand Down
1 change: 1 addition & 0 deletions resources/CMakeLists.txt
Expand Up @@ -4,6 +4,7 @@ INSTALL(FILES qgis_global_settings.ini
DESTINATION ${QGIS_DATA_DIR})
INSTALL(DIRECTORY cpt-city-qgis-min DESTINATION ${QGIS_DATA_DIR}/resources)
INSTALL(DIRECTORY themes DESTINATION ${QGIS_DATA_DIR}/resources)
INSTALL(DIRECTORY data DESTINATION ${QGIS_DATA_DIR}/resources)

IF (WITH_SERVER)
INSTALL(DIRECTORY server DESTINATION ${QGIS_DATA_DIR}/resources)
Expand Down
Binary file added resources/data/world_map.dbf
Binary file not shown.
1 change: 1 addition & 0 deletions resources/data/world_map.prj
@@ -0,0 +1 @@
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]
Binary file added resources/data/world_map.qix
Binary file not shown.

0 comments on commit cf241f5

Please sign in to comment.