----------------------------------------------------------------------------*/
| 2757 | |
| 2758 | /*----------------------------------------------------------------------------*/ |
| 2759 | demzip_I32 create_point_writer |
| 2760 | ( |
| 2761 | demzip_dll_struct *demzip_dll |
| 2762 | , const LASzip *laszip |
| 2763 | ) |
| 2764 | { |
| 2765 | // create the point writer |
| 2766 | demzip_dll->writer = new LASwritePoint(); |
| 2767 | if (demzip_dll->writer == 0) |
| 2768 | { |
| 2769 | sprintf(demzip_dll->error, "could not alloc LASwritePoint"); |
| 2770 | return 1; |
| 2771 | } |
| 2772 | |
| 2773 | if (!demzip_dll->writer->setup(laszip->num_items, laszip->items, laszip)) |
| 2774 | { |
| 2775 | sprintf(demzip_dll->error, "setup of LASwritePoint failed"); |
| 2776 | return 1; |
| 2777 | } |
| 2778 | |
| 2779 | if (!demzip_dll->writer->init(demzip_dll->streamout)) |
| 2780 | { |
| 2781 | sprintf(demzip_dll->error, "init of LASwritePoint failed"); |
| 2782 | return 1; |
| 2783 | } |
| 2784 | |
| 2785 | return 0; |
| 2786 | } |
| 2787 | |
| 2788 | /*---------------------------------------------------------------------------*/ |
| 2789 | static I32 |
no test coverage detected