Skip to content

Commit 13ee0d8

Browse files
committed
Modified docs - removed remaining boilerpalte
Signed-off-by: Saif Ul Islam <[email protected]>
1 parent 07947da commit 13ee0d8

File tree

3 files changed

+53
-70
lines changed

3 files changed

+53
-70
lines changed

docs/docs/intro.md

Lines changed: 35 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -31,26 +31,27 @@ Mapillary's Python SDK provides interfaces that remove and abstract away many un
3131
techniques to output an easy to understand and use GeoJSON format. Currently, all the high level interfaces can
3232
be found at `src/mapillary/interface.py`. It contains functions such as,
3333

34-
- `get_image_close_to` -
35-
- `get_image_looking_at` -
36-
- `get_detections_with_image_id` -
37-
- `get_detections_with_map_feature_id` -
38-
- `image_thumbnail` -
39-
- `images_in_bbox` -
40-
- `sequences_in_bbox` -
41-
- `map_feature_points_in_bbox` -
42-
- `traffic_signs_in_bbox` -
43-
- `images_in_geojson` -
44-
- `images_in_shape` -
45-
- `map_features_in_geojson` -
46-
- `map_features_in_shape` -
47-
- `feature_from_key` -
48-
- `image_from_key` -
34+
- `get_image_close_to` - Function that takes a longitude, latitude as argument and outputs the near images.
35+
- `get_image_looking_at` - Function that takes two sets of latitude and longitude, where the 2nd set is the
36+
"looking at" location from 1st set's perspective argument and outputs the near images.
37+
- `get_detections_with_image_id` - Extracting all the detections within an image using an image key.
38+
- `get_detections_with_map_feature_id` - Extracting all detections made for a map feature key.
39+
- `image_thumbnail` - Gets the thumbnails of images from the API.
40+
- `images_in_bbox` - Gets a complete list of images with custom filter within a BBox.
41+
- `sequences_in_bbox` - Gets a complete list of all sequences of images that satisfy given filters within a BBox.
42+
- `map_feature_points_in_bbox` - Extracts map feature points within a bounding box (bbox).
43+
- `traffic_signs_in_bbox` - Extracts traffic signs within a bounding box (bbox).
44+
- `images_in_geojson` - Extracts all images within a shape.
45+
- `images_in_shape` - Extracts all images within a shape or polygon.
46+
- `map_features_in_geojson` - Extracts all map features within a GeoJSON's boundaries.
47+
- `map_features_in_shape` - Extracts all map features within a shape/polygon.
48+
- `feature_from_key` - Gets a map feature for the given key argument.
49+
- `image_from_key` - Gets an image for the given key argument.
4950
- `save_locally` - saving data locally
5051

5152
## The What
5253

53-
## Getting Started
54+
### Getting Started
5455

5556
Get started by **installing the mapillary package**.
5657

@@ -60,26 +61,29 @@ pip install mapillary
6061

