|
35 | 35 | ) |
36 | 36 | from tipg.errors import MissingGeometryColumn, NoPrimaryKey, NotFound |
37 | 37 | from tipg.resources.enums import MediaType |
38 | | -from tipg.resources.response import GeoJSONResponse, SchemaJSONResponse |
| 38 | +from tipg.resources.response import GeoJSONResponse, SchemaJSONResponse, orjsonDumps |
39 | 39 | from tipg.settings import FeaturesSettings, MVTSettings, TMSSettings |
40 | 40 |
|
41 | 41 | from fastapi import APIRouter, Depends, Path, Query |
@@ -781,7 +781,7 @@ async def items( # noqa: C901 |
781 | 781 | # NDJSON Response |
782 | 782 | if output_type == MediaType.ndjson: |
783 | 783 | return StreamingResponse( |
784 | | - (orjson.dumps(row) + b"\n" for row in rows), |
| 784 | + (orjsonDumps(row) + b"\n" for row in rows), |
785 | 785 | media_type=MediaType.ndjson, |
786 | 786 | headers={ |
787 | 787 | "Content-Disposition": "attachment;filename=items.ndjson" |
@@ -892,7 +892,7 @@ async def items( # noqa: C901 |
892 | 892 | # GeoJSONSeq Response |
893 | 893 | elif output_type == MediaType.geojsonseq: |
894 | 894 | return StreamingResponse( |
895 | | - (orjson.dumps(f) + b"\n" for f in data["features"]), # type: ignore |
| 895 | + (orjsonDumps(f) + b"\n" for f in data["features"]), # type: ignore |
896 | 896 | media_type=MediaType.geojsonseq, |
897 | 897 | headers={ |
898 | 898 | "Content-Disposition": "attachment;filename=items.geojson" |
@@ -1016,7 +1016,7 @@ async def item( |
1016 | 1016 | # NDJSON Response |
1017 | 1017 | if output_type == MediaType.ndjson: |
1018 | 1018 | return StreamingResponse( |
1019 | | - (orjson.dumps(row) + b"\n" for row in rows), |
| 1019 | + (orjsonDumps(row) + b"\n" for row in rows), |
1020 | 1020 | media_type=MediaType.ndjson, |
1021 | 1021 | headers={ |
1022 | 1022 | "Content-Disposition": "attachment;filename=items.ndjson" |
@@ -1512,7 +1512,6 @@ async def collection_get_tile( |
1512 | 1512 | return Response(bytes(tile), media_type=MediaType.mvt.value) |
1513 | 1513 |
|
1514 | 1514 | def _tilejson_routes(self): |
1515 | | - |
1516 | 1515 | ############################################################################ |
1517 | 1516 | # ADDITIONAL ENDPOINTS NOT IN OGC Tiles API (tilejson, style.json, viewer) # |
1518 | 1517 | ############################################################################ |
|
0 commit comments