0

Here is picture form QGIS. desired results There are three layers. Blue dotted lines are warehouse rack layer. Green one is rack sections layer (routable network, created with pgr_createTopology). And third layer is points (from _vertices_pgr table) with sections names. It is saved as project. And the picture is generated with the command:

qgis-bin-g7.exe --snapshot print_points_wh.png --width 300 --height 1000 --project print_points.qgz --nologo --noversioncheck --noplugins

Layer three data source is table. When I need new plan, I just fill the table with required point ID`s. And then run command above. The problem is that a GUI is required.

Then I tried to generate image with PostGIS tools.

select ST_AsPNG(ST_AsRaster((select ST_Union(the_geom) from print_points_geo), 400,1000))

Result is st aspng Also these image dots are very small and only 3 points are visible. Two are missing.

If I add table print_points_geo to QGIS, result is table in qgis

Is it possible to generate image like in first example from PostgreSQL without GUI tools?

Better would be to do it with PostGIS tools. An option is to generate racks in one image, sections in another, and points in third image and then combine all images together. But I cannot figure out how to enlarge points in ST_AsRaster function. Basically rack and section images are static.

2
  • Postgis doesn't really give you much control over rending to png. You could always bugger the points and lines to make them thicker. If you are hapoy with Python, I would recommend using matplotlib Commented Mar 4, 2019 at 9:49
  • I think you need more like freecad > ksavinetworkinventory.com/network-inventory/…
    – Mapperz
    Commented Mar 4, 2019 at 15:53

1 Answer 1

1

With this query select ST_AsPNG(ST_AsRaster((SELECT ST_Union( ST_Expand(the_geom, 0.0000009, 0.0000025, 0, 0) ) FROM print_points_geo), 400,1000)) I got image with bigger "points".

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.