package com.sysu.admin.utils.shape.postgis;

import com.sysu.admin.MarkApplication;
import com.sysu.admin.api.base.BaseTest;
import com.sysu.admin.controller.aland.Land;
import com.sysu.admin.controller.aland.LandRepository;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.locationtech.jts.geom.MultiPolygon;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.List;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = MarkApplication.class)
public class UpdateTownId extends BaseTest {

    @Autowired
    LandRepository landRepository;

    @Test
    public void updateTownIdSql(){
        List<Land> landList = landRepository.findAllGeom();
        landList.stream().forEach(land -> {
            MultiPolygon multiPolygon = land.getGeom();
        });
    }

}