6162
Or **try Mapillary immediately** with **[Google Colab](https://colab.research.google.com/drive/1BPWMP5k7QhXFB6nlWckHC1r54vIR0v2L?usp=sharing)**!
6263

63-
## Test Out Interfaces
64+
### Test Out Interfaces
6465

65-
Start by importing `mapillary.interface`
66+
Start by importing `mapillary.interface` as the following,
6667

67-
Generate a new Docusaurus site using the **classic template**:
68+
```python
69+
"""
70+
On importing the interface
71+
"""
6872

69-
```shell
70-
npx @docusaurus/init@latest init my-website classic
71-
```
73+
import mapillary.interface as mly
7274

73-
## Start your site
75+
# And then simply import the desired interface
76+
# For example, like
77+
mly.get_image_looking_at(...)
78+
```
7479

75-
Run the development server:
80+
### Check out more submodules
7681

77-
```shell
78-
cd my-website
82+
Like ths,
7983

80-
npx docusaurus start
84+
```python
85+
import mapillary.config as mly_config # Importing desired configurations
86+
import mapillary.controller as mly_controller # Importing desired controllers
87+
import mapillary.models as mly_models # Importing the used models
88+
import mapillary.utils as mly_utils # Importing utility material
8189
```
82-
83-
Your site starts at `http://localhost:3000`.
84-
85-
Open `docs/intro.md` and edit some lines: the site **reloads automatically** and display your changes.

docs/docusaurus.config.js

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,13 @@ module.exports = {
3030
type: 'doc',
3131
docId: 'intro',
3232
position: 'left',
33-
label: 'Tutorial',
33+
label: 'Documentation',
34+
},
35+
{
36+
href: 'https://colab.research.google.com/drive/1BPWMP5k7QhXFB6nlWckHC1r54vIR0v2L?usp=sharing',
37+
label: 'Demo',
38+
position: 'left',
3439
},
35-
{to: 'blog', label: 'Blog', position: 'left'},
3640
// Please keep GitHub link to the right for consistency.
3741
{
3842
href: 'https://github.com/mapillary/mapillary-python-sdk',
@@ -44,19 +48,6 @@ module.exports = {
4448
footer: {
4549
style: 'dark',
4650
links: [
47-
{
48-
title: 'Learn',
49-
items: [
50-
{
51-
label: 'Style Guide',
52-
to: 'docs/',
53-
},
54-
{
55-
label: 'Second Doc',
56-
to: 'docs/doc2',
57-
},
58-
],
59-
},
6051
{
6152
title: 'Community',
6253
items: [
@@ -77,12 +68,6 @@ module.exports = {
7768
{
7869
title: 'More',
7970
items: [
80-
// Do we want to keep the SDK blog?
81-
// For now, commented out
82-
// {
83-
// label: 'SDK Blog',
84-
// to: 'blog',
85-
// },
8671
{
8772
label: 'Blog',
8873
href: 'https://blog.mapillary.com/',
@@ -163,12 +148,6 @@ module.exports = {
163148
// Please change this to your repo.
164149
editUrl: 'https://github.com/mapillary/mapillary-python-sdk/tree/main/docs',
165150
},
166-
blog: {
167-
showReadingTime: true,
168-
// Please change this to your repo.
169-
editUrl:
170-
'https://github.com/mapillary/mapillary-python-sdk/tree/main/docs',
171-
},
172151
theme: {
173152
customCss: require.resolve('./src/css/custom.css'),
174153
},

docs/src/pages/index.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,31 +18,31 @@ import styles from './styles.module.css';
1818
const features = [
1919
{
2020
title: 'Easy to Use',
21-
imageUrl: 'img/undraw_docusaurus_mountain.svg',
21+
// imageUrl: 'img/undraw_docusaurus_mountain.svg',
2222
description: (
2323
<>
24-
Docusaurus was designed from the ground up to be easily installed and
25-
used to get your website up and running quickly.
24+
The SDK was designed from the ground up to be easily installed and
25+
used to get geospatial data as easily as possible.
2626
</>
2727
),
2828
},
2929
{
30-
title: 'Focus on What Matters',
31-
imageUrl: 'img/undraw_docusaurus_tree.svg',
30+
title: 'Fully Featured',
31+
// imageUrl: 'img/undraw_docusaurus_tree.svg',
3232
description: (
3333
<>
34-
Docusaurus lets you focus on your docs, and we&apos;ll do the chores. Go
35-
ahead and move your docs into the <code>docs</code> directory.
34+
The SDK provides a focus on providing as much ease and utility to the users
35+
as possible, and in helping users be power users if needed
3636
</>
3737
),
3838
},
3939
{
40-
title: 'Powered by React',
41-
imageUrl: 'img/undraw_docusaurus_react.svg',
40+
title: 'Powered by Python',
41+
// imageUrl: 'img/undraw_docusaurus_react.svg',
4242
description: (
4343
<>
44-
Extend or customize your website layout by reusing React. Docusaurus can
45-
be extended while reusing the same header and footer.
44+
Developed with an extensible and easy to use language, Python provides
45+
easy to understand semantics for beginners and advanced users alike
4646
</>
4747
),
4848
},
@@ -80,7 +80,7 @@ export default function Home() {
8080
'button button--outline button--secondary button--lg',
8181
styles.getStarted,
8282
)}
83-
to={useBaseUrl('docs/')}>
83+
to={useBaseUrl('docs/intro')}>
8484
Get Started
8585
</Link>
8686
</div>

0 commit comments

Comments
 (0)